git clone https://github.com/xmy0916/racecar.git
cd catkin_ws/
catkin_make
接下来就是遇到的问题
编译错误
解决办法:
sudo apt-get install ros-kinetic-driver-base
成功之后问题得到解决,然后下载空间控件
controllers相关
sudo apt-get install ros-melodic-gazebo-ros-control
sudo apt-get install ros-melodic-effort-controllers
sudo apt-get install ros-melodic-joint-state-controller
driver_base相关
sudo apt-get install ros-melodic-driver-base
通过执行下面代码得到opencv的路径
locate OpenCVConfig.cmake
执行
gedit ~/catkin_ws/src/racecar-master/racecar_gazebo/CMakeLists.txt
roslaunch racecar_gazebo racecar.launch
sudo apt-get install ros-melodic-teb-local-planner
启动导航和环境地图,启动rviz
在之前实验中我们已经完成了地图的创建
roslaunch racecar_gazebo racecar_rviz.launch
roslaunch racecar_gazebo racecar_runway_navigation.launch
启动py文件
rosrun racecar_gazebo path_pursuit.py
需要注意的是,不能直接到github网站上去下载,那样下载下来的darknet文件夹里面是空的,只能通过git clone下载,且必须要加上–recursive才能够下载完全。但是这样克隆会报错误。因为需要配置ssh以及生成密匙
git clone --recursive [email protected]:leggedrobotics/darknet_ros.git
配置ssh
生成密钥
git config --global user.name "填写用户名"
git config --globa user.email "填写邮箱"
ssh-keygen -t rsa -C "填写邮箱"
github中添加密钥
进入github网站,点击右上角,选择settings
1.下载权重文件
2.回到ros工作空间下,进行编译
catkin_make -DCMAKE_BUILD_TYPE=Release
修改yaml文件中的话题为智能车摄像头的话题
启动gazebo
roslaunch racecar_gazebo racecar_runway_navigation.launch
rostopic
运行程序
启动rviz
roslaunch racecar_gazebo racecar_rviz.launch
启动gazebo
roslaunch racecar_gazebo racecar_runway_navigation.launch
启动yolo3检测摄像头看到的物体
roslaunch darknet_ros darknet_ros.launch
添加image,方便看到摄像头的图像