Go to the documentation of this file.
8 #include <SimoxUtility/caching/CacheMap.h>
9 #include <SimoxUtility/shapes/OrientedBox.h>
15 #include <RobotAPI/interface/core/RobotState.h>
16 #include <RobotAPI/interface/objectpose/ObjectPoseStorageInterface.h>
55 const std::string& prefix =
"calibration.");
65 const std::string& prefix =
"")
override;
73 std::optional<Time> discardUpdatesUntil = std::nullopt);
75 const std::string& providerName =
"");
83 const std::string& providerName =
"");
88 objpose::AttachObjectToRobotNodeOutput
90 objpose::DetachObjectFromRobotNodeOutput
92 objpose::DetachAllObjectsFromRobotNodesOutput
108 bool&
synchronized)
const;
123 static std::map<DateTime, ObjectPose>
133 bool& agentSynchronized)
const;
137 bool& agentSynchronized)
const;
143 void storeDetachedSnapshot(
wm::Entity& entity,
144 const arondto::ObjectInstance&
data,
146 bool commitAttachedPose);
149 std::optional<wm::EntityInstance> findClassInstance(
const ObjectID& objectID)
const;
156 std::optional<armarx::objects::Scene> loadScene(
const std::string&
filename);
157 std::optional<armarx::objects::Scene> loadScene(
const std::filesystem::path& path);
158 std::optional<std::filesystem::path> resolveSceneFilepath(
const std::string&
filename);
162 void commitSceneSnapshotFromFilename(
const std::string&
filename,
bool lockMemory);
172 std::map<std::string, VirtualRobot::RobotPtr>
loaded;
175 const std::string& providerName =
"");
193 bool discardSnapshotsWhileAttached =
true;
197 std::string sceneSnapshotsDirectory =
"scenes";
198 std::string sceneSnapshotsToLoad =
"";
200 bool autoReloadSceneSnapshotsOnFileChange =
false;
202 std::vector<std::string> getSceneSnapshotsToLoad()
const;
209 simox::caching::CacheMap<ObjectID, std::optional<simox::OrientedBoxf>> oobbCache;
212 simox::caching::CacheMap<std::string, std::string> classNameToDatasetCache;
214 std::unique_ptr<CMakePackageFinder> finder;
216 static const std::string timestampPlaceholder;
240 std::unique_ptr<ArticulatedObjectVisu> visu;
objpose::ProviderInfo getProviderInfo(const std::string &providerName)
objpose::ObjectPoseMap getObjectPoses(const DateTime &now)
The VirtualRobotReader class.
A known object ID of the form "Dataset/ClassName" or "Dataset/ClassName/InstanceName".
static const std::string DefaultObjectsPackageName
std::optional< simox::OrientedBoxf > getObjectOOBB(const ObjectID &id)
objpose::ProviderInfoMap providers
A base class for core segments.
objpose::DetachAllObjectsFromRobotNodesOutput detachAllObjectsFromRobotNodes(const objpose::DetachAllObjectsFromRobotNodesInput &input)
std::vector< ObjectPose > ObjectPoseSeq
armarx::RemoteGui::Client::Button loadButton
Helps connecting a Memory server to the Ice interface.
Models decay of object localizations by decreasing the confidence the longer the object was not local...
Loaded robot models identified by the robot name.
armarx::RemoteGui::Client::LineEdit storeLoadLine
ObjectFinder objectFinder
std::map< std::string, VirtualRobot::RobotPtr > loaded
objpose::AttachObjectToRobotNodeOutput attachObjectToRobotNode(const objpose::AttachObjectToRobotNodeInput &input)
void connect(viz::Client arviz)
Used to find objects in the ArmarX objects repository [1] (formerly [2]).
objpose::DetachObjectFromRobotNodeOutput detachObjectFromRobotNode(const objpose::DetachObjectFromRobotNodeInput &input)
void updateAttachement(ObjectPose &objectPose, VirtualRobot::RobotPtr agent, bool &synchronized) const
If the object is attached to a robot node, update it according to the current robot state.
VirtualRobot::RobotPtr get(const std::string &robotName, const std::string &providerName="")
std::map< ObjectID, ObjectPose > ObjectPoseMap
ReaderT::InputType & input
armarx::RemoteGui::Client::GroupBox group
void defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string &prefix="calibration.")
::armarx::armem::articulated_object::ArticulatedObjects getArticulatedObjects()
armarx::RemoteGui::Client::CheckBox discardSnapshotsWhileAttached
Segment(server::MemoryToIceAdapter &iceMemory)
static ObjectPose getLatestObjectPose(const wm::Entity &entity)
robot_state::VirtualRobotReader * reader
void update(Segment &data)
armarx::RemoteGui::Client::CheckBox detachAllObjectsCommitAttachedPoseCheckBox
std::vector< ProvidedObjectPose > ProvidedObjectPoseSeq
objpose::ObjectPoseMap getObjectPosesByProvider(const std::string &providerName, const DateTime &now)
Represents a point in time.
armarx::armem::robot_state::Robots ArticulatedObjects
Base Class for all Logging classes.
armarx::RemoteGui::Client::CheckBox infiniteHistory
static ObjectPoseMap getLatestObjectPoses(const wm::CoreSegment &coreSeg)
MemoryToIceAdapter & iceMemory
CommitStats commitObjectPoses(const std::string &providerName, const objpose::data::ProvidedObjectPoseSeq &providedPoses, const Calibration &calibration, std::optional< Time > discardUpdatesUntil=std::nullopt)
void setup(const Segment &data)
virtual ~Segment() override
armarx::RemoteGui::Client::Button detachAllObjectsButton
objpose::ObjectPoseSeq ObjectPoseSeq
armarx::RemoteGui::Client::IntSpinBox maxHistorySize
armarx::RemoteGui::Client::Button storeButton
static arondto::ObjectInstance getLatestInstanceData(const wm::Entity &entity)
wm::Entity * findObjectEntity(const ObjectID &objectID, const std::string &providerName="")
void defineProperties(armarx::PropertyDefinitionsPtr defs, const std::string &prefix="") override
An object pose as stored by the ObjectPoseStorage.
friend struct DetachVisitor
std::shared_ptr< class Robot > RobotPtr
static std::map< DateTime, ObjectPose > getObjectPosesInRange(const wm::Entity &entity, const DateTime &start, const DateTime &end)
std::map< ObjectID, ObjectPose > ObjectPoseMap