Skip to content

IU-Capstone-Project-2024/SoftOverlord100

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Software part of Overlord100 Mobile Platform.

This repository assembles different ROS packages to implement a backend part of Overlord100 Mobile Platform. This includes 3 main modules:

  1. Controller
  2. SLAM
  3. Path planner

Dependencies

The backend is written using ROS2 Humble middleware with the following external dependencies:

  1. Slam Toolbox
  2. Nav2

They could be installed at:

RUN apt-get install -y ros-humble-slam-toolbox ros-humble-navigation2 ros-humble-nav2-bringup 

Development: Devcontainer

For the sake of development simplicity, DevContainer environment was created to preserve dependencies integrity and allow to avoid damaging system with local installation.

Usage

  1. Install VS Code and Dev Container extension
  2. Press Ctrl+Shift+P and choose option DevContainers: Reopen in Container.
  3. Choose the platform you are working on (amd64 if you are using Apple Sillicon, otherwise x86)

Features

  1. Different processors architectures are supported (yet, x86 works much better)
  2. Code linting for Python and C++

=======

Overlord100 Simulation

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.

Installation

For the sake of development simplicity, DevContainer environment was created to preserve dependencies integrity and allow to avoid damaging system with local installation.

Prerequisites

note: The Apple Sillicon architecture is criticaly unstable and the preferred OS is Ubuntu

Build and Launch container through terminal

  • For Linux and MacOS

    Firstly, you need to choose, would you download container or build it on your own machine.

    Download Container from Harbor Registry or Docker Hub

    docker pull harbor.pg.innopolis.university/sim_overlord100/simoverlord:latest
    

    Or

    docker pull simoverlord100/simoverlord:latest
    

    Build on your own machine

    1. Clone the repository to your workspace folder
    git clone https://gitlab.pg.innopolis.university/e.shlomov/simoverlord100.git
    
    1. Build container
    docker build -t <name_of_image> .
    

    Run container

    docker run -it \
       -v /tmp/.X11-unix:/tmp/.X11-unix:rw \
       -v /dev/dri:/dev/dri:rw \
       <name_of_image> bash
    

    Setup workspace

    1. Source ROS2 workspace
    source /opt/ros/humble/setup.bash
    
    1. Build ROS2 package
    cd /home/ws/src
    colcon build
    
  • For Windows (10 or 11)

    1. Clone the repository to your workspace folder
    git clone https://gitlab.pg.innopolis.university/e.shlomov/simoverlord100.git
    
    1. Add the following line to your Dockerfile (in .devcontainer folder):
    ENV DISPLAY=host.docker.internal:0.0
    
    1. Launch XLaunch app. Left settings as is.
    2. Launch Docker Desktop app
    3. Open cmd.exe in .devcontainer folder of the project folder and execute:
    docker build -t <name_of_image> .
    
    1. Run Container
    docker run -it -v X:/<path_to_repository_on_computer>:/develop <name_of_image> bash
    
    1. Source ROS workspace in container
    source /opt/ros/humble/setup.bash
    
    1. Build package
    cd /develop/test_software_overlord100
    sudo colcon build
    

Launch container through Visual Studio Code

  • For MacOS and Linux

    1. Open Visual Studio Code
    2. Press Ctrl + Shift + G and choose option Clone Repository
    3. Paste repository link
    https://gitlab.pg.innopolis.university/e.shlomov/simoverlord100.git
    
    1. Select the repository download path
    2. Press Ctrl+Shift+P and choose option DevContainers: Reopen in Container.
    3. Choose the platform you are working on (arm64 if you are using Apple Sillicon, otherwise x86)
    4. Source ROS 2 workspace
    source /opt/ros/humble/setup.bash
    
    1. Build package
    cd /home/ws/src
    colcon build
    

Launch container in local ROS2 workspace

  1. 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
  1. 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
  1. 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
  1. Update your system
sudo apt update

sudo apt upgrade
  1. Install ROS 2
sudo apt install ros-humble-desktop
  1. Source ROS 2 environment
source /opt/ros/humble/setup.bash
  1. Create new directory
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
  1. Clone repo
git clone https://gitlab.pg.innopolis.university/e.shlomov/simoverlord100.git
  1. 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
  1. Download Gazebo
sudo apt-get install ros-humble-ros-gz
sudo apt install ros-humble-rqt-robot-steering
  1. Download Colcon
sudo apt install python3-colcon-common-extensions
  1. Build workspace with Colcon
colcon build
  1. Source the overlay
source /opt/ros/humble/setup.bash

Now you can move on to Starting simultion

Starting manual control with simulation

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.

*Unit testing

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.

Features

  1. Different processors architectures are supported (yet, x86 works much better)
  2. Code linting for Python

Development: Continuous Integration

This repository has the following pipelines:

  1. Python black linting.
  2. (wip) C++ clang-tidy linting.
  3. (wip) ROS2 package build test.

Development: Code Style

  1. CPP
    1. Google style: link
    2. C++ Core Guidelines style: link
  2. Python
    1. PEP8 style: link
  3. Git Flow
    1. Conventional Commits: link

About

Software for the mobile platfrom Overlord100

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •