Lane following based on camera as a ROS 2 python package.
It is assumed that the workspace is ~/ros2_ws/
.
cd ~/ros2_ws/src
git clone https://github.com/robotverseny/lane_following_cam
cd ~/ros2_ws
colcon build --packages-select lane_following_cam --symlink-install
Don't forget to source before ROS commands.
source ~/ros2_ws/install/setup.bash
Start the lane detection node with compressed or raw image, e.g.:
ros2 run lane_following_cam lane_detect --ros-args -p image_topic:=/image_raw/compressed -p raw_image:=false
ros2 run lane_following_cam lane_detect --ros-args -p image_topic:=/image_raw -p raw_image:=true
ros2 run lane_following_cam lane_detect --ros-args -p image_topic:=/camera/color/image_raw -p raw_image:=true
There are launch files as well:
ros2 launch lane_following_cam example_bag.launch.py
ros2 launch lane_following_cam robot_raw1.launch.py
ros2 launch lane_following_cam robot_compressed1.launch.py
ros2 launch usb_cam_launcher usb_cam_a.launch.py
~/ros2_ws/src/lane_following_cam/shell/start_drivers.sh
Link: drive.google.com/drive/folders/181pcgmwZ5YjaCReB-aZJtW1JtxnJUaru?usp=sharing
ros2 bag play runde_vdi_lausitz_1.mcap --loop
This bag file contains /camera/color/image_raw
topic, so easiest way to use is:
ros2 launch lane_following_cam example_bag.launch.py