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::map< std::string, ObjectPoseMapgetLatestObjectPosesByProviders ()
 
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
 
void runUpdateObjectPoses ()
 
 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.
 
virtual ~Segment () override
 
- Public Member Functions inherited from SpecializedCoreSegment
template<class FunctionT>
auto doLocked (FunctionT &&function) const
 Execute function under shared (read) lock.
 
template<class FunctionT>
auto doLockedExclusive (FunctionT &&function)
 Execute function under exclusive (write) lock.
 
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=10, const std::vector< PredictionEngine > &predictionEngines={})
 
virtual ~SpecializedCoreSegment () override
 
- Public Member Functions inherited from SegmentBase< server::wm::CoreSegment >
MemoryIDid ()
 
MemoryIDid ()
 
const MemoryIDid () const
 
const MemoryIDid () const
 
 SegmentBase ()=delete
 
 SegmentBase ()=delete
 
 SegmentBase (MemoryToIceAdapter &iceMemory)
 
 SegmentBase (MemoryToIceAdapter &iceMemory)
 
virtual ~SegmentBase ()=default
 
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.
 
MessageTypeT getEffectiveLoggingLevel () const
 
 Logging ()
 
void setLocalMinimumLoggingLevel (MessageTypeT level)
 With setLocalMinimumLoggingLevel the minimum verbosity-level of log-messages can be set.
 
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< std::string, ObjectPoseMapgetLatestObjectPosesByProviders (const wm::CoreSegment &coreSeg)
 
static void getLatestObjectPosesByProviders (const wm::CoreSegment &coreSeg, std::map< std::string, ObjectPoseMap > &out)
 
static std::map< std::string, ObjectPoseMapgetLatestObjectPosesByProviders (const wm::ProviderSegment &provSeg)
 
static std::map< DateTime, ObjectPosegetObjectPosesInRange (const wm::Entity &entity, const DateTime &start, const DateTime &end)
 

Public Attributes

Decay decay
 Decay model.
 
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
 
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.
 
LogSenderPtr loghelper (const char *file, int line, const char *function) const
 
- Protected Attributes inherited from SegmentBase< server::wm::CoreSegment >
MemoryToIceAdaptericeMemory
 
MemoryToIceAdaptericeMemory
 
- Protected Attributes inherited from Logging
MessageTypeT minimumLoggingLevel
 
SpamFilterDataPtr spamFilter
 
LogTag tag
 

Detailed Description

Definition at line 51 of file Segment.h.

Member Typedef Documentation

◆ ObjectPose

Definition at line 59 of file Segment.h.

◆ ObjectPoseMap

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

Definition at line 61 of file Segment.h.

◆ ObjectPoseSeq

Definition at line 60 of file Segment.h.

Constructor & Destructor Documentation

◆ Segment()

Definition at line 103 of file Segment.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ ~Segment()

~Segment ( )
overridevirtual

Definition at line 142 of file Segment.cpp.

Member Function Documentation

◆ attachObjectToRobotNode()

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

Definition at line 1191 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 509 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 )
+ Here is the call graph for this function:

◆ connect()

void connect ( viz::Client arviz)

Definition at line 321 of file Segment.cpp.

◆ defineProperties()

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

Reimplemented from SpecializedCoreSegment.

Definition at line 147 of file Segment.cpp.

◆ detachAllObjectsFromRobotNodes()

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

Definition at line 1359 of file Segment.cpp.

+ Here is the call graph for this function:

◆ detachObjectFromRobotNode()

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

Definition at line 1305 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 669 of file Segment.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getArticulatedObjects()

Definition at line 1083 of file Segment.cpp.

+ Here is the call graph for this function:

◆ getLatestInstanceData()

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

Definition at line 1068 of file Segment.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLatestObjectPose() [1/2]

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

Definition at line 1005 of file Segment.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLatestObjectPose() [2/2]

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

Definition at line 1055 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 981 of file Segment.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLatestObjectPoses() [2/4]

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

Definition at line 1013 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 989 of file Segment.cpp.

+ Here is the call graph for this function:

◆ getLatestObjectPoses() [4/4]

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

Definition at line 1032 of file Segment.cpp.

+ Here is the call graph for this function:

◆ getLatestObjectPosesByProviders() [1/4]

std::map< std::string, objpose::ObjectPoseMap > getLatestObjectPosesByProviders ( )

Definition at line 974 of file Segment.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getLatestObjectPosesByProviders() [2/4]

std::map< std::string, objpose::ObjectPoseMap > getLatestObjectPosesByProviders ( const wm::CoreSegment & coreSeg)
static

Definition at line 997 of file Segment.cpp.

+ Here is the call graph for this function:

◆ getLatestObjectPosesByProviders() [3/4]

void getLatestObjectPosesByProviders ( const wm::CoreSegment & coreSeg,
std::map< std::string, ObjectPoseMap > & out )
static

Definition at line 1020 of file Segment.cpp.

+ Here is the call graph for this function:

◆ getLatestObjectPosesByProviders() [4/4]

static std::map< std::string, ObjectPoseMap > getLatestObjectPosesByProviders ( const wm::ProviderSegment & provSeg)
static
+ Here is the call graph for this function:

◆ getObjectOOBB()

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

Definition at line 1165 of file Segment.cpp.

◆ getObjectPoses()

objpose::ObjectPoseMap getObjectPoses ( const DateTime & now)

Definition at line 651 of file Segment.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getObjectPosesByProvider()

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

Definition at line 659 of file Segment.cpp.

+ Here is the call 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 1137 of file Segment.cpp.

+ Here is the call graph for this function:

◆ getProviderInfo()

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

Definition at line 1171 of file Segment.cpp.

◆ init()

void init ( )
overridevirtual

Reimplemented from SpecializedCoreSegment.

Definition at line 225 of file Segment.cpp.

+ Here is the call graph for this function:

◆ runUpdateObjectPoses()

void runUpdateObjectPoses ( )

Definition at line 548 of file Segment.cpp.

+ Here is the call 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 776 of file Segment.cpp.

+ Here is the call graph for this function:

Friends And Related Symbol Documentation

◆ DetachVisitor

friend struct DetachVisitor
friend

Definition at line 179 of file Segment.h.

Member Data Documentation

◆ decay

Decay decay

Decay model.

Definition at line 215 of file Segment.h.

◆ objectFinder

ObjectFinder objectFinder

Definition at line 212 of file Segment.h.

◆ providers

objpose::ProviderInfoMap providers

Definition at line 209 of file Segment.h.

◆ robots

RobotsCache robots

Definition at line 206 of file Segment.h.


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