-
Notifications
You must be signed in to change notification settings - Fork 1
Simulation
It is possible to simulate the behavior of the Turtlebot in a 3D environment. This virtual world can be changed, and the returned sensor valued (e.g. LIDAR) will change accordingly. Simulation in 3D is generally not recommended for the mobile robotics exercise sessions. Installation is cumbersome, and other tools can fullfill the requirements of this course. For masters thesis, simulation is much more interesting and is even recommded. For the embedded control systems course, guidelines cannot be made as clear. It is up to the individual to decide wether the effort of installation and learning a new operating system are worth it.
A complete guide on Turtlebot simulation is available on the official documentation page. This page will list instructions that are specific for the platforms used at group T.
Prerequisites: A full installation of ROS and Gazebo is required to simulate the Turtlebots. This works best in a linux environment and is not tested in windows / MacOS. There are additional dependencies for the Turtlebot packages, see also our specific installation instructions. The book 'A gentle introduction to ROS' is a great resource to get started with ROS, and is freely available online. Additionally, the IMP research group organized an introductory ROS workshop in march 2018. The documentation can serve as a starting point in learning ROS.
Following installation of linux, ROS and the turtlebot packages, you can create your own world models in the Gazebo simulator. You can go through the tutorials to learn more about the simulator itself. Alternatively, you can use the examples provided on this repository (in the 'embedded_ control_ sytems' -> 'turtlebot3_simulation' folder). First move the world files to the 'turtlebot3 _gazebo/worlds' folder. Usually, this is folder is located in: '~/catkin _ws/src/turtlebot3 _simulations/turtlebot3 _gazebo/worlds/'.
The launch files in the 'embedded_ control_ sytems' folder can provide a starting point for your simulations. If you want to use a different world file, simply change the 'world_name' argument. Starting coordinates can be set with the 'x _pos, y _pos and z _pos' arguments. The launch file will start a gazebo world simulation with a turtlebot inside. You should now be able to perform send commands (e.g. via teleoperation) and receive simulated sensor data.
You can use the Gazebo simulator in combination with the MATLAB toolbox:
- Start the Gazebo simulation
- Change the Turtlebot ip address to 'localhost'
- Comment the turtle.sensor_sub line in the Turtlebot _GT class definition (should be around line 66). Don't forget to change this back when using the physical robot !
- The bringup files should now either move the robot, or show simulated LIDAR measurements. The following functions will also be unavaible:
- get_ battery_voltage
- get_ encoder_counts
© 2019 Robin Amsters
