0
$\begingroup$

Rosanswers logo

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 :-)


Originally posted by Pandaii on ROS Answers with karma: 3 on 2016-04-18

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

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.


Originally posted by ahendrix with karma: 47576 on 2016-04-18

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$
0
$\begingroup$

Rosanswers logo

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.


Originally posted by Icehawk101 with karma: 955 on 2016-04-18

This answer was NOT ACCEPTED on the original site

Post score: 1


Original comments

Comment by Pandaii on 2016-04-18:
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"...

Comment by Icehawk101 on 2016-04-18:
If you want to make your own transform tree then you can take direct measurements on the camera and use a static transform publisher.

$\endgroup$

Your Answer

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