XTDrone--执行roslaunch px4 indoor1.launch 遇到的问题

RLException: while processing /home/karasi/PX4_Firmware/launch/single_vehicle_spawn_xtd.launch:Invalid tag: Cannot load command parameter [model_description]: no such command [[‘xmlstarlet’, ‘ed’, ‘-d’, ‘//plugin[@name=“mavlink_interface”]/mavlink_tcp_port’, ‘-s’, ‘//plugin[@name=“mavlink_interface”]’, ‘-t’, ‘elem’, ‘-n’, ‘mavlink_tcp_port’, ‘-v’, ‘4560’, ‘/home/karasi/PX4_Firmware/Tools/sitl_gazebo/models/iris_stereo_camera/iris_stereo_camera.sdf’]]. Param xml is The traceback for the exception was written to the log file

原因:依赖没装全
sudo apt install xmlstarlet

执行make px4_sitl_default gazebo遇到的问题
问题1:No package ‘gstreamer-base-1.0’ found解决如下:

sudo apt install libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
1
问题2:No module named 'jinja2’解决如下:

pip3 install jinja2 -i http://mirrors.aliyun.com/pypi/simple --trusted-host mirrors.aliyun.com
1
执行 roslaunch px4 mavros_posix_sitl.launch遇到的问题

RLException: [mavros_posix_sitl.launch] is neither a launch file in package [px4] nor is [px4] a launch file name. The traceback for the exception was written to the log file

原因:缺少环境变量,在~/.bashrc文件增加以下代码,前两个source顺序能写反

source ~/catkin_ws/devel/setup.bash
source ~/PX4_Firmware/Tools/setup_gazebo.bash ~/PX4_Firmware/ ~/PX4_Firmware/build/px4_sitl_default
export ROS_PACKAGE_PATH= R O S P A C K A G E P A T H :   / P X 4 F i r m w a r e e x p o r t R O S P A C K A G E P A T H = ROS_PACKAGE_PATH:~/PX4_Firmware export ROS_PACKAGE_PATH= ROSPACKAGEPATH: /PX4FirmwareexportROSPACKAGEPATH=ROS_PACKAGE_PATH:~/PX4_Firmware/Tools/sitl_gazebo
1
2
3
4
执行rostopic echo /mavros/state若出现connected: True,则说明MAVROS与SITL通信成功。
1
执行roslaunch px4 indoor1.launch 遇到的问题

[ 问题1 ] RLException: while processing /home/karasi/PX4_Firmware/launch/single_vehicle_spawn_xtd.launch:Invalid tag: Cannot load command parameter [model_description]: no such command [[‘xmlstarlet’, ‘ed’, ‘-d’, ‘//plugin[@name=“mavlink_interface”]/mavlink_tcp_port’, ‘-s’, ‘//plugin[@name=“mavlink_interface”]’, ‘-t’, ‘elem’, ‘-n’, ‘mavlink_tcp_port’, ‘-v’, ‘4560’, ‘/home/karasi/PX4_Firmware/Tools/sitl_gazebo/models/iris_stereo_camera/iris_stereo_camera.sdf’]]. Param xml is The traceback for the exception was written to the log file

原因:依赖没装全,解决如下

sudo apt install xmlstarlet
1
[ 问题2 ] Traceback (most recent call last): File “multirotor_communication.py”, line 8, in
from pyquaternion import Quaternion ImportError: No module named pyquaternion

原因:python程序在执行的时候缺少py库造成的,若python3安装完,依旧存在缺少问题,说明这里要给python2装。
当电脑同时安装了 python 2.x 和 python3.x时,给Python2.x环境安装包要用pip命令,给python3.x环境安装包要用pip3命令。安装命令如下:

sudo pip3 install pyquaternion
sudo pip install pyquaternion
1
2
[ 问题3 ] [gazebo-2] process has died [pid 24460, exit code 255, cmd /opt/ros/melodic/lib/gazebo_ros/gzserver -e ode
/home/karasi/PX4_Firmware/Tools/sitl_gazebo/worlds/indoor1.world __name:=gazebo __log:=/home/karasi/.ros/log/7812be94-7370-11ec-9bb2-98541b170070/gazebo-2.log]. log file: /home/karasi/.ros/log/7812be94-7370-11ec-9bb2-98541b170070/gazebo-2*.log

原因: 怀疑是gazebo进程的问题,可以试一下消灭gazebo所有进程,再重新roslaunch

killall -9 gzclient
killall -9 gzserver

  • 12
    点赞
  • 18
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 4
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

飞同学

随时为您服务

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值