ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

Problem with subscribing to robot_pose_ekf/odom_combined

asked 2014-01-13 20:46:11 -0500

Anis gravatar image

I am working with Turtlebot. I launched the following launch files containing openni, minimal.launch, depthimage_to_laserscan and robot_pose_ekf

On the workstation, When I run the command rostopic list I can see both /odom and /robot_pose_ekf/odom_combined in the list of topics.

Even when I run rostopic echo /robot_pose_ekf/odom_combined I can see the content of the that topic on the terminal.

Now, the problem when I subscribe to this topic in my C++ file like this

robot.OdomCombinedSubscriber = nh.subscribe<nav_msgs::odometry>("/robot_pose_ekf/odom_combined", 10, &TurtlebotRobot::OdometryCombinedCallback, &robot);

There is nothing received in the callback. When this instruction is executed, there is a error message in red in the Tutrlebot saying:

[ERROR] [1389688193.050254972]: Client [/testApp] wants topic /robot_pose_ekf/odom_combined to have datatype/md5sum [nav_msgs/Odometry/cd5e73d190d741a2f92e81eda573aca7], but our version has [geometry_msgs/PoseWithCovarianceStamped/953b798c0f514ff060a53a3498ce6246]. Dropping connection.

I got a similar error for the bumper message but this was when I was using Groovy on turtlebot and Hydro on workstation. Now, I put both to hydro but still I got the message above.

Any help will be appreciated.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2014-01-13 20:53:58 -0500

Anis gravatar image

updated 2015-07-12 11:38:36 -0500

130s gravatar image

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!

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2014-01-13 20:46:11 -0500

Seen: 1,721 times

Last updated: Jul 12 '15