ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Hi, To simulate the laser data you can do two things.
First, use gazebo simulator there are alot of robots present there for example you can use erratic robot which is equipped with laser range sensor. So after installing the robot and simulator_gazebo you can spawn the robot in a gazebo world by this command.
roslaunch erratic_description erratic_laser_wg_world.launch
This will bring your gazebo environment with erratic robot in it. It will be publishing topics like /odom /scan /tf which are prerequisites for slam_gmapping. you can run gmapping node and visualize the robot, map and laser scan in Rviz.
Secondly,you can use the bag files which are recorded data sets of different robots in different environment for example willow garage data. After playing your bag file you can run gmapping and visualize the world in rviz.
2d laser data is distance readings in meters from minimum angle normally 0 degree to maximum angle normally 180 degree. The number of readings depend on the resolution of sensor So resolution of 1 degree means you will have a distance measure after every 1 degree. After running any of the routine you can do rostopic echo /scan and see what is the distance value and in header information you can see the resolution and range etc. That is how a laser range data looks like in ROS Laser Scan.
2 | No.2 Revision |
Hi, To simulate the laser data you can do two things.
First, use gazebo simulator there are alot of robots present there for example you can use erratic robot which is equipped with laser range sensor. So after installing the robot and simulator_gazebo you can spawn the robot in a gazebo world by this command.
roslaunch erratic_description erratic_laser_wg_world.launch
This will bring your gazebo environment with erratic robot in it. It will be publishing topics like /odom /scan /tf which are prerequisites for slam_gmapping. you can run gmapping node and visualize the robot, map and laser scan in Rviz.
Secondly,you can use the bag files which are recorded data sets of different robots in different environment for example willow garage data. After playing your bag file you can run gmapping and visualize the world in rviz.
2d laser data is distance readings in meters from minimum angle normally 0 degree to maximum angle normally 180 degree. The number of readings depend on the resolution of sensor So resolution of 1 degree means you will have a distance measure after every 1 degree. After running any of the routine you can do rostopic echo /scan and see what is the distance value and in header information you can see the resolution and range etc. That is how a laser range data looks like in ROS Laser Scan.
Edit 1: you can write your own nodes to publish laser data and odometry data. After running one of the above method you will understand the flow. Gmapping needs /scan /odom /tf just made the nodes which publishes these three data in such a way which is acceptable by gmapping.
3 | No.3 Revision |
Hi, To simulate the laser data you can do two things.
First, use gazebo simulator there are alot of robots present there for example you can use erratic robot which is equipped with laser range sensor. So after installing the robot and simulator_gazebo you can spawn the robot in a gazebo world by this command.
roslaunch erratic_description erratic_laser_wg_world.launch
This will bring your gazebo environment with erratic robot in it. It will be publishing topics like /odom /scan /tf which are prerequisites for slam_gmapping. you can run gmapping node and visualize the robot, map and laser scan in Rviz.
Secondly,you can use the bag files which are recorded data sets of different robots in different environment for example willow garage data. After playing your bag file you can run gmapping and visualize the world in rviz.
2d laser data is distance readings in meters from minimum angle normally 0 degree to maximum angle normally 180 degree. The number of readings depend on the resolution of sensor So resolution of 1 degree means you will have a distance measure after every 1 degree. After running any of the above routine you can do rostopic echo /scan and see what is the distance value and in header information you can see the resolution and range etc. That is how a laser range data looks like in ROS Laser Scan.
Edit 1: you can write your own nodes to publish laser data and odometry data. After running one of the above method you will understand the flow. Gmapping needs /scan /odom /tf just made the nodes which publishes these three data in such a way which is acceptable by gmapping.