Class robot_fingers::T_TriFingerPlatformFrontend

template<typename CameraObservation_t>
class T_TriFingerPlatformFrontend

Combined frontend for the TriFinger Platform.

This class combines the frontends for robot and cameras in one class using unified time indices.

Internally the different frontends all have their own time indices which are unrelated to each other. In this combined class, the time index used is the one that belongs to the robot frontend. When accessing observations of the other frontends, it also takes this index t and internally matches it to the time index t_o that was active in the other frontend at the time of t.

Todo:

Methods to get timestamp from camera or object tracker?

This class combines the frontends for robot and cameras in one class using unified time indices.

Internally the different frontends all have their own time indices which are unrelated to each other. In this combined class, the time index used is the one that belongs to the robot frontend. When accessing observations of the other frontends, it also takes this index t and internally matches it to the time index t_o that was active in the other frontend at the time of t.

Todo:

Methods to get timestamp from camera or object tracker?

Public Types

typedef robot_interfaces::TriFingerTypes::Action Action
typedef robot_interfaces::TriFingerTypes::Observation RobotObservation
typedef robot_interfaces::Status RobotStatus
typedef CameraObservation_t CameraObservation
typedef robot_interfaces::TriFingerTypes::Action Action
typedef robot_interfaces::TriFingerTypes::Observation RobotObservation
typedef robot_interfaces::Status RobotStatus
typedef CameraObservation_t CameraObservation

Public Functions

inline T_TriFingerPlatformFrontend(robot_interfaces::TriFingerTypes::BaseDataPtr robot_data, std::shared_ptr<robot_interfaces::SensorData<CameraObservation>> camera_data)

Initialize with data instances for all internal frontends.

Parameters:
  • robot_data – RobotData instance used by the robot frontend.

  • object_tracker_data – ObjectTrackerData instance used by the object tracker frontend.

  • camera_data – SensorData instance, used by the camera frontend.

inline T_TriFingerPlatformFrontend()

Initialize with default data instances.

Creates for each internal frontend a corresponding mutli-process data instance with the default shared memory ID for the corresponding data type.

inline time_series::Index append_desired_action(const Action &desired_action)

Append a desired robot action to the action queue.

See also

robot_interfaces::TriFingerTypes::Frontend::append_desired_action

Returns:

The index of the time step at which this action is going to be executed.

inline RobotObservation get_robot_observation(const time_series::Index &t) const

Get robot observation of the time step t.

See also

robot_interfaces::TriFingerTypes::Frontend::get_observation

inline Action get_desired_action(const time_series::Index &t) const

Get desired action of time step t.

See also

robot_interfaces::TriFingerTypes::Frontend::get_desired_action

inline Action get_applied_action(const time_series::Index &t) const

Get actually applied action of time step t.

See also

robot_interfaces::TriFingerTypes::Frontend::get_applied_action

inline RobotStatus get_robot_status(const time_series::Index &t) const

Get robot status of time step t.

See also

robot_interfaces::TriFingerTypes::Frontend::get_status

inline time_series::Timestamp get_timestamp_ms(const time_series::Index &t) const

Get timestamp (in milliseconds) of time step t.

See also

robot_interfaces::TriFingerTypes::Frontend::get_timestamp_ms

inline time_series::Index get_current_timeindex() const

Get the current time index.

See also

robot_interfaces::TriFingerTypes::Frontend::get_current_timeindex

inline void wait_until_timeindex(const time_series::Index &t) const

Wait until time step t.

See also

robot_interfaces::TriFingerTypes::Frontend::wait_until_timeindex

inline CameraObservation get_camera_observation(const time_series::Index t) const

Get camera images of time step t.

Parameters:

t – Time index of the robot time series. This is internally mapped to the corresponding time index of the camera time series.

Returns:

Camera images of time step t.

inline T_TriFingerPlatformFrontend(robot_interfaces::TriFingerTypes::BaseDataPtr robot_data, std::shared_ptr<robot_interfaces::SensorData<CameraObservation>> camera_data)

Initialize with data instances for all internal frontends.

Parameters:
  • robot_data – RobotData instance used by the robot frontend.

  • object_tracker_data – ObjectTrackerData instance used by the object tracker frontend.

  • camera_data – SensorData instance, used by the camera frontend.

inline T_TriFingerPlatformFrontend()

Initialize with default data instances.

Creates for each internal frontend a corresponding mutli-process data instance with the default shared memory ID for the corresponding data type.

inline time_series::Index append_desired_action(const Action &desired_action)

Append a desired robot action to the action queue.

See also

robot_interfaces::TriFingerTypes::Frontend::append_desired_action

Returns:

The index of the time step at which this action is going to be executed.

inline RobotObservation get_robot_observation(const time_series::Index &t) const

Get robot observation of the time step t.

See also

robot_interfaces::TriFingerTypes::Frontend::get_observation

inline Action get_desired_action(const time_series::Index &t) const

Get desired action of time step t.

See also

robot_interfaces::TriFingerTypes::Frontend::get_desired_action

inline Action get_applied_action(const time_series::Index &t) const

Get actually applied action of time step t.

See also

robot_interfaces::TriFingerTypes::Frontend::get_applied_action

inline RobotStatus get_robot_status(const time_series::Index &t) const

Get robot status of time step t.

See also

robot_interfaces::TriFingerTypes::Frontend::get_status

inline time_series::Timestamp get_timestamp_ms(const time_series::Index &t) const

Get timestamp (in milliseconds) of time step t.

See also

robot_interfaces::TriFingerTypes::Frontend::get_timestamp_ms

inline time_series::Index get_current_timeindex() const

Get the current time index.

See also

robot_interfaces::TriFingerTypes::Frontend::get_current_timeindex

inline void wait_until_timeindex(const time_series::Index &t) const

Wait until time step t.

See also

robot_interfaces::TriFingerTypes::Frontend::wait_until_timeindex

inline CameraObservation get_camera_observation(const time_series::Index t) const

Get camera images of time step t.

Parameters:

t – Time index of the robot time series. This is internally mapped to the corresponding time index of the camera time series.

Returns:

Camera images of time step t.