Skip to content

Multi Driving Robot Control System for Nursing Home Task Assistance with ROS2

Notifications You must be signed in to change notification settings

YunOh21/multi-robot-control-system

 
 

Repository files navigation

Multi Driving Robot Control System

Watch the full video here

This was a team project with 6 members.
For a full project description, please refer to the README of the forked repository.


My Role in the Project

  • Designing scenarios for task planning
  • Setting up ROS Domain Bridge for multi-robot control
  • Writing communication interfaces between the control system, robot system, and GUI
  • Modifying the behavior tree (in XML using nav2)

Tech Stack

Development Environment Ubuntu Visual Studio Code Git Github RDS
Technology Python ROS2 Mysql Qt
Communication Jira Confluence Slack

Project Duration

December 26, 2023 - January 25, 2024


Design

Data Structure

Multi-Robot Control

Task Planning

Task Request Scenario

Task Scheduling Scenario

Task Execution Scenario

Navigation

Behavior Tree

  • Based on a behavior tree provided by nav2 (https://navigation.ros.org/behavior_trees/trees/nav_to_pose_and_pause_near_goal_obstacle.html), this BT:
    • Modifies the reactive fallback condition to 'IsStuck' (replacing 'GoalUpdated'), due to:
      • The goal not being updated during navigation in this project.
    • Incorporates 'DriveOnHeading' into the RoundRobin sequence due to:
      • The robot's occasional inability to move, even in the absence of obstacles, where actions such as 'backup', 'wait', or 'spin' do not resolve the situation.

How to Run

Prerequisites

git clone https://github.com/addinedu-ros-3rd/ros-repo-1.git
cd ros-repo-1/nursing_home
colcon build
source ./install/local_setup.bash
  • The actual map must match the map file shape.
    • It's recommended to configure the map manually and replace the files under /nursing_home/src/main_pkg/map and /nursing/home/src/robot_pkg/map.
    • In this project, the map file was created as follows:
    # RPi
    ros2 launch minibot_bringup bringup_robot.launch.py
    
    # RPi
    ros2 launch minibot_navigation2 map_building.launch.py
    
    # PC
    rviz2 -d `ros2 pkg prefix minibot_navigation2`/share/minibot_navigation2/rviz/map_building.rviz
    
    # RPi
    ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r cmd_vel:=base_controller/cmd_vel_unstamped
    
    # Save Map
    # RPi
    ros2 run nav2_map_server map_saver_cli -f ~/<pinkbot_ws>/<map_name>
    

Multi Robot Run

1) DB config

  • Create config.ini in nursing_home/src/main_pkg/utils
[dev]
host = DB Host
port = DB port
user = DB user
password = DB password
database = DB database name
  • source mysqldump
source create_and_init.sql

2) Setting ROS_DOMAIN_ID and ROS2 Environment

If you use bridge_config.yaml as is, it's recommended to add the following lines to ~/.bashrc, and then source ~/.bashrc.

  • Monitoring PC
export ROS_DOMAIN_ID = 91
source /opt/ros/humble/setup.bash
source ~/nursing_home/install/local_setup.bash
  • Robot1 RPi
export ROS_DOMAIN_ID = 93
source /opt/ros/humble/setup.bash
source ~/pinkbot/install/local_setup.bash
  • Robot1 PC
export ROS_DOMAIN_ID = 93
source /opt/ros/humble/setup.bash
source ~/pinkbot/install/local_setup.bash
source ~/nursing_home/install/local_setup.bash
  • Robot2 RPi
export ROS_DOMAIN_ID = 94
source /opt/ros/humble/setup.bash
source ~/pinkbot/install/local_setup.bash
  • Robot2 PC
export ROS_DOMAIN_ID = 94
source /opt/ros/humble/setup.bash
source ~/pinkbot/install/local_setup.bash
source ~/nursing_home/install/local_setup.bash
  • Robot3 RPi
export ROS_DOMAIN_ID = 97
source /opt/ros/humble/setup.bash
source ~/pinkbot/install/local_setup.bash
  • Robot3 PC
export ROS_DOMAIN_ID = 97
source /opt/ros/humble/setup.bash
source ~/pinkbot/install/local_setup.bash
source ~/nursing_home/install/local_setup.bash

3) RPi: each robot run & camera start

  • terminal 1
ros2 launch minibot_bringup bringup_robot.launch.py
  • terminal 2
sudo chmod 777 /dev/video0
ros2 run v4l2_camera v4l2_camera_node

4) Robot PC: navigation start (yaml file dir: nursing_home/src/main_pkg/map)

  • terminal 1
ros2 launch minibot_navigation2 bringup_launch.py map:=home.yaml
  • terminal 2
ros2 run robot_pkg robot_controller

5) Monitoring PC: GUI/Main Controller run

  • terminal 1
ros2 run main_pkg main_controller
  • terminal 2
ros2 run ui_pkg monitoring
sudo apt install ros-humble-domain-bridge
ros2 run domain_bridge domain_bridge bridge_config.yaml

About

Multi Driving Robot Control System for Nursing Home Task Assistance with ROS2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 98.3%
  • CMake 1.7%