Go to the documentation of this file.
8 #include <SimoxUtility/caching/CacheMap.h>
9 #include <SimoxUtility/shapes/OrientedBox.h>
14 #include <RobotAPI/interface/core/RobotState.h>
15 #include <RobotAPI/interface/objectpose/ObjectPoseStorageInterface.h>
54 const std::string& prefix =
"calibration.");
64 const std::string& prefix =
"")
override;
72 std::optional<Time> discardUpdatesUntil = std::nullopt);
74 const std::string& providerName =
"");
82 const std::string& providerName =
"");
87 objpose::AttachObjectToRobotNodeOutput
89 objpose::DetachObjectFromRobotNodeOutput
91 objpose::DetachAllObjectsFromRobotNodesOutput
107 bool&
synchronized)
const;
122 static std::map<DateTime, ObjectPose>
132 bool& agentSynchronized)
const;
136 bool& agentSynchronized)
const;
142 void storeDetachedSnapshot(
wm::Entity& entity,
143 const arondto::ObjectInstance&
data,
145 bool commitAttachedPose);
148 std::optional<wm::EntityInstance> findClassInstance(
const ObjectID& objectID)
const;
155 std::optional<armarx::objects::Scene> loadScene(
const std::string&
filename);
156 std::optional<armarx::objects::Scene> loadScene(
const std::filesystem::path& path);
157 std::optional<std::filesystem::path> resolveSceneFilepath(
const std::string&
filename);
161 void commitSceneSnapshotFromFilename(
const std::string&
filename,
bool lockMemory);
171 std::map<std::string, VirtualRobot::RobotPtr>
loaded;
174 const std::string& providerName =
"");
192 bool discardSnapshotsWhileAttached =
true;
196 std::string sceneSnapshotsDirectory =
"scenes";
197 std::string sceneSnapshotsToLoad =
"";
199 bool autoReloadSceneSnapshotsOnFileChange =
false;
201 std::vector<std::string> getSceneSnapshotsToLoad()
const;
208 simox::caching::CacheMap<ObjectID, std::optional<simox::OrientedBoxf>> oobbCache;
211 simox::caching::CacheMap<std::string, std::string> classNameToDatasetCache;
213 std::unique_ptr<CMakePackageFinder> finder;
215 static const std::string timestampPlaceholder;
239 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