Everything here is still a big work in progress, the project originally started from a fork of Victoria Tuck's Multi Robot Task Allocation Stack! made specifically for WSL2 on windows.
But now it is being reworked from the ground up since the use case is different and not completely compatible with the original project.
If you want to use wsl, it takes as a given that the WSL2 environment is set up and that nvidia-smi is posting on the command line.
- NVIDIA discrete GPU (for gazbeo)
- Diplay should use NVIDA and not integrated graphics
- Docker installed (docker and nvidia-docker)
- https://docs.docker.com/engine/install/ubuntu/
- https://docs.nvidia.com/datacenter/cloud-native/container-toolkit/latest/install-guide.html
This documentation is for the main branch of ROS2_multi_robot_sim repository.
To setup the Multi robot costmap plugin, first add the submodules by running
git submodule init
git submodule update --recursiveThen to build the environment, run
# For WSL2
COMPOSE_PROFILES=wsl docker-compose up
# For Linux
COMPOSE_PROFILES=linux docker-compose up
docker compose up -d
docker exec -it multi-robot-task-allocation-stack-ros-1 bashfrom the highest level of the repository where <service> is ubuntu or wsl depending on your operating system.
SMRTA must be installed as a package, after cloning the repository, navigate into the SMRTA folder and
cd /home/workspace/src/SMrTA
pip install -r requirements.txt
# From the SMrTA folder
cd bitwuzla
pip install .Now, you have to first build the colcon (ROS2) workspace. Navigate to
cd /home/colcon_ws
colcon build --symlink-install
Note sometimes ROS does not figure out package dependency order properly when multiple ROS packages are present. In this case, it may take multiple runs of colcon build to be successful. If one error is shown, after this step, you can still proceed successfully.
Now source the installed packages with following command
source ~/.bashrcFinally, to give docker environment permission to use graphics of hist machine, run the following command from host machine
xhost +Then run the code in the following sequence.
- To launch the gazebo environment with the robots inside it
rgazebo
Alternatively, you can launch a specific input file with
ros2 launch aws_robomaker_hospital_world hospital.launch.py input_file:=<input_file_path>
Note: After this step, the Gazebo environment should the robots (which are in the middle of blue circles). Upon start-up, the robot installation will occasionally fail. If this occurs, exit and rerun the above command.
- To start the costmap fusion node
gcostmap
The global costmap can also be launched straight from
ros2 launch multi_robot_costmap_plugin
multi_robot_costmap_launch.py
- To launch the ROS2 navigation stack (to use its planners)
rsmrta
Example:
ros2 launch multi_robot_sim test_multi_robot_launch.py input_file:=<input_file_path>
- Here is an example to send tasks to the allocation stack:
# Two tasks
ros2 run smrta_wrapper task_publisher_cli 1,3,11,400000000 2,26,55,20000000
# Four tasks
ros2 run smrta_wrapper task_publisher_cli 2,153,178,400000000 3,47,209,20000000 4,249,17,400000000 5,223,250,20000000