This repository contains the simulation component of the COVAPSy course offered at Sorbonne Université in 2025.
This simulation environment is designed to assist students in building, testing, and visualizing robotic control systems, with a focus on autonomous vehicle projects. It includes:
- URDF files for RViz visualization.
- Webots simulator integration with ROS 2 using dedicated controller plugins.
- Multiple STL models of various car bodies for visual customization.
- Custom ROS 2 nodes to control vehicles and simulate realistic autonomous behavior.
To get started, first install Webots by following the official guide:
Webots Installation on Linux
launch/: Launch files for simulation.protos/: Custom Webots PROTO files, including different STL car models.resource/: Contains the URDF and configuration files.webot_simulation/: Main ROS 2 package, including drivers and controllers.worlds/: Contains Webots world files.test/: Contains optional test files or tools.
Please refer to this tutorial Webot_ROS2_interface for more details.
To add a new Webots world:
-
Save the world file in the
worlds/directory. -
Register it in the
data_fileslist insetup.py:('share/' + package_name + '/worlds', ['worlds/your_new_world.wbt'])
-
Set it as the default in the launch file:
DeclareLaunchArgument( 'world', default_value='your_new_world.wbt', description='Choose one of the world files from the `/webot_simulation/world` directory' ),
If you create a new plugin controller that links Webots to ROS 2, update the plugin tag in the URDF file accordingly:
- Set the plugin path in the URDF like this:
<plugin type="your_package.your_plugin_class"/>- Rebuild the project:
colcon build && source install/setup.bashThis simulation includes the following devices:
- RpLidar A2 (publishes to
/TT02_jaune/RpLidarA2/point_cloud) - IMU / Gyro
- Rear sonar sensor
-
teleop.py
PublishesAckermannDrivemessages to the/cmd_ackermanntopic. Ackermann messages are used because they are native to car models in Webots. This differs from thelow_level_ros2approach, which usesTwistmessages. -
obstacle_avoider.py
Subscribes to the Lidar point cloud and performs basic obstacle avoidance. When an object is detected in front of the vehicle, it stops, reverses briefly, and turns.
piste_enscopy.wbt: A replica of the ENS 2023 track.circular_piste.wbt: A circular loop for testing.
To create your own maps, refer to the Webots Map Creation Tutorial.
This simulation provides a solid foundation for developing more advanced behaviors. Future goals include:
- Reinforcement Learning-based navigation
- Autonomous driving research
Simulation differs from real-world scenarios. Be patient and exercise caution when transitioning to real hardware.
Enjoy exploring and driving!
For inspiration, refer to: