lsd-maddrive/rt_control_system_for_a_mobile_robot
Real-time control system for a tracked robot based on ChibiOS + ROS move base
Real-time system for mobile robot control
Brief
This project implements a real time control system for a tracked robot.
It consist of two parts:
- The firmware implemented a low level control system is based on the ChibiOS/RT demos for STM32 Nucleo144-F767ZI.
- The software implemented a high level control system is based on the ROS Melodic for Raspberry PI and desktop. It mainly uses
move_baseand different SLAM packages:slam_karto,gmappingandhector_mapping.
Hardware Requirements
The main hardware components are:
- Raspberry PI 2B (RPI),
- STM32 Nucleo144-F767ZI,
- motors with encoders GM25-370,
- lidar ydlidar x4.
Software Requirements
-
It is assumed you use ubuntu 18.04 with ROS melodic insalled in the way described in the official tutorial on your computer.
-
The RPI is based on Ubuntu Mate 18.04.
-
Python 2.7
Installation and Building:
You can build docker image using build script or install and build manually using instruction from the Dockerfile.
Real usage
- You should create symlinks for stm32 and ydlidar:
sudo ./init_stm32_and_ydlidar.sh
- Then setup
ROS_MASTERandROS_IPon RPI and PC:
source init_env_vars.launch
- Run SLAM or Localization on RPI:
roslaunch wr8_software real_slam.launch
or
roslaunch wr8_software real_localization.launch
- Run
RVUZon desktop to monitor the robot position and to setup desired goals:
roslaunch wr8_software rviz.launch
Usage in Gazebo simulator
- Run on the first terminal session:
roslaunch wr8_software gz_server.launch
- Run on the second terminal session to spawn a robot with SLAM or Localization algorithm:
roslaunch wr8_software gz_slam.launch
or
roslaunch wr8_software gz_localization.launch
Here launching is divided into two files to have an ability to spawn several robots simultaniously. But this feature is not ready yet.
Troubleshooting
If you have a problem with urdf model visualization in rviz in ros melodic, read this comment.
Firmware
- Install some linux distributive, for example ubuntu melodic
- Install st-link, arm compiler, eclipse and chibios like this tutorial
Repository content
- robot_firmware - Eclipse project based on ChibiOS for STM32 Nucleo144-F767ZI board
- robot_software - ROS package for raspberry PI 2B and PC that containts navigation stack, robot configuration and simulation scripts
- robot_description - ROS package with robot model description
- ydlidar_ros - ROS package that has YDLIDAR driver