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

Tf2: using various odom frames

asked 2021-06-09 18:03:34 -0500

Qurupeco01 gravatar image

updated 2022-05-28 17:06:26 -0500

lucasw gravatar image

I am trying to setup a car-like robot using ROS kinetic that has a zed camera, that measures odom (only pose) and imu, and a gps sensor that measues gps, imu and odometry, and I'm having a little trouble on understanding how to setup my transform tree for using the robot_localization package. I have already read REP 105, and I want to set the base_link at the cog of the car, and none of my sensors is located at that cog.

My doubt comes at the time of setting the tf tree, as I understand relationship map -->odom -->base_link, and also how to setup, for example, base_link-->zed_base_link, but I don't know if I need more than one odom frame. The car is a rigid object, but both camera and gps are located at different x coordinate, so I'm not sure if I have to setup, for example, an odom-->zed_odom tf, base_link-->zed_odom-->zed_base_link, or if is correct to use the odom frame directly in both camera and gps for odometry measurements. Also, if I had to setup that transform, how could I know relationship between my cog frames and sensor frames??

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2021-09-06 07:25:43 -0500

Tom Moore gravatar image

r_l doesn't handle this use case well. You are trying to fuse absolute pose data from a sensor that is mounted on your robot, with an offset from the vehicle centroid. The package generally assumes that anything below the base_link_frame in the transform tree is providing data (usually velocity) that is relative to the body or sensor frame. Likewise, it assumes that pose data is either in your EKF's world_frame, or that there is a direct transform between that world frame and the frame of the data you are trying to fuse (e.g., if you were fusing data from an external camera system, and that system was in a different coordinate frame than your robot, you'd need to define a transform from one frame to the other).

The one exception here is GPS data. navsat_transform_node should be handling any offsets from the vehicle centroid, even when the GPS frame is specified relative to base_link.

For your zed camera, you might try using differential mode on that sensor input, or maybe see if there's a way to get the camera to output velocity data directly.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2021-06-09 18:03:34 -0500

Seen: 257 times

Last updated: Sep 06 '21