Skip to content
 
 

Repository files navigation

Running with Docker Compose

  1. Allow X11 access (once per session):
xhost +local:root
  1. Build and start the simulator container (from Simulator/):
docker compose up --build
  1. 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
  1. 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 / _REC variants (recording variants)

Keyboard control node:

  • ros2 run example control publishes to /automobile/command using WASD + tuning keys (see src/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.

BFMC Simulator Project

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

The documentation is available in details here:

Documentation

Running

Dependencies:

  • gazebo 11 (classic)
  • ros2-humble
  • ros2-humble-gazebo-{ros,msgs,dev,plugins}
  • poetry
  • direnv
  • just

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.

About

The project includes the software for the Gazebo simulator, which is the official on-line environment of the competition.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages