0
$\begingroup$

Rosanswers logo

I have robot_pose_ekf running nicely, publishing both the transform odom_combined → base_footprint as well as the topic robot_pose_ekf/odom_combined (geometry_msgs/PoseWithCovarianceStamped)

The transform shows up well in rviz, reflecting robot moves correctly. But I am unable to see robot_pose_ekf/odom_combined. When I enter that topic as an odometry type, of course, I get a mismatch error (expecting nav_msgs/Odometry, received geometry_msgs/PoseWithCovarianceStamped, disconnecting). I also tried entering it as a Pose, but rviz then is looking for geometry_msgs/PoseStamped so the message again gets disconnected.

So how do I get robot_pose_ekf/odom_combined to display in rviz?


Originally posted by dan on ROS Answers with karma: 875 on 2013-08-26

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

I think I partly figured this out. The odometry example from here: http://www.ros.org/wiki/navigation/Tutorials/RobotSetup/Odom publishes both an odometry topic and a transform. The odometry topic (along with an Imu topic) is subscribed to by robot_pose_ekf, which then publishes a PoseWithCovarianceStamped topic and a transform. The difference can be seen by comparing the two transforms. In general, seems like a bad idea to be publishing both transforms, since it breaks the transform tree structure to have two tfs relating the same relationships.

So my thought is to stop publishing the tf from the odometry node, only publish the odom Odometry topic from there and not bother publishing the PoseWithCovarianceStamped odom_combined topic from ekf (since I cannot find any subscribers to that topic) and only publish the tf from there.

Is that right? It feels weird and certainly is not discussed in the tutorials, so I suspect I am missing something important, but this is my best guess at this point.


Originally posted by dan with karma: 875 on 2013-08-27

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by jep31 on 2013-08-27:
Yes, you are right but you can publish both transforms without any problem. If the tree is broken it's because you put two parents to the same children.You can have one frame as origin, often this is odom and two children frames /pose and /pose2. check your TF tree to respect this constraint.

$\endgroup$

Your Answer

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