Ask Your Question
1

Issues with RViz and Displaying IMU data

asked 2015-02-08 12:58:21 -0500

that_guy318 gravatar image

updated 2015-02-08 13:00:07 -0500

I have a bunch of bags that were recorded from sensor nodes during an experiment a month ago. Right now I'm trying to get some sort of visualization working from the IMU data, beyond plotting the values in rqt. Ideally some sort of visualization of the acceleration vector.

I've been trying to use RViz to display the data, but haven't had any luck. When I try to add a visualization by topic it shows my sensor_msgs/imu_msg message on my imu_chatter topic, but when I select it I get an error saying "Transform [sender=unknown_publisher] For frame []: Fixed Frame [map] does not exist". It does have a green checkmark next to the topic.

image description

This is my first time using RViz, so I really don't know what's going on. Any ideas as to what is wrong?

edit retag flag offensive close merge delete

Comments

1

I have the same situation. Did you solve the problem?

jafecasu gravatar imagejafecasu ( 2016-04-04 23:42:49 -0500 )edit

Yes I did. I had to go in and manually add a frame id to the bagfiles. I wrote a quick Python script to update the bags. It's been about a year since I've messed with any of this, so hopefully this still works.

Here's the link to that script on github (had to shorten) https://goo.gl/mCegBY

that_guy318 gravatar imagethat_guy318 ( 2016-04-05 20:06:53 -0500 )edit

Thank you very much. I will try it. Regards

jafecasu gravatar imagejafecasu ( 2016-04-10 18:32:13 -0500 )edit

Hi, I was trying your code, but I got an error..

IOError: [Errno 2] No such file or directory: 'input.bag'

Do I have to write an script to make a tf?? or Do I have to write also an script to record such bag files?

jafecasu gravatar imagejafecasu ( 2016-04-17 17:11:35 -0500 )edit

You didn't give the script any input or output files then, input.bag (in directory you ran script from) is what it defaults if you give it no arguments.

that_guy318 gravatar imagethat_guy318 ( 2016-04-17 18:03:56 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
3

answered 2015-02-08 13:13:33 -0500

Looks like you forgot to set a frame_id when you recorded your IMU data. If you look at the rviz "Global Options" (top left) you see the "Fixed Frame". This is the fixed frame used by rviz and all data you try to visualize has to be transformable into this fixed frame (i.e. has to be connected in the tf tree).

I never tried this, but maybe you can make your IMU data display work by setting the fixed frame to be a empty string in rviz. If not, you'll likely want to process your bagfile data to add the missing frame_id. You can then set the the rviz "Fixed Frame" to the same frame_id and have your data visualized.

edit flag offensive delete link more

Comments

That's probably the problem. I've only started using ros recently, so I don't know entirely what I'm doing here.

Anyway, I did try making the fixed frame field blank, but then I get Transform [sender=unknown_publisher] Unknown reason for transform failure.
How would I go about adding a frame_id?

that_guy318 gravatar imagethat_guy318 ( 2015-02-08 13:44:15 -0500 )edit
1

You're on the right track with http://answers.ros.org/question/20270... :)

Stefan Kohlbrecher gravatar imageStefan Kohlbrecher ( 2015-02-09 02:13:33 -0500 )edit

Ok, so I finally did manage to get frame ids written to the bag (wish there was better documentation for the ros cookbook), and now it does display the acceleration vector. Thanks.

that_guy318 gravatar imagethat_guy318 ( 2015-02-09 05:33:35 -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

Stats

Asked: 2015-02-08 12:58:21 -0500

Seen: 3,538 times

Last updated: Feb 08 '15