VirtualRobotReader Class Reference

The VirtualRobotReader class. More...

#include <RobotAPI/libraries/armem_robot_state/client/common/VirtualRobotReader.h>

+ Inheritance diagram for VirtualRobotReader:

Public Member Functions

VirtualRobot::RobotPtr getRobot (const std::string &name, const armem::Time &timestamp=armem::Time::Invalid(), const VirtualRobot::RobotIO::RobotDescription &loadMode=VirtualRobot::RobotIO::RobotDescription::eStructure)
 
VirtualRobot::RobotPtr getRobotWaiting (const std::string &name, const armem::Time &timestamp=armem::Time::Invalid(), const VirtualRobot::RobotIO::RobotDescription &loadMode=VirtualRobot::RobotIO::RobotDescription::eStructure)
 In contrast to getRobot(), this function will retry to query the robot until it exists.
 
VirtualRobot::RobotPtr getSynchronizedRobot (const std::string &name, const armem::Time &timestamp, const VirtualRobot::RobotIO::RobotDescription &loadMode=VirtualRobot::RobotIO::RobotDescription::eStructure, bool blocking=true)
 
VirtualRobot::RobotPtr getSynchronizedRobot (const std::string &name, const VirtualRobot::RobotIO::RobotDescription &loadMode=VirtualRobot::RobotIO::RobotDescription::eStructure, bool blocking=true)
 
 RobotReader ()=default
 
 RobotReader (const RobotReader &)
 
bool synchronizeRobot (VirtualRobot::Robot &robot, const armem::Time &timestamp) const
 Synchronize both the platform pose and the joint values of a virtual robot, according to the robot state memory for a certain point in time.
 
bool synchronizeRobotJoints (VirtualRobot::Robot &robot, const armem::Time &timestamp) const
 Synchronize only the joint values of a virtual robot, according to the robot state memory for a certain point in time.
 
bool synchronizeRobotPose (VirtualRobot::Robot &robot, const armem::Time &timestamp) const
 Synchronize only the platform pose of a virtual robot, according to the robot state memory for a certain point in time.
 
 ~VirtualRobotReader () override=default
 
- Public Member Functions inherited from RobotReader
virtual void connect (armem::client::MemoryNameSystem &memoryNameSystem)
 
Robot get (const description::RobotDescription &description, const armem::Time &timestamp) const override
 
std::optional< Robot > get (const std::string &name, const armem::Time &timestamp) const override
 
std::optional< description::RobotDescription > queryDescription (const std::string &name, const armem::Time &timestamp) const
 
std::vector< description::RobotDescription > queryDescriptions (const armem::Time &timestamp) const
 
std::optional< std::map< Hand, proprioception::ForceTorque > > queryForceTorque (const std::string &robotName, const armem::Time &timestamp) const
 
std::optional< std::map< RobotReader::Hand, std::map< armem::Time, proprioception::ForceTorque > > > queryForceTorques (const std::string &robotName, const armem::Time &start, const armem::Time &end) const
 
std::optional< RobotState::Pose > queryGlobalPose (const std::string &robotName, const armem::Time &timestamp) const
 
std::optional< RobotState > queryJointState (const std::string &robotName, const armem::Time &timestamp) const
 
JointTrajectory queryJointStates (const std::string &robotName, const armem::Time &begin, const armem::Time &end) const
 
std::optional<::armarx::armem::robot_state::localization::Transform > queryOdometryPose (const std::string &robotName, const armem::Time &timestamp) const
 retrieve the robot's pose in the odometry frame.
 
std::optional< PlatformState > queryPlatformState (const std::string &robotName, const armem::Time &timestamp) const
 
std::optional< armarx::armem::arondto::Proprioception > queryProprioception (const std::string &robotName, const armem::Time &timestamp, armem::Time *referencedTime=nullptr) const
 
std::optional< RobotState > queryState (const std::string &robotName, const armem::Time &timestamp) const
 
std::optional< std::map< Hand, exteroception::ToF > > queryToF (const std::string &robotName, const armem::Time &timestamp) const
 
virtual void registerPropertyDefinitions (::armarx::PropertyDefinitionsPtr &def)
 
 RobotReader ()=default
 
 RobotReader (const RobotReader &)
 
void setSleepAfterSyncFailure (const armem::Duration &duration)
 
void setSyncTimeout (const armem::Duration &duration)
 
bool synchronize (Robot &obj, const armem::Time &timestamp) const override
 
virtual ~RobotReader ()=default
 
- Public Member Functions inherited from ReaderInterface
virtual ~ReaderInterface ()=default
 

Additional Inherited Members

- Public Types inherited from RobotReader
enum class  Hand { Left , Right }
 
using JointTrajectory = std::map<armem::Time, RobotState::JointMap>
 
- Protected Member Functions inherited from RobotReader
std::optional< armarx::armem::arondto::Proprioception > getRobotProprioception (const armarx::armem::wm::Memory &memory, const std::string &name, armem::Time *referencedTime=nullptr) const
 Protected rather than private so the referenced-time reporting can be exercised directly: everything above it needs a live memory server, this needs only a wm::Memory.
 
- Protected Attributes inherited from RobotReader
armem::Duration sleepAfterFailure = armem::Duration::MicroSeconds(0)
 
armem::Duration syncTimeout = armem::Duration::MicroSeconds(0)
 

Detailed Description

The VirtualRobotReader class.

robot The aim of this class is to obtain a virtual robot instance and synchronize it with the data (joint positions, global pose, ...) stored in the working memory.

This is only a lightweight wrapper of

See also
RobotReader for Simox's VirtualRobot class.

Constructor & Destructor Documentation

◆ ~VirtualRobotReader()

~VirtualRobotReader ( )
overridedefault

Member Function Documentation

◆ getRobot()

VirtualRobot::RobotPtr getRobot ( const std::string & name,
const armem::Time & timestamp = armem::Time::Invalid(),
const VirtualRobot::RobotIO::RobotDescription & loadMode = VirtualRobot::RobotIO::RobotDescription::eStructure )
nodiscard

◆ getRobotWaiting()

VirtualRobot::RobotPtr getRobotWaiting ( const std::string & name,
const armem::Time & timestamp = armem::Time::Invalid(),
const VirtualRobot::RobotIO::RobotDescription & loadMode = VirtualRobot::RobotIO::RobotDescription::eStructure )
nodiscard

In contrast to getRobot(), this function will retry to query the robot until it exists.

◆ getSynchronizedRobot() [1/2]

VirtualRobot::RobotPtr getSynchronizedRobot ( const std::string & name,
const armem::Time & timestamp,
const VirtualRobot::RobotIO::RobotDescription & loadMode = VirtualRobot::RobotIO::RobotDescription::eStructure,
bool blocking = true )
nodiscard

◆ getSynchronizedRobot() [2/2]

VirtualRobot::RobotPtr getSynchronizedRobot ( const std::string & name,
const VirtualRobot::RobotIO::RobotDescription & loadMode = VirtualRobot::RobotIO::RobotDescription::eStructure,
bool blocking = true )
nodiscard

◆ RobotReader() [1/2]

RobotReader ( )
default

◆ RobotReader() [2/2]

RobotReader ( const RobotReader & r)

◆ synchronizeRobot()

bool synchronizeRobot ( VirtualRobot::Robot & robot,
const armem::Time & timestamp ) const
nodiscard

Synchronize both the platform pose and the joint values of a virtual robot, according to the robot state memory for a certain point in time.

Parameters
robotwhose platform pose and joint values to modify
timestampfor which to synchronize
Returns
whether synchronization was successful

◆ synchronizeRobotJoints()

bool synchronizeRobotJoints ( VirtualRobot::Robot & robot,
const armem::Time & timestamp ) const
nodiscard

Synchronize only the joint values of a virtual robot, according to the robot state memory for a certain point in time.

Parameters
robotwhose joint values to modify
timestampfor which to synchronize
Returns
whether synchronization was successful

◆ synchronizeRobotPose()

bool synchronizeRobotPose ( VirtualRobot::Robot & robot,
const armem::Time & timestamp ) const
nodiscard

Synchronize only the platform pose of a virtual robot, according to the robot state memory for a certain point in time.

Parameters
robotwhose platform pose and joint values to modify
timestampfor which to synchronize
Returns
whether synchronization was successful

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