Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
Firmware
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alberto Ruiz Garcia
Firmware
Commits
eba0bb38
Commit
eba0bb38
authored
5 years ago
by
Martina Rivizzigno
Committed by
Lorenz Meier
5 years ago
Browse files
Options
Downloads
Patches
Plain Diff
ObstacleAvoidance: fix comment, update failsafe position if one axis is NAN
parent
e037edd2
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/lib/FlightTasks/tasks/Utility/ObstacleAvoidance.cpp
+2
-2
2 additions, 2 deletions
src/lib/FlightTasks/tasks/Utility/ObstacleAvoidance.cpp
src/lib/FlightTasks/tasks/Utility/ObstacleAvoidance.hpp
+1
-1
1 addition, 1 deletion
src/lib/FlightTasks/tasks/Utility/ObstacleAvoidance.hpp
with
3 additions
and
3 deletions
src/lib/FlightTasks/tasks/Utility/ObstacleAvoidance.cpp
+
2
−
2
View file @
eba0bb38
...
...
@@ -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
;
}
...
...
This diff is collapsed.
Click to expand it.
src/lib/FlightTasks/tasks/Utility/ObstacleAvoidance.hpp
+
1
−
1
View file @
eba0bb38
...
...
@@ -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 */
/**
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment