ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
You should probably use ROS data types instead of trying to just have a multi-dimensional array of floats. This would make it much easier to directly interpret what's inside each message.
What you really want to do is send a list of poses (= translation + orientation), correct? In that case, your message could look like this:
MyPoseList.msg
Header header
geometry_msgs/Pose[] poses
To get the x dimension of the first pose, you would write mymsg.poses[0].position.x
.
Two more things:
Pose
message has a orientation
field that's a quaternion. Please search other answers here that explain how to convert between quaternions and Euler angles.header
field. It would perhaps be better to remove the header
field and instead use PoseStamped
messages; that way, you could specify a different time stamp for each pose.