simulation
Interface specifications

A robot simulator. More...

#define | PLAYER_SIMULATION_REQ_GET_POSE2D 1
| Request/reply subtype: set 2D pose.
#define | PLAYER_SIMULATION_REQ_SET_POSE2D 2
| Request/reply subtype: get 2D pose.
#define | PLAYER_SIMULATION_REQ_GET_POSE3D 3
| Request/reply subtype: set 2D pose.
#define | PLAYER_SIMULATION_REQ_SET_POSE3D 4
| Request/reply subtype: get 2D pose.
#define | PLAYER_SIMULATION_REQ_GET_PROPERTY 5
| Request/reply subtype: set property value.
#define | PLAYER_SIMULATION_REQ_SET_PROPERTY 6
| Request/reply subtype: get property value.
#define | PLAYER_SIMULATION_CMD_PAUSE 1
| Cmd subtype: pause (if running) /resume (if paused) command.
#define | PLAYER_SIMULATION_CMD_RESET 2
| Cmd subtype: reset simulation command.
#define | PLAYER_SIMULATION_CMD_SAVE 3
| Cmd subtype: save simulation command.
typedef struct player_simulation_data | player_simulation_data_t
| Data. More...
typedef struct player_simulation_cmd | player_simulation_cmd_t
| Command. More...
typedef struct player_simulation_pose2d_req | player_simulation_pose2d_req_t
| Request/reply: get/set 2D pose of a named simulation object. More...
typedef struct player_simulation_pose3d_req | player_simulation_pose3d_req_t
| Request/reply: get/set 3D pose of a named simulation object. More...
typedef struct player_simulation_property_req | player_simulation_property_req_t
| Request/reply: get/set a property of a named simulation object. More...

## Detailed Description

A robot simulator.

Player devices may either be real hardware or virtual devices generated by a simulator such as Stage or Gazebo. This interface provides direct access to a simulator.

This interface doesn't do much yet. It is in place to later support things like pausing and restarting the simulation clock, saving and loading, etc.

Note: the Stage and Gazebo developers should confer on the best design for this interface. Suggestions welcome on playerstage-developers.

## Typedef Documentation

typedef struct player_simulation_cmd player_simulation_cmd_t

Command.

Just a placeholder for now; data will be added in future.

typedef struct player_simulation_data player_simulation_data_t

Data.

Just a placeholder for now; data will be added in future.

typedef struct player_simulation_pose2d_req player_simulation_pose2d_req_t

Request/reply: get/set 2D pose of a named simulation object.

To retrieve the pose of an object in a simulator, send a null PLAYER_SIMULATION_REQ_GET_POSE2D request. To set the pose of an object in a simulator, send a PLAYER_SIMULATION_REQ_SET_POSE2D request (response will be null).

typedef struct player_simulation_pose3d_req player_simulation_pose3d_req_t

Request/reply: get/set 3D pose of a named simulation object.

To retrieve the pose of an object in a 3D simulator, send a null PLAYER_SIMULATION_REQ_GET_POSE3D request. To set the pose of an object in a 3D simulator, send a PLAYER_SIMULATION_REQ_SET_POSE3D request (response will be null).

typedef struct player_simulation_property_req player_simulation_property_req_t

Request/reply: get/set a property of a named simulation object.

To retrieve an property of an object in a simulator, send a
  PLAYER_SIMULATION_REQ_GET_PROPERTY request. The server will reply with the value array filled in. The type of the data varies by property and it is up to the caller to cast the data to the correct type: see the warning below.

To set a property, send a completely filled in
  PLAYER_SIMULATION_REQ_SET_PROPERTY request. The server will respond with an ACK if the property was successfully set to your value, else a NACK.

WARNING Types are architecture-dependent, so this feature may
  not work correctly if the simulator is running on a different architecture than your client. The value bytes are transmitted as a raw binary object: no architecture-specific type conversions are performed. Use with caution.

Last updated 12 September 2005 21:38:45