Ask Your Question
0

How to visualize depthimages from rosbag file with RViz?

asked 2016-08-07 07:11:00 -0500

lisa gravatar image

I have a *.bag file which contains depthimages from a Kinect 2 Camera. I want to visualize them in rviz and convert them to point clouds.

So far, I don't succeed in visualizing the data in rivz. There is the following warning:

Global Status: Warn
Fixed Frame No tf data. Actual error: Fixed Frame [map] does not exist

I'm not really sure where to go from here on and would be thankful the more detailed the instructions are.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2016-08-08 10:54:31 -0500

Marcin Bogdanski gravatar image

updated 2016-08-08 17:43:38 -0500

RViz requires not only data to display, but also TF transform information that is published on separate topic. If TF data was not generated when .bag file was recorded, then it would be missing. Thus you probably need to spoof some dummy TF transform, just so RViz is happy.

The other problem is that, to spoof TF data correctly, you need to spoof them with timestamps corresponding to data from .bag file. Which means you need to use simulated clock from bag file.

Try the following:

1) start roscore as normal

2) setup roscore to use simulation time (I read that rosbag should do it automatically, but it didn't seem to work for me):

rosparam set use_sim_time true

3) start dummy TF transform

rosrun tf static_transform_publisher 0 0 0 0 0 0 map dummy_frame 100

Where:

  • 0 0 0 0 0 0 is offset and rotation for child frame "dummy_frame" - this does not matter
  • map is source "global" frame - this is the one you are missing (this should really be fixed in RViz, if no frames, then assume global frame exists with default name?)
  • dummy_frame - static_transform_publisher needs some child frame to work with - does not matter
  • 100 - publish rate in ms

4) Play bag file along with clock signal for other ROS nodes

rosbag play --clock mydata.bag

5) Start Rviz

Hope this helps.

edit flag offensive delete link more

Comments

Thank you for your detailed answer. It was so clear, I succeed on first try =)

lisa gravatar imagelisa ( 2016-08-08 14:21:11 -0500 )edit

I just realized parameter description got folded into one long unreadable blob. Now fixed. Happy to help.

Marcin Bogdanski gravatar imageMarcin Bogdanski ( 2016-08-08 17:44:24 -0500 )edit
1

answered 2016-08-08 01:52:51 -0500

Nico__ gravatar image

Hi,

The issue is your fixed frame, you need to set in which frame your point cloud is expressed. You can find it by doing "rostopic echo name_of_topic | grep frame_id" after launching your bag file.

Then change your fixed frame on Rviz to the name of that frame.

Nico

edit flag offensive delete link more

Comments

Unfortunately, I only received another warning (WARNING: topic [/name_of_topic] does not appear to be published yet). However, the other answer worked. Thanks for the help!

lisa gravatar imagelisa ( 2016-08-08 14:24:01 -0500 )edit

My bad by name_of_topic I meant your actual name of topic =) but yes Marcin Bogdanski answer is very clear !

Nico__ gravatar imageNico__ ( 2016-08-08 21:08:30 -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: 2016-08-07 07:11:00 -0500

Seen: 2,257 times

Last updated: Aug 08 '16