RobotReader Class Reference

The RobotReader class. More...

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

+ Inheritance diagram for RobotReader:

Public Types

enum class  Hand { Left , Right }
 
using JointTrajectory = std::map<armem::Time, RobotState::JointMap>
 

Public Member Functions

virtual void connect (armem::client::MemoryNameSystem &memoryNameSystem)
 
Robot get (const description::RobotDescription &description, const armem::Time &timestamp) const override
 
std::optional< Robotget (const std::string &name, const armem::Time &timestamp) const override
 
std::optional< description::RobotDescriptionqueryDescription (const std::string &name, const armem::Time &timestamp) const
 
std::vector< description::RobotDescriptionqueryDescriptions (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::PosequeryGlobalPose (const std::string &robotName, const armem::Time &timestamp) const
 
std::optional< RobotStatequeryJointState (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::TransformqueryOdometryPose (const std::string &robotName, const armem::Time &timestamp) const
 retrieve the robot's pose in the odometry frame.
 
std::optional< PlatformStatequeryPlatformState (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< RobotStatequeryState (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
 

Protected Member Functions

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

armem::Duration sleepAfterFailure = armem::Duration::MicroSeconds(0)
 
armem::Duration syncTimeout = armem::Duration::MicroSeconds(0)
 

Detailed Description

The RobotReader class.

The purpose of this class is to synchronize the armem data structure armem::Robot with the memory.

Definition at line 43 of file RobotReader.h.

Member Typedef Documentation

◆ JointTrajectory

Definition at line 83 of file RobotReader.h.

Member Enumeration Documentation

◆ Hand

enum class Hand
strong
Enumerator
Left 
Right 

Definition at line 98 of file RobotReader.h.

Constructor & Destructor Documentation

◆ RobotReader() [1/2]

RobotReader ( )
default
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RobotReader() [2/2]

RobotReader ( const RobotReader & r)

Definition at line 34 of file RobotReader.cpp.

+ Here is the call graph for this function:

◆ ~RobotReader()

virtual ~RobotReader ( )
virtualdefault
+ Here is the call graph for this function:

Member Function Documentation

◆ connect()

void connect ( armem::client::MemoryNameSystem & memoryNameSystem)
virtual

Definition at line 49 of file RobotReader.cpp.

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

◆ get() [1/2]

Robot get ( const description::RobotDescription & description,
const armem::Time & timestamp ) const
overridevirtual

Implements ReaderInterface.

Definition at line 85 of file RobotReader.cpp.

+ Here is the call graph for this function:

◆ get() [2/2]

std::optional< Robot > get ( const std::string & name,
const armem::Time & timestamp ) const
overridevirtual

Implements ReaderInterface.

Definition at line 71 of file RobotReader.cpp.

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

◆ getRobotProprioception()

std::optional< armarx::armem::arondto::Proprioception > getRobotProprioception ( const armarx::armem::wm::Memory & memory,
const std::string & name,
armem::Time * referencedTime = nullptr ) const
protected

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.

Definition at line 466 of file RobotReader.cpp.

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

◆ queryDescription()

std::optional< description::RobotDescription > queryDescription ( const std::string & name,
const armem::Time & timestamp ) const

Definition at line 146 of file RobotReader.cpp.

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

◆ queryDescriptions()

std::vector< description::RobotDescription > queryDescriptions ( const armem::Time & timestamp) const

Definition at line 866 of file RobotReader.cpp.

+ Here is the call graph for this function:

◆ queryForceTorque()

std::optional< std::map< RobotReader::Hand, proprioception::ForceTorque > > queryForceTorque ( const std::string & robotName,
const armem::Time & timestamp ) const

Definition at line 541 of file RobotReader.cpp.

+ Here is the call graph for this function:

◆ queryForceTorques()

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

Definition at line 582 of file RobotReader.cpp.

+ Here is the call graph for this function:

◆ queryGlobalPose()

std::optional< RobotState::Pose > queryGlobalPose ( const std::string & robotName,
const armem::Time & timestamp ) const

Definition at line 389 of file RobotReader.cpp.

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

◆ queryJointState()

std::optional< RobotState > queryJointState ( const std::string & robotName,
const armem::Time & timestamp ) const

Definition at line 213 of file RobotReader.cpp.

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

◆ queryJointStates()

RobotReader::JointTrajectory queryJointStates ( const std::string & robotName,
const armem::Time & begin,
const armem::Time & end ) const

Definition at line 306 of file RobotReader.cpp.

+ Here is the call graph for this function:

◆ queryOdometryPose()

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.

This pose is an integration of the robot's platform velocity and undergoes a significant drift.

Parameters
description
timestamp
Returns
std::optional<RobotState::Pose>

Definition at line 237 of file RobotReader.cpp.

+ Here is the call graph for this function:

◆ queryPlatformState()

std::optional< PlatformState > queryPlatformState ( const std::string & robotName,
const armem::Time & timestamp ) const

Definition at line 347 of file RobotReader.cpp.

+ Here is the call graph for this function:

◆ queryProprioception()

std::optional< armarx::armem::arondto::Proprioception > queryProprioception ( const std::string & robotName,
const armem::Time & timestamp,
armem::Time * referencedTime = nullptr ) const
Parameters
referencedTimeIf given, receives the time the returned data actually refers to, which is the newest snapshot at or before timestamp and may be arbitrarily older than it.

Definition at line 263 of file RobotReader.cpp.

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

◆ queryState()

std::optional< RobotState > queryState ( const std::string & robotName,
const armem::Time & timestamp ) const

Definition at line 194 of file RobotReader.cpp.

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

◆ queryToF()

std::optional< std::map< RobotReader::Hand, exteroception::ToF > > queryToF ( const std::string & robotName,
const armem::Time & timestamp ) const

Definition at line 624 of file RobotReader.cpp.

+ Here is the call graph for this function:

◆ registerPropertyDefinitions()

void registerPropertyDefinitions ( ::armarx::PropertyDefinitionsPtr & def)
virtual

Definition at line 43 of file RobotReader.cpp.

◆ setSleepAfterSyncFailure()

void setSleepAfterSyncFailure ( const armem::Duration & duration)

Definition at line 105 of file RobotReader.cpp.

+ Here is the call graph for this function:

◆ setSyncTimeout()

void setSyncTimeout ( const armem::Duration & duration)

Definition at line 99 of file RobotReader.cpp.

◆ synchronize()

bool synchronize ( Robot & obj,
const armem::Time & timestamp ) const
nodiscardoverridevirtual

Implements ReaderInterface.

Definition at line 112 of file RobotReader.cpp.

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

Member Data Documentation

◆ sleepAfterFailure

armem::Duration sleepAfterFailure = armem::Duration::MicroSeconds(0)
protected

Definition at line 132 of file RobotReader.h.

◆ syncTimeout

armem::Duration syncTimeout = armem::Duration::MicroSeconds(0)
protected

Definition at line 131 of file RobotReader.h.


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