ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
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 }
2 | No.2 Revision |
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 }