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

Does the package robot_localization need the position transform between sensors?

asked 2023-02-24 03:25:49 -0500

peter_feng gravatar image

My robot has a IMU sensor and a GPS.Now I want to use the package robot_localization.

How have I published the position transform?

For instance,I set the frame_id of IMU sensor to 'imu', set the frame_id of GPS to 'gps' and the robot's frame_id is 'base_link'.

So I publish the transform to the node /tf:

For IMU sensor,frame_id is 'base_link' and child_frame_id is 'imu', x:... y:... z:...

For GPS,frame_id is 'base_link' and child_frame_id is 'gps', x:... y:... z:...

Am I right?Will the robot_localization package automatically acquire these transforms when doing merging?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2023-06-05 06:34:38 -0500

The best is probably to have all these frames defined in a URDF. This is basically the model of your robot.

robot_state_publisher can parse it and publish both the fixed and time-varying transforms.

edit flag offensive delete link more

Comments

Yes, this is the correct way to go, @peter_feng, and the EKF will still work with the transforms when they are defined this way.

Tom Moore gravatar image Tom Moore  ( 2023-06-05 06:36:28 -0500 )edit

Does using the static transform publishers from base_link to imu_link and gps_link not suffice? (i.e. define base_link as COR and broadcast static transform between [-0.5,0,0] if IMU is 0.5 m behind the COR)

chased11 gravatar image chased11  ( 2023-06-05 15:35:31 -0500 )edit

Yes, using a static_transform_publisher is fine, and was my original suggestion, but putting together a URDF model for your bot is always a good idea.

Tom Moore gravatar image Tom Moore  ( 2023-06-06 03:44:40 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2023-02-23 21:05:40 -0500

Seen: 100 times

Last updated: Jun 05 '23