就是会报这种错误
Please refer to the link below:
If not successful, please use python 2.7 instead of python 3 as the raspberry pi is with ros kinetic and python 2.7.
In your case, the command is:
python px4_mavros_run.py --sim False --flag_dasa True --vehicle rover
针对你的现象,有以下几个问题:
-
bash script操作中显示 chmod: cannot access ‘/dev/ttyPixhawk’ ,这部分是表示飞控到机载电脑的连接线没有连接,请检查树莓派电脑TTL-USB到飞控串口的连接情况。
-
请检查DASA_space/catkinws_dasa是否在树莓派中正常编译?通过screen -ls命令检查各进程的运行情况。如果不行,请进入该目录进行重新编译,树莓派中编译大概会需要半个小时时间,请使用catkin clean && catkin build -j 1操作。(如果你之前同步代码从优盘过去,有可能把其中的部分覆盖了)
-
如果是2的情况,则你的python px4_mavros_run.py是不能source到正确的ros kinetic环境的。因为rospy是ros kinetic环境的包,和ros kinetic是一起的。
sudo apt-get install ros-kinetic-rospy
请学会使用英文搜索引擎或者kimi GPT搜索你的问题,因为这是做机器人技术的必要技能。

