Class robot_interfaces::MultiProcessRobotData

template<typename Action, typename Observation>
class MultiProcessRobotData : public robot_interfaces::RobotData<Action, Observation>, public robot_interfaces::RobotData<Action, Observation>

RobotData instance using multi process time series.

Use this class if modules accessing the data are running in separate processes. When all modules run as threads in the same process, this class can be used as well, however, SingleProcessRobotData might be more efficient in that case.

Public Functions

inline MultiProcessRobotData(const std::string &shared_memory_id_prefix, bool is_master, size_t history_length = 1000)

Construct the time series for the robot data.

Todo:

Make this constructor protected and implement factory methods like in MultiprocessTimeSeries..

Parameters:
  • shared_memory_id_prefix – Prefix for the shared memory IDs. Since each time series needs its own memory ID, the given value is used as prefix and unique suffixes are appended. Make sure to use a prefix that cannot lead to name collisions on your system.

  • is_master – If set to true, this instance will clear the shared memory on construction and destruction. Only one instance should act as master in a multi-process setup.

  • history_length – History length of the time series. Ignored if is_master == false.

inline MultiProcessRobotData(const std::string &shared_memory_id_prefix, bool is_master, size_t history_length = 1000)

Construct the time series for the robot data.

Todo:

Make this constructor protected and implement factory methods like in MultiprocessTimeSeries..

Parameters:
  • shared_memory_id_prefix – Prefix for the shared memory IDs. Since each time series needs its own memory ID, the given value is used as prefix and unique suffixes are appended. Make sure to use a prefix that cannot lead to name collisions on your system.

  • is_master – If set to true, this instance will clear the shared memory on construction and destruction. Only one instance should act as master in a multi-process setup.

  • history_length – History length of the time series. Ignored if is_master == false.