Hi,
First of all, rtabmap is a very interesting, and useful tool. Thanks. I have a question regarding its use. I'm performing slam using rtabmap (odom, lidar and kinect) --using datasets from a pr2. The problem is that the pr2 is publishing a tf for odometry (odom_combined -> base_footprint), and rtabmap is also publishing an map -> odom. In fact, I have two separate trees in my tf structure (image attached). I'm new to the pr2 platform but I have seen that there is a EKF node that calculates a more accurate pose using the odometry and it is the one that is publishing the odom_combined tf. I can see the map in rviz (if a use the fixed frame odom) but I cannot display the inputs from the sensors because there is no transformation between map and odom_combined, so I have no localization. I have seen in your stereo camera example that you filtered out the odom_combined tf, and so I did. But I still have two separate trees. I cannot figure out if I am missing a parameter to rename the odom frame id published by rtabmap, or if I can keep the odom_combined from EKF node (disable the odom tf from rtabmap) and make a transformation between the map to odom_combined. I would appreciate your help or suggestions. Best regards |
Administrator
|
Hi,
You don't have to remove any TF from the PR2 bag. If you are referring to demo_stereo_pr2.launch file, the TF was removed because we were testing visual odometry from stereo (so we wanted to ignore the recorded odometry from EKF). rtabmap node subscribes to a nav_msg/Odometry topic (in your case it must be a topic from the EKF node, are the Odometry msgs recorded in the bag?). Make sure the frame id inside the recorded odometry messages is correct: header.frame_id = "odom_combined" Regarding the TF tree, your would have something like this: /map -> /odom_combined -> /base_footprint -> base_link ..."where rtabmap publishes "/map -> /odom_combined" and EKF node publishes (or topics recorded in the bag) "/odom_combined -> /base_footprint". |
Hi,
Thank you for your prompt reply. I have checked the topics in the bag and yes, it has nav_msg/Odometry messages. The odometry messages come from the wheel controllers (base_odometry/odom) not from the robot_pose_ekf node. The EKF node only publishes the robot_pose_ekf/odom_combined topic which is of type geometry_msgs/PoseWithCovarianceStamped . As you said, rtabmap subscribes to a topic of type nav_msg/Odometry, so I am subscribing to base_odometry/odom, the only one I have. In the launch file I have set: <remap from="odom" to="/base_odometry/odom"> But still I have the issue with the divided trees in the tf structure. I also checked the topic's header and it has frame_id=odom because it comes from the base odometry controller and not from the EKF node. I have checked the documentation of the robot_pose_ekf and it does not publish any topic of type nav_msg/Odometry. However, the only transformation between odometry data and the base_footprint is published by robot_pose_ekf (odom_combined -> base_footprint). If I change the frame_id from the /base_odometry/odom topic to "odom_combined" will it be consistent with the topic I'm telling rtabmap to subscribe to (/base_odometry/odom)? Cheers, |
Administrator
|
Hi,
The best is to make a node to convert geometry_msgs/PoseWithCovarianceStamped to nav_msgs/Odometry. You only have to copy the "header" and the "pose". The "child_frame_id" and "twist" are not used by rtabmap node. The pose's covariance published by robot_pose_ekf should not grow without bounds: if you are not sure, set covariance to null. Note that with latest code on GitHub, rtabmap node could also be set to use TF instead of nav_msgs/Odometry by setting parameter "odom_frame_id". Regards, Mathieu |
Hi Mathieu,
Thanks for the suggestions. I did the converting node (odom_combined to odom), and now I have a consistent tf tree. Also, thanks for the tip on the new rtabmap version using tf. Much appreciated, Ricardo |
Free forum by Nabble | Edit this page |