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
4

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
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 imageTom Moore ( 2018-06-04 10:17:52 -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

Stats

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

Seen: 165 times

Last updated: Jun 04 '18