Skip to content

Latest commit

 

History

History
68 lines (53 loc) · 2.17 KB

File metadata and controls

68 lines (53 loc) · 2.17 KB

ROS 2 Human Follower

High-level control software for a mobile robot, leveraging the ros2_control framework to communicate with sensors and a low-level microcontroller, achieving real-time human tracking and following.

The algorithm was successfully implemented and tested on a custom-built mobile platform:

Custom Mobile Platform

System Requirements

Hardware Specifications

  • Main Processing Unit: Raspberry Pi 5 (8GB RAM recommended - handling ROS 2 nodes and computer vision tasks).
  • Low-Level Controller: Any microcontroller capable of communicating with the RPi5 via SPI to control the motors (e.g., Raspberry Pi Pico 2, STM32).
  • Vision Sensor: Raspberry Pi Camera Module HD v2 (connected via CSI port).
  • Distance/Depth Sensor: VL53L8CX (64-zone Time-of-Flight sensor)

Software Specifications

  • Operating System: Ubuntu Server 24.04 with Real-Time (RT) kernel enabled
  • Middleware: ROS 2 Jazzy Jalisco.
  • Control Framework: ros2_control

Installation & Build

  1. Create a workspace and clone the repository:
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
git clone [https://github.com/Szymi039/ros2-human-follower.git](https://github.com/Szymi039/ros2-human-follower.git)
  1. Install dependencies:
cd ~/ros2_ws
rosdep install --from-paths src -y --ignore-src
  1. Build the packages:
colcon build --symlink-install
  1. Source the workspace:
source install/setup.bash

Usage & Launch Modes

  1. Standard Operation (Human Following)
ros2 launch my_robot_bringup my_robot.launch.py
  1. Manual Teleoperation
ros2 launch my_robot_bringup my_robot.launch.py tracker:=false

On another terminal use:

ros2 run teleop_twist_keyboard teleop_twist_keyboard --ros-args -r /cmd_vel:=/diff_drive_controller/cmd_vel -p stamped:=true -p speed:=0.50 -p turn:=4.0
  1. Sensor Data Visualization (configure RViz2 for PointCloud2 messages)
ros2 launch my_robot_bringup my_robot.launch.py broadcaster:=true

Example of the PointCloud data visualized in RViz: RViz PointCloud Visualization