(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

Xbot Simulation

Description: This tutorial introduce a simulation package for xbot which you can simulate your algorithm by you own robot using rviz

Keywords: navigation

Tutorial Level: BEGINNER

Package Summary

this package will introduce how use simulation in ROS with xbot demo.


  • This tutorial showing how using simulator with xbot demo, also you could modify URDF to make you own robot demo. additionally, you could make a 3D module so that you can simulation in 3D.


  • Firstly, you should install arbotix and nav_staff of x_controller for sure.

Howe to install arbotix

  • 1.make sure you have not install gmapping yet:

    rospack find arbotix
  • 2.install arbotix package

    sudo apt-get install ros-indigo-arbotix

How to launch your fake robot

1. launch fake robot

    roslaunch simulation fake_robot.launch

1. launch fake amcl

    roslaunch simulation fake_amcl.launch

3.launch rviz

    roslaunch machine 3D_RVIZ.launch

How to move your robot

4. by keyboard control

    rosrun nav_staff keyboard_control.py

4. by robot itself

    roslaunch machine robot_controller_single.launch


  • X_controller has 2 modules: "FixedModule" and "OnePathModule".

  • The default module is "FixedModule", which means user will choose several goals, then system will automatic make a fixed path through those goals in sequence. The robot will start run after user giving a message 'True'(bool) from topic '/speaker_done'. Or you could run command:

    rosrun simulation speaker_simulation.py


  • Otherwise, call class switch_modles_simulation() in testlib under simulation package


  • "OnePathModule" is the normal way to make a path, once user point a goal, the plan would be generated immediately, and the robot would run immediately by following the path as well. Once user change goal, a new plan would be made immediately, the robot would change it way in seconds too.


How to Switch Modules

  • run following command or use class switch_modles_simulation() in testlib under simulation package.

    rosrun simulation switch_modles_simulation.py
  • Then input FixedModule OR OnePathModule in terminal.

How to interact with your robot

    rosrun simulation interactive_marker.py

then use "publish point" to click on map, a cube will come out, and you can drag it moving in map through "interact" button interactive_marker


What Next?

Wiki: xbot/tutorials/indigo/Xbot Simulation (last edited 2017-04-10 01:53:49 by DinnerHowe)