高速公墓/位置/态度

时间:2015-07-22 18:07:08

标签: dronekit-python dronekit

从高层次来看,我试图将我的Pixhawk遥测数据(特别是GPS位置和车辆姿态)与我的RaspPi 2上的其他传感器数据结合起来,这些数据通过DroneKit连接。我通过GPIO接头连接Pixhawk,Telem 1端口的波特率为115200。

- 我将SR_1遥测率提高到10hz。 - 以10hz运行我的日志代码,但已经以更高的速率验证了类似的结果。 - 我正在使用'属性'功能,即

curr_attitude = vehicle.attitude 

第一个问题是我只看到〜3-4 hz的更新。 SR_1 *费率与我的车辆属性之间是否存在差异?

我的秒问题:是否有更好/更快的方式来获得原始态度和位置信息?

2 个答案:

答案 0 :(得分:1)

可能发送的内容过多。当通道已满时,ardupilot将开始丢弃流,以便为它认为更重要的数据包腾出空间。解决方案是降低其他流速率,尤其是在其之前发送的流。流按此顺序发送:

PARAMS //Don't worry about this one.
RAW_SENS
EXT_STAT
POSITION
RAW_CTRL
RC_CHAN
EXTRA1
EXTRA2
EXTRA3

所以我建议先减少RAW_SENS和EXT_STAT。如果这没有帮助,那么尝试减少所有其他。

答案 1 :(得分:0)

Looking through the source file for api.py, it appears that it updates the attitude/position for the vehicle as soon as it receives it via MavLink.

To determine if the telemetry rate is as fast as you want, you could edit the api.py file method mavlink_packet() at line 427.

If the telemetry rate is indeed 10 hz, it must be the Pixhawk itself at fault. Perhaps you could use Message Factory to request more frequent updates, assuming that the Pixhawk has them available.

Sorry I couldn't give you a more concrete answer, I hope this helped.