- Visualize raw images and point cloud in ROS2
- Implement object detection algorithm YOLOv5
- Implement stereo depth estimation algorithm SGBM
-
For ROS2 install follow the official documentation
What if I have to install ROS2 with ROS1 already in my PC?
$\to$ Settings for ROS2 coexistence with ROS1. -
Install
tf-transformations
sudo apt-get install ros-galactic-tf-transformations
for other ros2 distors substitude the
galactic
with your distro name
git clone https://github.com/junmeng6025/ros2_kitti.git
cd ros2_kitti
pip install -r requirements.txt
- If you run into errors that claims missing some python libraries, please check
requirements.txt
in/colcon_ws/src/kitti_ros2/yolov5
. - Or you can use
rosdep
to install dependencies automatically. (See belowPossible issues
) - Or install the missing libraries according to the error messages ...
see Data preparation
- use colcon build command to generate executable files automatically
! ALWAYS make sure you've sourced ROS2 to your current terminal before "colcon build"
cd ros2_kitti/colcon_ws
source /opt/ros/galactic/setup.bash colcon build
use the command
echo ${ROS_DISTRO}
to check the current ROS distro in your working Terminal
make sure it returnsgalactic
or other ROS2 distro - after build, copy the folder
/data
into/src/kitti_ros2/yolov5
/install/kitti_ros2/lib/python3.8/site-packages/yolov5
source the setup.sh
to current terminal
# stay in the directory /ros2_kitti/colcon_ws
source install/setup.sh
ros2 launch kitti_ros2 kitti_stereo_detect.launch.py
There are two other options:
- B: Visualize KITTI data in Rviz without detection or depth estimation
ros2 launch kitti_ros2 kitti_visualization.launch.py
- C: Implement the detection but without depth estimation
ros2 launch kitti_ros2 kitti_detect.launch.py
Settings for ROS2 coexistence with ROS1.
rosdepc
is a tool that can help to install all the dependencies for a workspace automatically.
sudo pip3 install rosdepc
sudo rosdepc init & rosdepc update
# cd to the workspace root path
rosdepc install -i --from-path src --rosdistro galactic -y