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

Check the type of "/odom" topic. Use rostopic type /odom. I donot have access to my turtlebot at present. But if I am not wrong, /odom topic is of type nav_msgs/Odometry.

Try the following

void poseCallback(const nav_msgs::OdometryConstPtr& msg){  std::cout << msg->pose.pose.position.x << std::endl }

Check the type of "/odom" topic. Use rostopic type /odom. /odom. I donot have access to my turtlebot at present. But if I am not wrong, /odom topic is of type nav_msgs/Odometry.

Try the following

void poseCallback(const nav_msgs::OdometryConstPtr& msg){  std::cout << msg->pose.pose.position.x << std::endl }