Lane following based on camera as a ROS 2 python package.
It is assumed that the workspace is ~/ros2_ws/.
cd ~/ros2_ws/srcgit clone https://github.com/robotverseny/lane_following_camcd ~/ros2_wscolcon build --packages-select lane_following_cam --symlink-installDon't forget to source before ROS commands.
source ~/ros2_ws/install/setup.bashStart 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:=falseros2 run lane_following_cam lane_detect --ros-args -p image_topic:=/image_raw -p raw_image:=trueros2 run lane_following_cam lane_detect --ros-args -p image_topic:=/camera/color/image_raw -p raw_image:=trueThere are launch files as well:
ros2 launch lane_following_cam example_bag.launch.pyros2 launch lane_following_cam robot_raw1.launch.pyros2 launch lane_following_cam robot_compressed1.launch.pyros2 launch usb_cam_launcher usb_cam_a.launch.py~/ros2_ws/src/lane_following_cam/shell/start_drivers.shLink: drive.google.com/drive/folders/181pcgmwZ5YjaCReB-aZJtW1JtxnJUaru?usp=sharing
ros2 bag play runde_vdi_lausitz_1.mcap --loopThis bag file contains /camera/color/image_raw topic, so easiest way to use is:
ros2 launch lane_following_cam example_bag.launch.py