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=10, 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 35 of file Segment.h.

Member Typedef Documentation

◆ ObjectPose

Definition at line 43 of file Segment.h.

◆ ObjectPoseMap

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

Definition at line 45 of file Segment.h.

◆ ObjectPoseSeq

Definition at line 44 of file Segment.h.

Constructor & Destructor Documentation

◆ Segment()

Definition at line 62 of file Segment.cpp.

+ Here is the call graph for this function:

◆ ~Segment()

~Segment ( )
overridevirtual

Definition at line 101 of file Segment.cpp.

Member Function Documentation

◆ attachObjectToRobotNode()

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

Definition at line 820 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 447 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 259 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 106 of file Segment.cpp.

+ Here is the caller graph for this function:

◆ detachAllObjectsFromRobotNodes()

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

Definition at line 973 of file Segment.cpp.

+ Here is the call graph for this function:

◆ detachObjectFromRobotNode()

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

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

+ Here is the call graph for this function:

◆ getArticulatedObjects()

Definition at line 712 of file Segment.cpp.

+ Here is the call graph for this function:

◆ getLatestInstanceData()

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

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

◆ getLatestObjectPose() [2/2]

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

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

◆ getLatestObjectPoses() [2/4]

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

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

◆ getLatestObjectPoses() [4/4]

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

Definition at line 661 of file Segment.cpp.

+ Here is the call graph for this function:

◆ getObjectOOBB()

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

Definition at line 794 of file Segment.cpp.

◆ getObjectPoses()

objpose::ObjectPoseMap getObjectPoses ( const DateTime now)

Definition at line 486 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 494 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 766 of file Segment.cpp.

+ Here is the call graph for this function:

◆ getProviderInfo()

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

Definition at line 800 of file Segment.cpp.

◆ init()

void init ( )
overridevirtual

Reimplemented from SpecializedCoreSegment.

Definition at line 163 of file Segment.cpp.

+ Here is the call graph for this function:
+ 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 592 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 150 of file Segment.h.

Member Data Documentation

◆ decay

Decay decay

Decay model.

Definition at line 186 of file Segment.h.

◆ objectFinder

ObjectFinder objectFinder

Definition at line 183 of file Segment.h.

◆ providers

objpose::ProviderInfoMap providers

Definition at line 180 of file Segment.h.

◆ robots

RobotsCache robots

Definition at line 177 of file Segment.h.


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