We need to install some tools to be able to run the simulation. Follow each step if you have a fresh Ubuntu 22.04 installation. If you already have some of the tools installed, you can skip the corresponding step. This was tested on a fresh Ubuntu 22.04 installation.
We will clone some repositories from github but you must have access to them. To make things easier, we will use github client tool to clone these repositories. You can install it with this command:
sudo apt install gh
Then you need to login to your github account with this command:
gh auth login
Then just follow the instructions to log in.
Once you are logged in, you will be able to use the gh
command to clone repositories and you don't need to "login" again.
Let's move in the install directory:
cd install
We are now ready to install the tools using the scripts provided in this repository.
First we need to install ROS humble, which is the required version for vrx. This script will install ROS humble based on official documentation.
./install_ros_humble.sh
Then we install GAZEBO garden, which is the required version for vrx. This script will install GAZEBO garden based on official documentation.
./install_gazebo_garden.sh
Virtual RobotX (VRX) is a high fidelity, Gazebo-based simulation environment for testing maritime robots. This script will install VRX based on official documentation
./install_vrx.sh
For this projet, we use gazebo worlds created by Serehna for their competition named, the worlds are defined in this repository.
Clone this repository in~/vrx_ws/src
cd ~/vrx_ws/src
gh repo clone sirehna/Aquabot
mv Aquabot aquabot
This is not mandatory but you can add some examples provided by Serehna to play with the simulation. Examples are located in this repository.
Clone this repository in~/vrx_ws/src
cd ~/vrx_ws/src
gh repo clone sirehna/Aquabot-Competitor
mv Aquabot-Competitor aquabot_competitor
Everyhting is now installed, we can start a simulation.
To start a simulation, we need to build the workspace and then launch the simulation.
This step must be done each time you want to launch a simulation after updating the code.
cd ~/vrx_ws
colcon build --merge-install
. install/setup.bash
The following command will launch the simulation with a simple world.
ros2 launch aquabot_gz competition.launch.py world:=aquabot_regatta
@startuml
Bob --> Alice
@enduml