Issue 1:需要从Github拷贝代码或库包。fatal: 无法读取远程仓库。请确认您有正确的访问权限并且仓库存在。
一般会拷贝一些现成的ROS包,例如无人机仿真时使用RotorS 是ETH(苏黎世联邦理工大学)研究团队开发的一个ROS包,GITHUB地址。
cd ~/UAV_rotors/src
git clone git@github.com:ethz-asl/rotors_simulator.git
git clone git@github.com:ethz-asl/mav_comm.git
git clone git@github.com:ethz-asl/glog_catkin.git
git clone git@github.com:catkin/catkin_simple.git
Solution for issue1:这里git需要提前登录github账号并绑定自己电脑ssh,否则不能正常git,绑定方法参考这个。
tip:git config --global user.name "yourname",双引号也要添上。
如果没搞对的话,在git clone的时候,会一直让你输入github对应账户的账户密码,我实在不知道是什么,后来发现是“绑定自己电脑ssh”这一步没操作对。
tip:登陆账号后Github的Settings。把cat ~/.ssh/id_rsa.pub这段代码输入到终端会输出一段ssh-rsa开头的密钥,应该就是SSH key,输入到key窗口就行。
Issue 2:Gazebo报错,显示无法唤醒Gazebo,但是是可以打开Gazebo软件界面的,只是无法实现代码运行,连模型都无法加载出来。
[FATAL] [1716105453.648043988]: Could not wake up Gazebo.
[firefly/hovering_example-6] process has died [pid 227023, exit code 255, cmd /home/lyh/UAV_rotors/devel/lib/rotors_gazebo/hovering_example __name:=hovering_example __log:=/home/lyh/.ros/log/6c15aae0-15b5-11ef-a9e5-9f1c6ff6286b/firefly-hovering_example-6.log].
log file: /home/lyh/.ros/log/6c15aae0-15b5-11ef-a9e5-9f1c6ff6286b/firefly-hovering_example-6*.log
Solution for issue 2:(可能是由于有gazebo进程没有终止,所以无法打开)
依次执行:
killall gzserver
killall gzclient
个人推荐linux系统下录屏软件:SimpleScreenRecorder,在Ubuntu Software就可以搜索到。
个人推荐的无人机仿真教程系列文章:【rotors】多旋翼无人机仿真(一)——搭建rotors仿真环境-优快云博客