ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
I just found the error. It is in here
robot.OdomCombinedSubscriber = nh.subscribe<nav_msgs::odometry>("/robot_pose_ekf/odom_combined", 10, &TurtlebotRobot::OdometryCombinedCallback, &robot);
The message type should be geometry_msgs::PoseWithCovarianceStamped and not <nav_msgs::odometry>
I changed instruction to robot.OdomCombinedSubscriber = nh.subscribe<geometry_msgs::posewithcovariancestamped>("/robot_pose_ekf/odom_combined", 10, &TurtlebotRobot::OdometryCombinedCallback, &robot); and it worked!
2 | No.2 Revision |
I just found the error. It is in here
robot.OdomCombinedSubscriber = nh.subscribe<nav_msgs::odometry>("/robot_pose_ekf/odom_combined", 10, &TurtlebotRobot::OdometryCombinedCallback, The message type should be
geometry_msgs::PoseWithCovarianceStamped
geometry_msgs::PoseWithCovarianceStamped
and not <nav_msgs::odometry>nav_msgs::odometry
I changed instruction to
robot.OdomCombinedSubscriber =