Base code for ROS2 based person following robot involving RGB-D camera, laser scanner
- Robot Platform: Robile3
- OS: Ubuntu 22.04 LTS
- Middleware: ROS2 Humble
- Hardware: Intel Realsense D455, Hokuyo URG laser scanner
- Libraries: OpenCV, numpy, mediapipe
Prerequisites
- opencv
- mediapipe
- pyrealsense2
- Install ROS2 Humble
- Clone this repo in your
workspace_name/src
directory:
https://github.com/HBRS-SDP/ws23-person-following/
- Install the dependencies
sudo apt install python3-dev python3-pip python3-numpy build-essential libgtk-3-dev libavcodec-dev libavformat-dev libswscale-dev libv4l-dev libxvidcore-dev libx264-dev libjpeg-dev libpng-dev libtiff-dev gfortran openexr libatlas-base-dev
sudo apt install libopencv-dev python3-opencv
pip3 install opencv-python
pip3 install mediapipe
- Build the workspace using
colcon build
.
(Workspace setup in robot here)
Before running any launch files. Download the file robot_realsense.launch.py
from this repo and put it inside the launch folder in the robot's ROS workspace for example:
ros2_ws/src/robile/launch
Run the below commands in the robot to start the topics:
First set the ros distro to ros humble then,
cd ros_ws/
source install/local_setup.bash
ros2 launch robile_bringup robot_realsense.launch.py
To launch pose estimation using Realsense camera:
ros2 launch pose_estimator realsense_pose_estimator.launch.py
To launch the behaviour to follow person:
ros2 launch pose_estimator follow_person.launch.py
NOTE: The follow behaviour does not work, if the realsense camera is not connected