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

How to visualize IMU data in Rviz

asked 2016-10-23 23:46:11 -0600

Cerin gravatar image

I'm publishing sensor_msgs.msg.Imu messages with frame imu on topic /imu/data_raw, and I'm trying to view it in Rviz via rviz_imu_plugin. However, when I enable the plugin and set the topic, the console reports:

[ WARN] [1477283997.473557284]: MessageFilter [target=map ]: Dropped 100.00% of messages so far. Please turn the [ros.rviz_imu_plugin.message_notifier] rosconsole logger to DEBUG for more information.

and Rviz shows the plugin error:

Transform [sender=unknown_publisher]
For frame [imu]: Fixed Frame [map] does not exist

What do these mean? Obviously, something's not configured correctly, but these messages are unusably vague.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-10-24 02:38:15 -0600

gvdhoorn gravatar image

RViz needs to know what the incoming messages are relative to, which in RViz is always called the Fixed Frame.

In this case you have your Fixed Frame set to map, but that isn't published by any authority in your node graph. So RViz complains that it cannot find the map frame. That in turn causes the entire visualisation of incoming data to fail, as the Fixed Frame is always at the root of all of RViz's transforms.

In this particular case, I'm guessing you only have a single node publishing your sensor_msgs/Imu msg. So to get RViz to succesfully visualise that data, you'll have to configure it to use your imu frame as the Fixed Frame.

Obviously, something's not configured correctly, but these messages are unusably vague.

But it is one which has a lot of Q&As that turn up in a search. And I'm sure I'm biased, but the error message does state what is actually wrong.

It would be nice if you could improve on the error message though: if you have an idea how to do that, I'm sure a PR would be accepted over at ros-visualization/rviz.

edit flag offensive delete link more


When I changed my IMU messages to use "base_link", that fixed the error.

Cerin gravatar image Cerin  ( 2016-10-24 11:36:01 -0600 )edit

That is also a possibility, provided that there is a known transform between base_link and imu.

gvdhoorn gravatar image gvdhoorn  ( 2016-10-24 11:37:29 -0600 )edit

Also: I'd not recommend using base_link as the frame_id for a message from an IMU, unless the sensor is actually mounted on the base_link of your robot (and even that is questionable, as there will (almost) always be some kind of offset between the two).

gvdhoorn gravatar image gvdhoorn  ( 2016-10-24 11:55:45 -0600 )edit

Yes, in my case, the IMU is mounted on the base_link, but that's a good point about the offset, which there is.

Cerin gravatar image Cerin  ( 2016-10-24 14:31:34 -0600 )edit

Question Tools

1 follower


Asked: 2016-10-23 23:46:11 -0600

Seen: 7,993 times

Last updated: Oct 24 '16