0
$\begingroup$

Rosanswers logo

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 http://i60.tinypic.com/1oq7oj.jpg

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


Originally posted by that_guy318 on ROS Answers with karma: 25 on 2015-02-08

Post score: 1


Original comments

Comment by jafecasu on 2016-04-04:
I have the same situation. Did you solve the problem?

Comment by that_guy318 on 2016-04-05:
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

Comment by jafecasu on 2016-04-10:
Thank you very much. I will try it. Regards

Comment by jafecasu on 2016-04-17:
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?

Comment by that_guy318 on 2016-04-17:
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.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

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.


Originally posted by Stefan Kohlbrecher with karma: 24361 on 2015-02-08

This answer was ACCEPTED on the original site

Post score: 3


Original comments

Comment by that_guy318 on 2015-02-08:
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?

Comment by Stefan Kohlbrecher on 2015-02-09:
You're on the right track with http://answers.ros.org/question/202709/issue-trying-to-modify-bag-contents-with-python/ :)

Comment by that_guy318 on 2015-02-09:
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.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.