- Allow X11 access (once per session):
xhost +local:root
- Build and start the simulator container (from
Simulator/):
docker compose up --build
- Run launches directly without entering the container:
docker compose run --rm --service-ports simulator ros2 launch sim_pkg map_with_car.launch
# or
docker compose run --rm --service-ports simulator ros2 launch sim_pkg all_objects.launch
- Alternatively, enter the container and run commands manually:
docker compose exec simulator bash
ros2 launch sim_pkg map_with_car.launch
ros2 run example control # keyboard control: w/s/a/d, etc.
Available launches (package sim_pkg/launch):
map_with_car.launch(standard car + world_with_separators)all_objects.launch(spawns dynamic objects after Gazebo)map_with_all_objects.launch/_RECvariants (recording variants)
Keyboard control node:
ros2 run example controlpublishes to/automobile/commandusing WASD + tuning keys (seesrc/example/example/control.py).
Code made available by Team Gradient, in the BFMC2024... The code was not tested by the organizing team!
The following mentions are done by the team: • Was not able to test traffic light, may or may not work. • Camera node path changed from /camera/image_raw to /automobile/image_raw • There are many warnings on launch, but the majority seem to have been there prior to the port; • map_with_all_objects.launch is a bit broken. I detail the issue in the justfile and provide a hacky workaround, but the root cause should be dealt with. • The port is to Gazebo Classic, not Ignition. I don't know how much work would be required to Ignition, but it's likely a good amount. Though Gazebo Classic is much easier to install than ROS 1, so I still consider this a win.
The project contains the entire Gazebo simulator.
- It can also be used to get a better overview of how the competition is environment looks like
- It can be used in to develop the vehicle state machine
- It can be used to simulate the path planning
- It can be used to set-up a configuration procedure for the real track
- Not suggested for image processing
- Try not to fall in the "continuous simulator developing" trap
Tips on how to install and work on it, can be found in the
Dependencies:
gazebo11 (classic)ros2-humbleros2-humble-gazebo-{ros,msgs,dev,plugins}poetrydirenvjust
direnv is useful for automating the environment setup with .envrc instead of sourcing manually.
The poetry venv is also set up in .envrc. The first time .envrc is sourced, the file
./install/local_setup.bash doesn't exist so it will throw a warning. After running
colcon build, this should be fine. The .envrc has only been tested on arch linux.
Modify it according to your system, if necessary.
$ poetry install
$ colcon build
Then exit and enter the directory to source the new environment.
