clover_vm icon indicating copy to clipboard operation
clover_vm copied to clipboard

Z-coordinate in frame "terrain" overridden by navigate with z=float('NaN')

Open timkondratev opened this issue 2 years ago • 2 comments

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"

timkondratev avatar Mar 15 '23 19:03 timkondratev

Confirmed.

okalachev avatar Apr 07 '23 13:04 okalachev

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).

okalachev avatar Apr 10 '23 21:04 okalachev