pixhawk连接到nvidia xavier

实物是bluerov。固件是ardusub, 

https://www.ardusub.com/

上图中右下角蓝usb一端接pixhawk,另外一端接xavier。xavier上运行

$ls /dev/ttyA*

会增加设备/dev/ttyACM0 

在xavier端安装好各种mavlink mavproxy 软件包。

$  xargs -a "/home/pcl/mavproxy.param" mavproxy.py

 

参数文件内容mavproxy.param 

--master=/dev/ttyACM0,115200
--load-module='GPSInput,DepthOutput'
--source-system=200
--cmd="set heartbeat 0"
--out udpin:localhost:9000
--out udpbcast:192.168.2.255:14550
--out udpbcast:192.168.2.255:14551
--mav20
--aircraft telemetry
--streamrate -1

 

在工作站电脑上安装Qgroundcontrol mavros.

launch 文件内容

 

<launch>
    <!-- vim: set ft=xml noet : -->
    <!-- example launch script for ArduPilot based FCU's -->
    <arg name="fcu_url" default="udp://:14550@" />
    <arg name="gcs_url" default="udp://127.0.0.1:14551@127.0.0.1:14552" />
    <arg name="tgt_system" default="1" />
    <arg name="tgt_component" default="1" />
    <arg name="log_output" default="screen" />
    <arg name="fcu_protocol" default="v2.0" />
    <arg name="respawn_mavros" default="false" />

    <include file="$(find mavros)/launch/node.launch">
        <arg name="pluginlists_yaml" value="$(find mavros)/launch/apm_pluginlists.yaml" />
        <arg name="config_yaml" value="$(find mavros)/launch/apm_config.yaml" />

        <arg name="fcu_url" value="$(arg fcu_url)" />
        <arg name="gcs_url" value="$(arg gcs_url)" />
        <arg name="tgt_system" value="$(arg tgt_system)" />
        <arg name="tgt_component" value="$(arg tgt_component)" />
        <arg name="log_output" value="$(arg log_output)" />
        <arg name="fcu_protocol" value="$(arg fcu_protocol)" />
        <arg name="respawn_mavros" default="$(arg respawn_mavros)" />
    </include>
</launch>

启动launch之后。

实物图中pixhawk原本连在树莓派上,修改 ip方法
$ sudo vi /etc/network/interfaces.d/interfaces-eth0
$ sudo vi /home/pi/static-ip.conf

顺时针,逆时针
rostopic pub -r 5 /mavros/rc/override mavros_msgs/OverrideRCIn "channels: [1500, 1500, 1500, 1700, 1500, 1500, 1500, 1500]" 
rostopic pub /mavros/rc/override mavros_msgs/OverrideRCIn "channels: [1500, 1500, 1500, 1300, 1500, 1500, 1500, 1500]" 

左,右 x
rostopic pub -r 1 /mavros/rc/override mavros_msgs/OverrideRCIn "channels: [1500, 1500, 1500, 1500, 1500, 1300, 1500, 1500]" 
rostopic pub /mavros/rc/override mavros_msgs/OverrideRCIn "channels: [1500, 1500, 1500, 1500, 1500, 1700, 1500, 1500]" 
前后 y
rostopic pub -r 1 /mavros/rc/override mavros_msgs/OverrideRCIn "channels: [1500, 1500, 1500, 1500, 2000, 1500, 1500, 1500]" 
rostopic pub /mavros/rc/override mavros_msgs/OverrideRCIn "channels: [1500, 1500, 1500, 1500, 1300, 1500, 1500, 1500]" 
上下
rostopic pub /mavros/rc/override mavros_msgs/OverrideRCIn "channels: [1500, 1500, 1700, 1500, 1500, 1500, 1500, 1500]" 
rostopic pub /mavros/rc/override mavros_msgs/OverrideRCIn "channels: [1500, 1500, 1300, 1500, 1500, 1500, 1500, 1500]" 


手柄使能
rosrun mavros mavparam set SYSID_MYGCS 255 
rosservice call /mavros/cmd/arming 1


---------------
ROS使能
rosrun mavros mavparam set SYSID_MYGCS 1
rosservice call /mavros/cmd/arming 1

------------
停止
rosservice call /mavros/cmd/arming 0
----------------
  • 2
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 1
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值