The JSON implementation always uses JsonDataPack to exchange data with TFs. This datapack can contain arbitrary data in a JSON object. The gRPC implementation uses Protobuf DataPacks. Below are listed the protobuf message definitions used by the Gazebo engine:
For each of these definitions, a datapack Python class is generated, see here for more details. Concretely, these datapack types are generated:
In the case of the JSON implementation, even if JsonDataPack, the content of the datapacks data will be the same, but stored as a JSON object. This content is summarized below for each datapack type.
The GazeboCameraDataPack consists of the following attributes:
Attribute | Description | Python Type | C type |
---|---|---|---|
image_height | Camera Image height | uint32 | uint32 |
image_width | Camera Image width | uint32 | uint32 |
image_depth | Camera Image depth. Number of bytes per pixel | uint8 | uint32 |
image_data | Camera Image data. 1-D array of pixel data | numpy.array(image_height * image_width * image_depth, numpy.uint8) | std::vector<unsigned char> |
The GazeboJointDataPack consists of the following attributes:
Attribute | Description | Python Type | C type |
---|---|---|---|
position | Joint angle position (in rad) | float | float |
velocity | Joint angle velocity (in rad/s) | float | float |
effort | Joint angle effort (in N) | float | float |
The GazeboLinkDataPack consists of the following attributes:
Attribute | Description | Python Type | C type |
---|---|---|---|
pos | Link Position | numpy.array(3, numpy.float32) | std::array<float,3> |
rot | Link Rotation as quaternion | numpy.array(4, numpy.float32) | std::array<float,4> |
lin_vel | Link Linear Velocity | numpy.array(3, numpy.float32) | std::array<float,3> |
ang_vel | Link Angular Velocity | numpy.array(3, numpy.float32) | std::array<float,3> |
Each of this attributes can be accessed under their respective names from the data attribute of each DataPack type.