Coral is a (experimental) renderer for maritime robotics simulation in ROS 2. The goal is to replace the classical Gazebo or RViz GUI to render nice, realistic images when performing maritime robotics experiments or simulation. It is based on osgOcean and is inspired from the well-known UWSim in ROS 1.
The module can be explored and downloaded from GitHub
Download link
For students willing to experiment in C++ and ROS, here is a prepared virtual machine where ROS, Qt Creator and other tools are already set up. It is an OVA file that can be imported in Virtual Box software.
Installation of VirtualBox can be done from here. On some computers, Virtual Box requires activation of virtualization in the BIOS settings.
Installing lab dependencies
In order to keep it light, the VM is not shipped with all dependencies for all labs. You can install them by running the update.sh that lies in your home directory. It takes either no argument, in this case a GUI will run, or the acronym of the module, in this case it will install the corresponding dependencies.
Install VBox additions
It is very important to setup the shared folders in order to synchronize everything you do in the VM to some local folder on your computer. To do so, you need to install (in your host OS) the VirtualBox extension pack (see on the previous link, it depends on your OS). Then run the VM.
This module allows logging data from C++ code (typically a robot control loop where you want to store the control inputs, error, robot command, etc.) in order to plot them with Python (matplotlib). The data files are in YAML and can also be generated from elsewhere as long as they follow the same syntax. The plotting script can also create videos and has many options to change the display.
The module can be explored and downloaded from Github:
This repository includes the ros_management.bash script that helps dealing with both ROS, when sourced in your .bashrc:
For ROS 2 users, the script provides colbuild, a wrapper for colcon build with overall better default behavior and options.
You will also find a ROS cheat sheet that motivates how and when using ROS tools versus standard ones (CMake / IDE) when working on packages.
A few utility scripts used at ECN can be found on this repository. They are tailored for the installation and maintenance of the ECN compter and virtual machines, but feel free to use any part of the scripts.
As we saw in class, I recommend the use of an IDE to develop in C++. There are a few reasons for this:
In particular the Qt Creator IDE has all its defaults good to work on CMake project, even with ROS. This may not be the case for other IDE's (VS Code, KDevelop, Eclipse, CLion...) where some plugins should be installed.
I recall below the properties of a CMake project, and how to load it in your favorite IDE. There are small differences depending on the project being a ROS package or not.
A standard way to share C++ source files is to rely on the CMake tool. In this case, the project is composed of the source files and the CMakeLists.txt which is basically the recipe to build all of this.
The only info not available in the project itself is the compilation directory, which is classically some build folder not far from the source directory, and it specific to your computer.
Thus, any CMake-friendly IDE will ask for this information. When using a build folder inside the source, and pre-configuring with CMake, Qt Creator will usually detect the directory and propose it as a default value.
ROS uses CMake but in its own fashion. The projects are called packages and the sources are located in the src folder of the ROS workspace. The compilation directory of a given ROS package is imposed by the ROS framework and is below the build folder of the workspace. This has a few consequences:
Other than that, ROS packages are just plain CMake project and can be developped, compiled, run and debugged in any capable IDE. A tool is proposed in this repository to generate the relevant configuration file for Qt Creator and VS Code (+CMake / clang plugins) Just run the following line from the folder where CMakeLists.txt is:
When loading a CMakeLists.txt, QtCreator will read the content and display all sources (.h and .cpp) that are listed as useful to create executables or libraries. Here are the main tools from the GUI:
ROS (1/2) nodes can be run from Qt Creator (as soon as a ROS master is available, for ROS 1). Launch files cannot be used, so topics / parameters have to be set from the C++ code. This is very useful for initial debugging, before remapping everything with launch files.
Duels is a C++ framework to build AIs that play various 1 vs 1 games. It can be installed through Debian packages (available on Github) for Ubuntu Focal or Jammy. The source can also be used to create new games with embedded AIs and let other people play against it. All the mechanics (rules) and AI are in C++ while the UI uses Pygame. Communication is done through zero-MQ.
In the following link you can find a tar file containing the Clickshare tool for Linux computers. All libraries should be shipped in. The first run will ask for the admin password in order to update some USB rules, then it will run directly.
Just untar this file and run clickshare.sh