How To: Simulate Laser Scanner (Lidar) on IRobot Create/Roomba in ROS Gazebo

Following up from my previous post, I wanted to simulate an IRobot Create with a hokuyo laser mounted on it. I needed this to get my motion planning simulation up and running.

1. Follow the tutorial to get your create up and running in ROS/Gazebo.

2. If you downloaded the gazebo model repository from bitbucket, then simply copy the hokuyo folder to ~/.gazebo/models. Otherwise download just the hokuyo model and copy it to that location.

3. Use this modified IRobotCreateHokuyo. Download and rename extension from .txt to .sdf and move it to ~/catkin_ws/src/create/

4. In one terminal $roscore

5. In another terminal $roslaunch gazebo_ros empty_world.launch

6. In third terminal $ rosrun gazebo_ros spawn_model -file /home/<USERNAME>/catkin_ws/src/create/IRobotCreateHokuyo.sdf -sdf -model create

Note: The modified SDF adds a joint, link and the sensor model. It uses the laser plugin in gazebo.





  1. Raj said:

    Hi how do you view the output of the lidar attached to the model in rviz etc.
    i have made my own model to which i have attached a lidar but i cannot seem to view it in rviz tho i can view the output in thee gazebo topic-viewer

    April 11, 2016
    • sauravagarwal said:

      You will have to add a new display for the laser and give it the particular laser topic name in rviz. Instructions are posted here.

      April 11, 2016
  2. Hen said:

    I can view the laser scan on the Gazebo topic viewer, however no scans are published (rostopic list). How can I add/publish the scans to use them?

    May 21, 2016
    • oli said:

      I really would like a answer on this questionn!

      October 1, 2017

Comments are closed.