clover_vm
clover_vm copied to clipboard
Z-coordinate in frame "terrain" overridden by navigate with z=float('NaN')
Problem occurred a few times, but I can no longer recreate it.
Example code:
set_altitude(z=2, frame_id='terrain')
rospy.sleep(4)
navigate(x=2, y=0, z=float('NaN'), frame_id='body', auto_arm=True)
Expected /simple_offboard/state topic data:
...
xy_frame_id: "map"
z_frame_id: "terrain"
yaw_frame_id: "map"
Actual /simple_offboard/state topic data:
...
xy_frame_id: "map"
z_frame_id: "map"
yaw_frame_id: "map"
Confirmed.
The problem was is that the last remembered setpoint was reset to the current position if auto_arm parameter is True.
I changed this behavior to mode complex: it only happens only if auto_arm parameter actually has come effect (drone is not armed or not in the offboard mode).