ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

Change tf Transform provided by rtabmap_ros rgbd_odometry

asked 2021-09-10 14:14:03 -0500

seanb gravatar image

I was wondering if it was possible to change the tf transform provided by the rgbd_odometry node. By default the published transform is from parent frame "odom" to child frame "base_link". I had hoped that changing the "odom_frame_id" and " frame_id" parameters might do the trick, but all this does is give me a floating frame in my tf tree with name "odom_frame_id".

My use case is that I am running a bagfile with odom frame provided, and am hoping to observe the effects of visual odometry instead. Thus rgbd_odometry publishing the transform odom -> base_link is conflicting with data from the bagfile, when I would like to ignore the bagfile odometry data completely.

If anyone has answers I would greatly appreciate some help.

edit retag flag offensive close merge delete

Comments

I've not used rtabmap. Have you tried modifying launch file to just not run the node? Or if it's a one-time test, do a rosnode kill on it after things have started up?

Mike Scheutzow gravatar image Mike Scheutzow  ( 2021-09-12 10:45:41 -0500 )edit

Sorry if I'm misunderstanding your comment, but I actually do want the rgbd_odometry node (within the rtabmap_ros package) running to provide odometry. This node takes in camera data and publishes odometry in two ways:

  • By publishing a nav_msgs/Odometry message to the /odom topic
  • By publishing a tf transform odom -> base_link to the /tf topic

I would like to change the tf transform published by this node, since the bagfile I am running already publishes a tf transform with the same parent and child frames. So far I have been unable to find any means of doing so.

seanb gravatar image seanb  ( 2021-09-12 17:28:35 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-09-13 11:14:48 -0500

matlabbe gravatar image

Based on this section: http://wiki.ros.org/rtabmap_ros#Visua..., you could change those parameters:

~frame_id (string, default: "base_link")

The frame attached to the mobile base.

~odom_frame_id (string, default: "odom")

The odometry frame.

rosrun rtabmap_ros rgbd_odometry _frame_id:=base_frame _odom_frame_id:=odom_frame odom:=odom_topic_name

However, if your bag is providing already TF between odom and base_link frames, without modifying the bag or breaking the Tf Tree (to avoid two parents for base_link), you can use it as guess for rgbd_odometry:

rosrun rtabmap_ros rgbd_odometry _frame_id:=base_link _odom_frame_id:=vo_odom odom:=vo_odom _guess_frame_id:=odom

Other option is to remove completly your odom frame from TF from your bag using a script similar to this: http://official-rtab-map-forum.206.s1...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2021-09-10 14:14:03 -0500

Seen: 306 times

Last updated: Sep 13 '21