This repository provides setup instructions, dependencies installation, and usage guide for running the simulation package with ROS 2.
- Ubuntu 22 or later
- ROS 2 (Foxy, Galactic, or Humble) installed and sourced
cmake,git, andbuild-essentialpackages
Update package lists and upgrade existing packages:
sudo apt update && sudo apt upgrade -yInstall development libraries:
sudo apt install -y \
libopencv-dev \
libboost-all-dev \
libompl-dev ompl-demos \
libeigen3-devInstall required Python modules:
pip install numpy matplotlib scikit-learn opencv-python scipy pygame pyserialDownload and run the OMPL installation script:
wget https://ompl.kavrakilab.org/install-ompl-ubuntu.sh
chmod u+x install-ompl-ubuntu.sh
./install-ompl-ubuntu.shClone, build, and install ACADO:
git clone https://github.com/acado/acado.git
cd acado
mkdir build && cd build
cmake ..
make
sudo make install
# Ensure the library path is updated
export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATHIn your ROS 2 workspace (e.g., ~/decision_module), build :
cd ~/DecisionModule
colcon build
source install/setup.bashLaunch the full simulation environment:
ros2 launch simulation_pkg decision.launch.pyRun only the decision node:
ros2 run simulation_pkg decisionThe joystick controller allows you to manually steer opponent bots during simulation. Setup is provided by an external repository:
- Joystick setup instructions and configuration files: Joystick Setup Repository
-
Install and configure the joystick package following the steps in the linked repository.
-
Run the joystick controller node:
ros2 run simulation_pkg joystick_controller
-
Run the server:
./start.sh
-
Connect multiple joystick apps to control multiple bots simultaneously—each instance will drive a separate bot.
-
Controller layout:
- Refer to the screenshot below and configure your controller as shown.
- The upper button on the joystick can be used to switch control to the currently active bot.
- Original dependencies and scripts provided by the OMPL and ACADO teams.
