Ask Your Question

Frames in robot_localization: input messages and core state vector

asked 2020-03-22 23:45:12 -0500

yanmingz gravatar image

I am confused with frames used in robot_localization. Below is my understanding: In core state vector, the pose is defined as world->base_link and velocities and accelerations are defined in base_link frame. For input messages, the pose should be defined as (user_frame)->baselink, but there is no requirement on velocities and accelerations. The node will take care of other necessary frame transforms.

If I am correct, then for a message whose

  1. pose and velocity are both useful for fusion
  2. child_frame_id is not base_link, but sensor frame, like "camera"

then I need to do frame transform outside the node to let its pose proterty express the pose of base_link, while keep the velocity untouched and expressed in sensor frame.

This makes me confused, since usually it would be better to express varables in one frame. Am I wrong? Or are there any reasons for this design?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2020-03-23 13:57:03 -0500

You can provide your sensor data to robot localization in their native frames. R_L will take your TF tree to transform your positions and vector values into the global frame of your choice in the configuration file.

The output will be in the base_frame frame -- but you don't need to worry about the transformations as long as your frame (say camera) in the message header is valid and connected to your base_frame in some way via TF.

edit flag offensive delete link more


Acctually, I wish the node could work in the way you described. But I could not find the code to check the tf tree for child_frame_id and base_link for pose. Could you point it to me if you find it? Thanks a lot.

yanmingz gravatar image yanmingz  ( 2020-03-24 01:20:08 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-03-22 23:45:12 -0500

Seen: 22 times

Last updated: Mar 23