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.