赞
踩
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
或者
sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
sudo rosdep init
sudo apt install ros-noetic-desktop-full
sudo rosdep init
- sudo apt install python-rosdep2 -y
- 或者
- sudo apt install python3-rosdep2 -y
sudo gedit /etc/hosts
199.232.28.133 raw.githubusercontent.com
sudo rm /etc/ros/rosdep/sources.list.d/20-default.list
rosdep update
echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc
source ~/.bashrc
sudo apt install python-rosinstall python-rosinstall-generator python-wstool build-essential
roscore
sudo apt install ros-noetic-desktop-full
mkdir catkin_workspace
- cd catkin_workspace
- ls
- mkdir src
- cd src
- catkin_init_workspace
- cd ..
- catkin_make
catkin_make install
- cd src
- catkin_create_pkg test_pkg std_msgs rospy roscpp
catkin_make
source devel/setup.bash
echo $ROS_PACKAGE_PATH
- cd ~/catkin_workspace/src
- git clone https://github.com/qq44642754a/Yolov5_ros.git
- cd Yolov5_ros/yolov5
- pip3 install -r requirements.txt
- cd ~/catkin_workspace
- catkin_make
- source devel/setup.sh
pip install -r requirements.txt -i http://pypi.douban.com/simple/ --trusted-host pypi.douban.com
workon yolov5
roslaunch yolov5_ros yolo_v5.launch
- cd catkin_workspace/src
- git clone https://github.com/bosch-ros-pkg/usb_cam.git
- cd usb_cam
- mkdir build
- cd build
- cmake ..
- make
roscore
- cd ..
- cd launch
- roslaunch usb_cam usb_cam-test.launch
roscore
roslaunch usb_cam usb_cam-test.launch
roslaunch yolov5_ros yolo_v5.launch
ROS下运行yolov5进行目标检测
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。