ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

You can take a look here, you can publish it as either Odometry message or as PoseWithCovarianceStamped. According to this frame_id should be map/odom and child_link should be base_link.

You can take a look here, you can publish it as either Odometry message or as PoseWithCovarianceStamped. According to this frame_id should be map/odom and child_link should be base_link.

EDIT: You need to make and odom object of type Odometry(), and add information to it.

odom = Odometry()
odom.header.stamp = rospy.Time.now()
odom.header.frame_id = "odom"
odom.child_frame = "base_link"
odom.pose.pose.position.x = x         # x you read through your text file
odom.pose.pose.position.y = y         # y you read through your text file
pub.publish(odom)