ros-perception / slam_gmapping

http://www.ros.org/wiki/slam_gmapping
657 stars 528 forks source link

visualzing slam_gmapping in RViZ #37

Closed ktiwari9 closed 9 years ago

ktiwari9 commented 9 years ago

Hi there, I want to use SLAM _gmapping in rviz to use a hokuyo laser scanner to generate a costmap/occupancy grid but I don't know how to visualize this in rviz. Could you please help with this ?

My output from Debugging level of rqt console says: My output from RQT console set to DEBUG level for slam gmapping says: [DEBUG] [1440489099.449636147, 33.872000000]: MessageFilter [target=odom ]: Removed oldest message because buffer is full, count now 5 (frame_id=laser_front, stamp=33.609000) [DEBUG] [1440489099.449683559, 33.872000000]: MessageFilter [target=odom ]: Added message in frame laser_front at time 33.862, count now 5 [DEBUG] [1440489099.494061150, 33.914000000]: MessageFilter [target=odom ]: Removed oldest message because buffer is full, count now 5 (frame_id=laser_front, stamp=33.663000) [DEBUG] [1440489099.494112745, 33.914000000]: MessageFilter [target=odom ]: Added message in frame laser_front at time 33.905, count now 5

Why is the frame set as laser_front ? My tf tree is attached frames-1

vrabaud commented 9 years ago

use RViz to display the costmap. Topic map as explained here: http://wiki.ros.org/gmapping?distro=jade

ktiwari9 commented 9 years ago

Yeah I did read this but is there a way i change the frame_id from frame_id=laser_front to laser ? Because I do not have a frame called laser_front. How can I set a new frame_id ?

vrabaud commented 9 years ago

That question seems more appropriate for http://answers.ros.org/ There is no laser_front frame in the code by default so you might be setting it by hand somewhere. Check out your code or launch file. Did you copy/paste some launch file like this one https://git.cs.lth.se/robotlab/p3dx_ros/blob/03fc4e7fbb9d3a284daf083457f61d7b64b879a9/launch/mapping.launch ?

ktiwari9 commented 9 years ago

I figured what is laser_front. It is the frame id for the laser mounted on the other robot (AGV) and it is defined the urdf of this robot. But I dont understand why is this frame id being used if my husky already has a hokuyo mounted on it?

vrabaud commented 9 years ago

That seems to be a non-bug on the gmapping side. Use rqt_graph or other tools to see what publishes what. Thx.