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

Which is the frame used by Gmapping for the camera topic? [closed]

asked 2016-04-18 07:15:30 -0500

Pandaii gravatar image

updated 2016-04-18 14:07:31 -0500

gvdhoorn gravatar image

Hi!

My robot always end up to loose himself "Deleting nodes..." and I suspect a problem with Gmapping.

I would like to know how to determine which is the frame used by Gmapping for the camera topic. Documentation says :

Required tf Transforms

<the frame attached to incoming scans> → base_link"

But how do I know what frame is attached to a particular topic?

I use an Asus Xtion and the package Depth Image to Laserscan.

Many thanks :-)

edit retag flag offensive reopen merge delete

Closed for the following reason the question is answered, right answer was accepted by Pandaii
close date 2016-04-18 16:01:38.754329

2 Answers

Sort by » oldest newest most voted
1

answered 2016-04-18 14:49:09 -0500

ahendrix gravatar image

The frame_id field in the header for each message indicates which frame the data is attached to.

You can see the header as part of the output from rostopic echo /topic, or if you want to see just the header on /topic, you can use rostopic echo /topic/header.

edit flag offensive delete link more
1

answered 2016-04-18 07:33:53 -0500

Short answer: run rosrun tf view_frames and it will show you the transform tree.

Long answer: Gmapping provides /map-->/odom. You need to provide /odom-->/base_link-->/laser (or whatever you call it). Depthimage_to_laserscan has a parameter that allows you to set the name of the sensor frame. If you leave it blank it defaults to camera_depth_frame. I have not used the openni2 package before, which I am assuming you are using to run the Xtion, but if you run rosrun tf view_frames you can see the transform tree. Chances are, openni2 gives you /camera-->/camera_depth_frame and /camera-->/camera_rgb_frame, or something similar. You will need to make a static transform from /base_link-->/camera.

edit flag offensive delete link more

Comments

Thanks, I did that but I doubt that the transform provided by default by openni fits the measurements of the Xtion camera. I wanted to bypass these default transforms to see if it would solve my "scan matching issues"...

Pandaii gravatar image Pandaii  ( 2016-04-18 08:03:47 -0500 )edit

If you want to make your own transform tree then you can take direct measurements on the camera and use a static transform publisher.

Icehawk101 gravatar image Icehawk101  ( 2016-04-18 10:20:02 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2016-04-18 07:15:30 -0500

Seen: 408 times

Last updated: Apr 18 '16