mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-19 19:09:06 +08:00
ObstacleAvoidance: fix comment, update failsafe position if one axis is NAN
This commit is contained in:
parent
e037edd2cc
commit
eba0bb389a
@ -103,8 +103,8 @@ void ObstacleAvoidance::injectAvoidanceSetpoints(Vector3f &pos_sp, Vector3f &vel
|
||||
PX4_WARN("Obstacle Avoidance system failed, loitering");
|
||||
_publishVehicleCmdDoLoiter();
|
||||
|
||||
if (!PX4_ISFINITE(_failsafe_position(0)) && !PX4_ISFINITE(_failsafe_position(1))
|
||||
&& !PX4_ISFINITE(_failsafe_position(2))) {
|
||||
if (!PX4_ISFINITE(_failsafe_position(0)) || !PX4_ISFINITE(_failsafe_position(1))
|
||||
|| !PX4_ISFINITE(_failsafe_position(2))) {
|
||||
// save vehicle position when entering failsafe
|
||||
_failsafe_position = _position;
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ private:
|
||||
orb_advert_t _pub_vehicle_command{nullptr}; /**< vehicle command do publication */
|
||||
|
||||
matrix::Vector3f _curr_wp = {}; /**< current position triplet */
|
||||
matrix::Vector3f _position = {}; /**< current position triplet */
|
||||
matrix::Vector3f _position = {}; /**< current vehicle position */
|
||||
matrix::Vector3f _failsafe_position = {}; /**< vehicle position when entered in failsafe */
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user