0
$\begingroup$

Rosanswers logo

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.


Originally posted by Anis on ROS Answers with karma: 253 on 2014-01-13

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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!


Originally posted by Anis with karma: 253 on 2014-01-13

This answer was ACCEPTED on the original site

Post score: 2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.