无人机套件 set_position_target_local_ned_encode

dronekit set_position_target_local_ned_encode

运行 dronekit-python 以 ArduCopter 作为 SITL。在 set_position_local_ned_encode 中指定速度(仅)时,无人机移动几秒钟然后停止。

示例代码 (guided_set_speed_yaw.py) 和仅在适当的初始化之后执行 set_position 的非常小的测试程序都会发生这种情况。所有示例的所有其他部分似乎都工作正常。

Fedora 上的所有 运行。我没有将此列为错误或与此相关的任何问题。任何想法或指示表示赞赏。

ArduCopter 3.3-rc9 添加了 3 秒的速度超时。这是为了防止丢失的连接导致飞行。要继续向同一方向飞行,只需重复发送相同的数据包即可。

对于未来的读者,Ardupilot 的确切定义:

Starting in Copter 3.3, velocity commands should be resent every second (the vehicle will stop after a few seconds if no command is received). Prior to Copter 3.3 the command was persistent, and would only be interrupted when the next movement command was received.

然后 Dronekit:

From Copter 3.3 the vehicle will stop moving if a new message is not received in approximately 3 seconds. Prior to Copter 3.3 the message only needs to be sent once, and the velocity remains active until the next movement command is received. The example code works for both cases!