RobotReader Class Reference

The RobotReader class. More...

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

+ Inheritance diagram for RobotReader:

Public Types

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

Public Member Functions

virtual void connect (armem::client::MemoryNameSystem &memoryNameSystem)
 
robot::Robot get (const robot::RobotDescription &description, const armem::Time &timestamp) const override
 
std::optional< robot::Robotget (const std::string &name, const armem::Time &timestamp) const override
 
std::optional< robot::RobotDescriptionqueryDescription (const std::string &name, const armem::Time &timestamp) const
 
std::vector< robot::RobotDescriptionqueryDescriptions (const armem::Time &timestamp) const
 
std::optional< std::map< Hand, robot::ForceTorque > > queryForceTorque (const robot::RobotDescription &description, const armem::Time &timestamp) const
 
std::optional< std::map< RobotReader::Hand, std::map< armem::Time, robot::ForceTorque > > > queryForceTorques (const robot::RobotDescription &description, const armem::Time &start, const armem::Time &end) const
 
std::optional< robot::RobotState::PosequeryGlobalPose (const robot::RobotDescription &description, const armem::Time &timestamp) const
 
JointTrajectory queryJointStates (const robot::RobotDescription &description, const armem::Time &begin, const armem::Time &end) const
 
std::optional<::armarx::armem::robot_state::TransformqueryOdometryPose (const robot::RobotDescription &description, const armem::Time &timestamp) const
 retrieve the robot's pose in the odometry frame. More...
 
std::optional< robot::PlatformStatequeryPlatformState (const robot::RobotDescription &description, const armem::Time &timestamp) const
 
std::optional< armarx::armem::arondto::Proprioception > queryProprioception (const robot::RobotDescription &description, const armem::Time &timestamp) const
 
std::optional< robot::RobotStatequeryState (const robot::RobotDescription &description, const armem::Time &timestamp) const
 
std::optional< std::map< Hand, robot::ToFArray > > queryToF (const robot::RobotDescription &description, 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::Robot &obj, const armem::Time &timestamp) const override
 
virtual ~RobotReader ()=default
 
- Public Member Functions inherited from ReaderInterface
virtual ~ReaderInterface ()=default
 

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 74 of file RobotReader.h.

Member Enumeration Documentation

◆ Hand

enum Hand
strong
Enumerator
Left 
Right 

Definition at line 91 of file RobotReader.h.

Constructor & Destructor Documentation

◆ RobotReader() [1/2]

RobotReader ( )
default

◆ RobotReader() [2/2]

RobotReader ( const RobotReader r)

Definition at line 34 of file RobotReader.cpp.

◆ ~RobotReader()

virtual ~RobotReader ( )
virtualdefault

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::Robot get ( const robot::RobotDescription description,
const armem::Time timestamp 
) const
overridevirtual

Implements ReaderInterface.

Definition at line 82 of file RobotReader.cpp.

+ Here is the call graph for this function:

◆ get() [2/2]

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

Implements ReaderInterface.

Definition at line 68 of file RobotReader.cpp.

+ Here is the call graph for this function:

◆ queryDescription()

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

Definition at line 138 of file RobotReader.cpp.

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

◆ queryDescriptions()

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

Definition at line 837 of file RobotReader.cpp.

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

◆ queryForceTorque()

std::optional< std::map< RobotReader::Hand, robot::ForceTorque > > queryForceTorque ( const robot::RobotDescription description,
const armem::Time timestamp 
) const

Definition at line 511 of file RobotReader.cpp.

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

◆ queryForceTorques()

std::optional< std::map< RobotReader::Hand, std::map< armem::Time, robot::ForceTorque > > > queryForceTorques ( const robot::RobotDescription description,
const armem::Time start,
const armem::Time end 
) const

Definition at line 553 of file RobotReader.cpp.

+ Here is the call graph for this function:

◆ queryGlobalPose()

std::optional< robot::RobotState::Pose > queryGlobalPose ( const robot::RobotDescription description,
const armem::Time timestamp 
) const

Definition at line 365 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 robot::RobotDescription description,
const armem::Time begin,
const armem::Time end 
) const

Definition at line 282 of file RobotReader.cpp.

+ Here is the call graph for this function:

◆ queryOdometryPose()

std::optional<::armarx::armem::robot_state::Transform > queryOdometryPose ( const robot::RobotDescription description,
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<robot::RobotState::Pose>

Definition at line 213 of file RobotReader.cpp.

+ Here is the call graph for this function:

◆ queryPlatformState()

std::optional< robot::PlatformState > queryPlatformState ( const robot::RobotDescription description,
const armem::Time timestamp 
) const

Definition at line 323 of file RobotReader.cpp.

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

◆ queryProprioception()

std::optional< armarx::armem::arondto::Proprioception > queryProprioception ( const robot::RobotDescription description,
const armem::Time timestamp 
) const

Definition at line 240 of file RobotReader.cpp.

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

◆ queryState()

std::optional< robot::RobotState > queryState ( const robot::RobotDescription description,
const armem::Time timestamp 
) const

Definition at line 186 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, robot::ToFArray > > queryToF ( const robot::RobotDescription description,
const armem::Time timestamp 
) const

Definition at line 595 of file RobotReader.cpp.

+ Here is the call graph for this function:

◆ registerPropertyDefinitions()

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

Reimplemented in VirtualRobotReader.

Definition at line 43 of file RobotReader.cpp.

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

◆ setSleepAfterSyncFailure()

void setSleepAfterSyncFailure ( const armem::Duration duration)

Definition at line 101 of file RobotReader.cpp.

+ Here is the call graph for this function:

◆ setSyncTimeout()

void setSyncTimeout ( const armem::Duration duration)

Definition at line 95 of file RobotReader.cpp.

◆ synchronize()

bool synchronize ( robot::Robot obj,
const armem::Time timestamp 
) const
overridevirtual

Implements ReaderInterface.

Definition at line 108 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 126 of file RobotReader.h.

◆ syncTimeout

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

Definition at line 125 of file RobotReader.h.


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