Segment Class Reference

#include <RobotAPI/libraries/armem_objects/server/instance/Segment.h>

+ Inheritance diagram for Segment:

Classes

struct  Calibration
 
struct  CommitStats
 
struct  RemoteGui
 
struct  RobotsCache
 Loaded robot models identified by the robot name. More...
 

Public Types

using ObjectPose = objpose::ObjectPose
 
using ObjectPoseMap = std::map< ObjectID, ObjectPose >
 
using ObjectPoseSeq = objpose::ObjectPoseSeq
 

Public Member Functions

objpose::AttachObjectToRobotNodeOutput attachObjectToRobotNode (const objpose::AttachObjectToRobotNodeInput &input)
 
void commitObjectPoses (const ObjectPoseSeq &objectPoses, const std::string &providerName="")
 
CommitStats commitObjectPoses (const std::string &providerName, const objpose::data::ProvidedObjectPoseSeq &providedPoses, const Calibration &calibration, std::optional< Time > discardUpdatesUntil=std::nullopt)
 
void connect (viz::Client arviz)
 
void defineProperties (armarx::PropertyDefinitionsPtr defs, const std::string &prefix="") override
 
objpose::DetachAllObjectsFromRobotNodesOutput detachAllObjectsFromRobotNodes (const objpose::DetachAllObjectsFromRobotNodesInput &input)
 
objpose::DetachObjectFromRobotNodeOutput detachObjectFromRobotNode (const objpose::DetachObjectFromRobotNodeInput &input)
 
wm::EntityfindObjectEntity (const ObjectID &objectID, const std::string &providerName="")
 
::armarx::armem::articulated_object::ArticulatedObjects getArticulatedObjects ()
 
std::optional< simox::OrientedBoxf > getObjectOOBB (const ObjectID &id)
 
objpose::ObjectPoseMap getObjectPoses (const DateTime &now)
 
objpose::ObjectPoseMap getObjectPosesByProvider (const std::string &providerName, const DateTime &now)
 
objpose::ProviderInfo getProviderInfo (const std::string &providerName)
 
void init () override
 
 Segment (server::MemoryToIceAdapter &iceMemory)
 
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. More...
 
virtual ~Segment () override
 
- Public Member Functions inherited from SpecializedCoreSegment
template<class FunctionT >
auto doLocked (FunctionT &&function) const
 
wm::CoreSegmentgetCoreSegment ()
 
const wm::CoreSegmentgetCoreSegment () const
 
void setAronType (aron::type::ObjectPtr aronType)
 
void setDefaultCoreSegmentName (const std::string &coreSegmentName)
 
void setDefaultMaxHistorySize (int64_t maxHistorySize)
 
void setPredictionEngines (const std::vector< PredictionEngine > &predictionEngines)
 
 SpecializedCoreSegment (MemoryToIceAdapter &iceMemory, const std::string &defaultCoreSegmentName="", aron::type::ObjectPtr coreSegmentAronType=nullptr, int defaultMaxHistorySize=-1, const std::vector< PredictionEngine > &predictionEngines={})
 
virtual ~SpecializedCoreSegment () override
 
- Public Member Functions inherited from SegmentBase< server::wm::CoreSegment >
MemoryIDid ()
 
const MemoryIDid () const
 
 SegmentBase ()=delete
 
 SegmentBase (MemoryToIceAdapter &iceMemory)
 
virtual ~SegmentBase ()=default
 
- Public Member Functions inherited from Logging
SpamFilterDataPtr deactivateSpam (float deactivationDurationSec=10.0f, const std::string &identifier="", bool deactivate=true) const
 disables the logging for the current line for the given amount of seconds. More...
 
MessageTypeT getEffectiveLoggingLevel () const
 
 Logging ()
 
void setLocalMinimumLoggingLevel (MessageTypeT level)
 With setLocalMinimumLoggingLevel the minimum verbosity-level of log-messages can be set. More...
 
void setTag (const LogTag &tag)
 
void setTag (const std::string &tagName)
 
virtual ~Logging ()
 

Static Public Member Functions

static arondto::ObjectInstance getLatestInstanceData (const wm::Entity &entity)
 
static ObjectPose getLatestObjectPose (const wm::Entity &entity)
 
static void getLatestObjectPose (const wm::Entity &entity, ObjectPose &out)
 
static ObjectPoseMap getLatestObjectPoses (const wm::CoreSegment &coreSeg)
 
static void getLatestObjectPoses (const wm::CoreSegment &coreSeg, ObjectPoseMap &out)
 
static ObjectPoseMap getLatestObjectPoses (const wm::ProviderSegment &provSeg)
 
static void getLatestObjectPoses (const wm::ProviderSegment &provSeg, ObjectPoseMap &out)
 
static std::map< DateTime, ObjectPosegetObjectPosesInRange (const wm::Entity &entity, const DateTime &start, const DateTime &end)
 

Public Attributes

Decay decay
 Decay model. More...
 
ObjectFinder objectFinder
 
objpose::ProviderInfoMap providers
 
RobotsCache robots
 
- Public Attributes inherited from SpecializedCoreSegment
aron::type::ObjectPtr aronType
 
std::vector< PredictionEnginepredictionEngines
 
Properties properties
 
- Public Attributes inherited from SegmentBase< server::wm::CoreSegment >
server::wm::CoreSegmentsegmentPtr
 

Friends

struct DetachVisitor
 

Additional Inherited Members

- Protected Member Functions inherited from Logging
bool checkLogLevel (MessageTypeT level) const
 
const LogSenderPtrgetLogSender () const
 Retrieve log sender. More...
 
LogSenderPtr loghelper (const char *file, int line, const char *function) const
 
- Protected Attributes inherited from SegmentBase< server::wm::CoreSegment >
MemoryToIceAdaptericeMemory
 
- Protected Attributes inherited from Logging
MessageTypeT minimumLoggingLevel
 
SpamFilterDataPtr spamFilter
 
LogTag tag
 

Detailed Description

Definition at line 34 of file Segment.h.

Member Typedef Documentation

◆ ObjectPose

Definition at line 42 of file Segment.h.

◆ ObjectPoseMap

using ObjectPoseMap = std::map<ObjectID, ObjectPose>

Definition at line 44 of file Segment.h.

◆ ObjectPoseSeq

Definition at line 43 of file Segment.h.

Constructor & Destructor Documentation

◆ Segment()

Definition at line 57 of file Segment.cpp.

+ Here is the call graph for this function:

◆ ~Segment()

~Segment ( )
overridevirtual

Definition at line 96 of file Segment.cpp.

Member Function Documentation

◆ attachObjectToRobotNode()

objpose::AttachObjectToRobotNodeOutput attachObjectToRobotNode ( const objpose::AttachObjectToRobotNodeInput &  input)

Definition at line 731 of file Segment.cpp.

+ Here is the call graph for this function:

◆ commitObjectPoses() [1/2]

void commitObjectPoses ( const ObjectPoseSeq objectPoses,
const std::string &  providerName = "" 
)

Definition at line 358 of file Segment.cpp.

+ Here is the call graph for this function:

◆ commitObjectPoses() [2/2]

CommitStats commitObjectPoses ( const std::string &  providerName,
const objpose::data::ProvidedObjectPoseSeq &  providedPoses,
const Calibration calibration,
std::optional< Time discardUpdatesUntil = std::nullopt 
)

◆ connect()

void connect ( viz::Client  arviz)

Definition at line 170 of file Segment.cpp.

+ Here is the caller graph for this function:

◆ defineProperties()

void defineProperties ( armarx::PropertyDefinitionsPtr  defs,
const std::string &  prefix = "" 
)
overridevirtual

Reimplemented from SpecializedCoreSegment.

Definition at line 101 of file Segment.cpp.

+ Here is the caller graph for this function:

◆ detachAllObjectsFromRobotNodes()

objpose::DetachAllObjectsFromRobotNodesOutput detachAllObjectsFromRobotNodes ( const objpose::DetachAllObjectsFromRobotNodesInput &  input)

Definition at line 884 of file Segment.cpp.

+ Here is the call graph for this function:

◆ detachObjectFromRobotNode()

objpose::DetachObjectFromRobotNodeOutput detachObjectFromRobotNode ( const objpose::DetachObjectFromRobotNodeInput &  input)

Definition at line 836 of file Segment.cpp.

+ Here is the call graph for this function:

◆ findObjectEntity()

wm::Entity * findObjectEntity ( const ObjectID objectID,
const std::string &  providerName = "" 
)

Definition at line 415 of file Segment.cpp.

+ Here is the call graph for this function:

◆ getArticulatedObjects()

Definition at line 623 of file Segment.cpp.

+ Here is the call graph for this function:

◆ getLatestInstanceData()

arondto::ObjectInstance getLatestInstanceData ( const wm::Entity entity)
static

Definition at line 608 of file Segment.cpp.

+ Here is the call graph for this function:

◆ getLatestObjectPose() [1/2]

objpose::ObjectPose getLatestObjectPose ( const wm::Entity entity)
static

Definition at line 557 of file Segment.cpp.

◆ getLatestObjectPose() [2/2]

void getLatestObjectPose ( const wm::Entity entity,
ObjectPose out 
)
static

Definition at line 595 of file Segment.cpp.

+ Here is the call graph for this function:

◆ getLatestObjectPoses() [1/4]

objpose::ObjectPoseMap getLatestObjectPoses ( const wm::CoreSegment coreSeg)
static

Definition at line 541 of file Segment.cpp.

◆ getLatestObjectPoses() [2/4]

void getLatestObjectPoses ( const wm::CoreSegment coreSeg,
ObjectPoseMap out 
)
static

Definition at line 565 of file Segment.cpp.

+ Here is the call graph for this function:

◆ getLatestObjectPoses() [3/4]

objpose::ObjectPoseMap getLatestObjectPoses ( const wm::ProviderSegment provSeg)
static

Definition at line 549 of file Segment.cpp.

◆ getLatestObjectPoses() [4/4]

void getLatestObjectPoses ( const wm::ProviderSegment provSeg,
ObjectPoseMap out 
)
static

Definition at line 572 of file Segment.cpp.

+ Here is the call graph for this function:

◆ getObjectOOBB()

std::optional< simox::OrientedBoxf > getObjectOOBB ( const ObjectID id)

Definition at line 705 of file Segment.cpp.

◆ getObjectPoses()

objpose::ObjectPoseMap getObjectPoses ( const DateTime now)

Definition at line 397 of file Segment.cpp.

+ Here is the caller graph for this function:

◆ getObjectPosesByProvider()

objpose::ObjectPoseMap getObjectPosesByProvider ( const std::string &  providerName,
const DateTime now 
)

Definition at line 405 of file Segment.cpp.

+ Here is the caller graph for this function:

◆ getObjectPosesInRange()

std::map< DateTime, objpose::ObjectPose > getObjectPosesInRange ( const wm::Entity entity,
const DateTime start,
const DateTime end 
)
static

Definition at line 677 of file Segment.cpp.

+ Here is the call graph for this function:

◆ getProviderInfo()

objpose::ProviderInfo getProviderInfo ( const std::string &  providerName)

Definition at line 711 of file Segment.cpp.

◆ init()

void init ( )
overridevirtual

Reimplemented from SpecializedCoreSegment.

Definition at line 155 of file Segment.cpp.

+ Here is the caller graph for this function:

◆ updateAttachement()

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.

If there is no attachement info in objectPose itself, the internal data structure attachments is queried. If an attachment is found there, it is written into the given objectPose (thus, it is "cached" in the info objectPose).

Parameters
synchronizedIndicates whether the agent is already synchronized to the current time.

Definition at line 503 of file Segment.cpp.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ DetachVisitor

friend struct DetachVisitor
friend

Definition at line 149 of file Segment.h.

Member Data Documentation

◆ decay

Decay decay

Decay model.

Definition at line 185 of file Segment.h.

◆ objectFinder

ObjectFinder objectFinder

Definition at line 182 of file Segment.h.

◆ providers

objpose::ProviderInfoMap providers

Definition at line 179 of file Segment.h.

◆ robots

RobotsCache robots

Definition at line 176 of file Segment.h.


The documentation for this class was generated from the following files: