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

Input to robot_pose_ekf from IMU and Encoder frames IDs ?

asked 2014-07-09 09:53:06 -0500

2ROS0 gravatar image

updated 2014-07-15 12:19:22 -0500

Hi,

I'm running the robot_pose_ekf node subscribing to the /imu and /encoder. What should be the frame ID's of the msgs on those topics?

Currently, my /encoder has frame_id: odom_combined and child_frame_id: base_footprint while my /imu has frame_id: base_link. My tf tree is odom->base_footprint->base_link

Will that ^ be a problem considering that my /encoder msg has a frame_id which is not even on my tree (not being broadcast). The node doesn't throw any errors so I am wondering if robot_pose_ekf actually uses the frame_id?

Thank you very much

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-07-15 07:08:44 -0500

Tom Moore gravatar image

updated 2014-07-15 15:36:58 -0500

Edited response after the original question changed:

Given that you said that everything is working, you may be fine, but personally, I would want the frame_id of my input odometry data (in your case, the /encoder messages) to be identical to the frame that is being broadcast by robot_pose_ekf (i.e., the frame_id of its output odometry messages). I'm guessing robot_pose_ekf transforms all measurement data into the target frame before integrating them, and I'm presuming you don't have any transforms defined from odom_combined->odom, so it's probably a good idea to make sure the frames match. Just make sure that whatever is producing /encoder is not also publishing a transform from its frame_id to its child_frame_id.

Then again, if those frames didn't match, and you didn't have a transform from odom_combined->odom defined, and robot_pose_ekf was, in fact, transforming input messages into the target frame_id, then I don't see how it could all be working.

edit flag offensive delete link more

Comments

Thank you for your answer. I meant that the frame_id of the /encoder "odom_combined" is not on my tree and not the child_frame_id. I only have "odom" in the tree. I have made the edit in the question. Thanks.

2ROS0 gravatar image 2ROS0  ( 2014-07-15 12:19:03 -0500 )edit

My guess was that robot_pose_ekf doesn't really look at the frame and assumes they are in a certain frame. In any case, I changed the frame_id and child_frame_id of the /encoder msg to be odom and base_footprint respectively. And I changed the /imu frame_id to be base_footprint.

2ROS0 gravatar image 2ROS0  ( 2014-07-15 17:52:43 -0500 )edit

Should this be fine? Or does /imu have to be in odom? I am asking because although the output *seems* to be alright, I don't want it to have a problem later on. Thank you for your responses :)

2ROS0 gravatar image 2ROS0  ( 2014-07-15 17:53:43 -0500 )edit

You can make the frame_id of the IMU base_footprint, but that assumes it has no rotational or translational offset from the base_footprint frame. The IMU typically has its own frame that is a child of base_link or base_footprint. I'd use static_transform_publisher to define that transform.

Tom Moore gravatar image Tom Moore  ( 2014-07-15 23:24:05 -0500 )edit

I would have thought so too. But the robot I am working with (Clearpath Husky) publishes the IMU info in the base_footprint frame. So I don't think they have a frame defined for the IMU in the default start-up.

2ROS0 gravatar image 2ROS0  ( 2014-07-15 23:44:33 -0500 )edit

Also, I am assuming that since the IMU is mounted fairly securely to the robot, there will be no rotational or translational offset from the base_footprint.

2ROS0 gravatar image 2ROS0  ( 2014-07-15 23:45:09 -0500 )edit

It's not really a question of the security of the mount. If you had a robot (and I realize you don't) whose IMU was mounted, say, upside-down, you'd have to define a transform from base_link to imu with pi radians of roll. If the Husky reports the IMU in base_footprint, you're fine.

Tom Moore gravatar image Tom Moore  ( 2014-07-16 00:28:24 -0500 )edit

@pmukherj, can you verify?

Tom Moore gravatar image Tom Moore  ( 2014-07-16 00:29:20 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2014-07-09 09:53:06 -0500

Seen: 982 times

Last updated: Jul 15 '14