The question what is the Vector3Stamped
The geometry_msgs/Vector3Stamped
message represents a Vector3
with reference coordinate frame and timestamp. For example, consider your robot moving and publishing its position in 3D as a Vector (x, y, z). This Vector makes sense only when you define a reference coordinate system called a coordinate frame. Because the robot is publishing its position while moving, you need to track the time. Therefore, given 2 Vector3
, you simply check their time value to differentiate between them. This time value is called timestamp.
The geometry_msgs/Vector3Stamped.msg
is defined as following:
# Header contains reference coordinate frame and timestamp
std_msgs/Header header
geometry_msgs/Vector3 vector
Please feel free to check here.
how we can publish the data for odometry
Publishing odometry information over ROS is generally done using nav_msgs/Odometry.msg
. The nav_msgs/Odometry.msg
represents an estimate of a position and velocity in free space. Please check here for the message definition. There is an excellent tutorial titled "Publishing Odometry Information over ROS." Please check here to view this tutorial.