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

Imu data for robot_localization is reported in base_link, not in ENU

asked 2018-05-23 10:16:01 -0500

maecmep gravatar image

Hi there, I'm currently working on my first project with ROS trying to implement a SLAM algorithm.

Right now I'm stuck with fusing data to robot_localization.My IMU data is published in the base_link frame.

As mentioned in the documentation the IMU data should be in a ENU frame, not a base_link frame.

Is my understanding correct? If yes is there a way to transform from base_link to ENU? Or is there a way to use my data directly in robot_localization?

Thanks for any responds!

Regards

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted
5

answered 2018-05-24 06:33:07 -0500

Tom Moore gravatar image

Hrm, that's really a failing of the documentation.

The ENU (east/north/up) frame really just refers to which directions of motion the IMU considers to be positive or negative. An ENU-frame IMU will reported increasing yaw and positive yaw velocity when you rotate clockwise, for example. All IMUs are just assumed to report ENU-frame data in r_l.

This is different than the frame_id of the sensor. That value refers to the coordinate frame in which the sensor is mounted relative to your robot's centroid. So if your IMU is mounted 0.5 meters in front of the centroid, you could give it a frame_id of, say, imu_link, and then define a transform from base_link to imu_link that has an X offset of 0.5 meters.

In your case, the IMU is reporting its data in the base_link frame, so the authors are assuming that you are mounting the IMU at your vehicle's centroid. If this is not true, you can find the IMU driver's parameter for changing the frame_id, and then defining a static transform from base_link to your new frame_id.

So, in short: the ENU frame is just an assumption about how your IMU (really, its driver) is reporting the raw sensor data that the device produces. If your driver adheres to ROS standards, this shouldn't be a concern. The frame_id of the measurement specifies a tf frame that dictates how your sensor is mounted on your robot.

edit flag offensive delete link more

Comments

Hi,in REP103,it says :

By the right hand rule, the yaw component of orientation increases as the child frame rotates counter-clockwise, and for geographic poses, yaw is zero when pointing east.

This requires special mention only because it differs from a traditional compass bearing, which is zero when pointing north and increments clockwise. Hardware drivers should make the appropriate transformations before publishing standard ROS messages.

i.e. ENU-frame seems will report increasing yaw while rotateing anti-clockwise. So, which one is wrong?

Xyw gravatar image Xyw  ( 2021-06-30 01:41:17 -0500 )edit
0

answered 2018-06-04 05:52:12 -0500

maecmep gravatar image

Hey Tom, sorry for the late answer. I got so physical difficulties. Whatsoever, you're right. It was kind of confusing for me to read the documentation. What you are writing makes perfectly sense.

All the time I was wondering if my IMU reports the data in the right frame. It actually was, but I somehow tried to transform it. However...r_l is now running and I get data output.

For now I need to tune the covariances for the IMU to get some better data.

Thanks for your answer.

edit flag offensive delete link more

Comments

Would you mind updating the original question? This board is more of a Q&A format, rather than a thread. Would you mind also accepting my answer? Thanks!

Tom Moore gravatar image Tom Moore  ( 2018-06-04 10:17:52 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2018-05-23 10:16:01 -0500

Seen: 882 times

Last updated: Jun 04 '18