Skip to content

Bulnabi-SNU/Bulnabi_2024_Jetson

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

  1. Install v4l2_camera

    sudo apt update
    sudo apt install ros-${ROS_DISTRO}-v4l2-camera
    

  1. Change the path of local yolov5

    Download YOLOv5: https://github.com/ultralytics/yolov5

    modify 'Bulnabi_2024_Jetson/yolo_detection/yolo_detection/yolo_detector.py'

    '/home/chaewon/yolov5' -> path of 'yolov5' in your computer

     # define model path and load the model
         model_path = os.path.join(os.getcwd(), 'src/yolo_detection/config/best.pt')
         self.model = torch.hub.load('/home/chaewon/yolov5', 'custom', path=model_path, source='local')
    

  1. (Optional) v4l2-ctl: change v4l2_camera settings

    sudo apt install v4l-utils
    
    v4l2-ctl -d /dev/video0 --list-formats-ex   # camera formats 확인
    v4l2-ctl -d /dev/video0 --set-fmt-video=width=640,height=480   # change settings
    


Build

colcon build --symlink-install --packages-select my_bboxes_msg       // cbp my_bboxes_msg
colcon build --symlink-install                                       // cba
source ./install/local_setup.bash


Run

# run each nodes saperately
   ros2 run v4l2_camera v4l2_camera_node
   ros2 run yolo_detection yolo_detector
   ros2 run vehicle_controller controller

# run yolo & v4l2
   ros2 launch yolo_detection yolo_detector.launch.py

# run vehicle_controller & yolo & v4l2
   ros2 launch vehicle_controller vehicle_controller.launch.py


Streaming Images with MJPG-streamer

# install mjpg streamer
git clone https://github.com/jacksonliam/mjpg-streamer.git
cd mjpg-streamer/mjpg-streamer-experimental
make
sudo make install
# run mjpg streamer
cd mjpg-streamer/mjpg-streamer-experimental
./mjpg_streamer -i "./input_file.so -f /tmp -n stream.jpg -d 0.1" -o "./output_http.so -w ./www"


About

bulnabi 2024 source files

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published