This repository assembles different ROS packages to implement a backend part of Overlord100 Mobile Platform. This includes 3 main modules:
- Controller
- SLAM
- Path planner
The backend is written using ROS2 Humble middleware with the following external dependencies:
They could be installed at:
RUN apt-get install -y ros-humble-slam-toolbox ros-humble-navigation2 ros-humble-nav2-bringup
For the sake of development simplicity, DevContainer environment was created to preserve dependencies integrity and allow to avoid damaging system with local installation.
- Install VS Code and Dev Container extension
- Press
Ctrl+Shift+P
and choose optionDevContainers: Reopen in Container
. - Choose the platform you are working on (
amd64
if you are using Apple Sillicon, otherwisex86
)
- Different processors architectures are supported (yet,
x86
works much better) - Code linting for
Python
andC++
=======
ROS 2 packages for simulation Autonomus Mobile Platform Overlord100.
This repository allows the software development team to test the developed algorithms without the risk of damaging the real equipment, as well as to conduct tests in parallel and without the need for personal presence in the laboratory.
For the sake of development simplicity, DevContainer environment was created to preserve dependencies integrity and allow to avoid damaging system with local installation.
- Ubuntu 22.04 (Jammy Jellyfish) or Ubuntu 20.04 (Focal Fossa) or Windows 11 or Windows 10 or MacOS
- Docker Desktop
- VS Code
- Dev Containers extension for VS Code
- Git
- X Server or VcXsrv (Only for Windows)
note: The Apple Sillicon architecture is criticaly unstable and the preferred OS is Ubuntu
-
For Linux and MacOS
Firstly, you need to choose, would you download container or build it on your own machine.
docker pull harbor.pg.innopolis.university/sim_overlord100/simoverlord:latest
Or
docker pull simoverlord100/simoverlord:latest
- Clone the repository to your workspace folder
git clone https://gitlab.pg.innopolis.university/e.shlomov/simoverlord100.git
- Build container
docker build -t <name_of_image> .
docker run -it \ -v /tmp/.X11-unix:/tmp/.X11-unix:rw \ -v /dev/dri:/dev/dri:rw \ <name_of_image> bash
- Source ROS2 workspace
source /opt/ros/humble/setup.bash
- Build ROS2 package
cd /home/ws/src colcon build
-
For Windows (10 or 11)
- Clone the repository to your workspace folder
git clone https://gitlab.pg.innopolis.university/e.shlomov/simoverlord100.git
- Add the following line to your Dockerfile (in .devcontainer folder):
ENV DISPLAY=host.docker.internal:0.0
- Launch XLaunch app. Left settings as is.
- Launch Docker Desktop app
- Open cmd.exe in .devcontainer folder of the project folder and execute:
docker build -t <name_of_image> .
- Run Container
docker run -it -v X:/<path_to_repository_on_computer>:/develop <name_of_image> bash
- Source ROS workspace in container
source /opt/ros/humble/setup.bash
- Build package
cd /develop/test_software_overlord100 sudo colcon build
-
For MacOS and Linux
- Open Visual Studio Code
- Press
Ctrl + Shift + G
and choose optionClone Repository
- Paste repository link
https://gitlab.pg.innopolis.university/e.shlomov/simoverlord100.git
- Select the repository download path
- Press
Ctrl+Shift+P
and choose optionDevContainers: Reopen in Container
. - Choose the platform you are working on (
arm64
if you are using Apple Sillicon, otherwisex86
) - Source ROS 2 workspace
source /opt/ros/humble/setup.bash
- Build package
cd /home/ws/src colcon build
- Verify your settings:
locale # check for UTF-8
sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale # verify settings
- Now add the ROS 2 GPG key with apt.
sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg
- Then add the repository to your sources list.
echo "deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main" | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null
- Update your system
sudo apt update
sudo apt upgrade
- Install ROS 2
sudo apt install ros-humble-desktop
- Source ROS 2 environment
source /opt/ros/humble/setup.bash
- Create new directory
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
- Clone repo
git clone https://gitlab.pg.innopolis.university/e.shlomov/simoverlord100.git
- Resolve dependencies
# cd if you're still in the ``src`` directory with the ``simoverlord100`` clone
cd .. #for go to previous directory
rosdep install -i --from-path src --rosdistro humble -y
- Download Gazebo
sudo apt-get install ros-humble-ros-gz
sudo apt install ros-humble-rqt-robot-steering
- Download Colcon
sudo apt install python3-colcon-common-extensions
- Build workspace with Colcon
colcon build
- Source the overlay
source /opt/ros/humble/setup.bash
Now you can move on to Starting simultion
First, you need to source ROS and build the packages:
source \opt\ros\humble\setup.bash
colcon build
To start the simulation and backend logic for the platform's movement in manual mode, open a terminal and run the following commands:
source install/local_setup.bash
ros2 launch overlord100_bringup manual_control.launch.py
The overlord100_bringup
package is designed to launch the software, enabling users to control the platform in manual mode with frontend integration. It also includes a simulation component so you can visualize the robot's movements.
With this package, you will be able to:
- Set the mode to 0 (manual mode) or 1 (auto mode)
- Set the desired velocity (for manual mode)
- View log messages
The overlord100_bringup
package integrates the following packages:
urdf_dummy
overlord100_logger
overlord100_controller
overlord100_mode_switcher
- And also launches
rosbridge_server
After launching, you will have several windows open:
- RViz window: Visualizes sensor readings and other system data.
- Gazebo window: Displays the simulation scene.
To launch unit testing, open terminal and run launch_test
command:
source install/local_setup.bash
launch_test urdf_dummy/test/test_converter_is_available.py
These unit tests checks connection to each sensor that installed on robot.
- Different processors architectures are supported (yet,
x86
works much better) - Code linting for
Python
This repository has the following pipelines:
- Python
black
linting. - (wip) C++
clang-tidy
linting. - (wip) ROS2 package build test.