-
Notifications
You must be signed in to change notification settings - Fork 13.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Collision Prevention with distance sensor #12179
Conversation
FYI @mhkabir - I already flew it today and I have few things to fix. I'll keep you updated |
@mrivi You're my hero! When this is done we need to update a couple of docs. Just some notes for me ... off the top of my head:
|
@mhkabir Flight with a distance sensor where really god. Log is coming (Flight Review is down). |
Flight test went well! https://logs.px4.io/plot_app?log=604ebb24-07eb-426f-8a81-3b53c2707fc8 |
FYI @dagar we got a bunch of |
9e1064c
to
71cd278
Compare
a40483d
to
b757b72
Compare
@MaEtUgR would you mind reviewing it? We had good flights with it already |
@dagar with these changes the mc_pos_control is low on stack. See log https://review.px4.io/plot_app?log=4ad9105e-55f1-4f2e-9253-8ea41d2372de |
cd3b510
to
e06cdf9
Compare
f3a136e
to
97c3add
Compare
Out of flash on fmu v2 |
97c3add
to
a340ac7
Compare
void CollisionPrevention::_calculateConstrainedSetpoint(Vector2f &setpoint, | ||
const Vector2f &curr_pos, const Vector2f &curr_vel) | ||
{ | ||
obstacle_distance_s obstacle = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
obstacle_distance_s obstacle = {}; | |
obstacle_distance_s obstacle{}; |
} else { | ||
// if distance data are stale, switch to Loiter and disable Collision Prevention | ||
// such that it is still possible to fly in Position Control Mode | ||
_publishVehicleCmdDoLoiter(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if this is the best way to handle this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@mhkabir what do you suggest?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
IMO this is the best way. If your sensors fail you don't want the drone to continue flying as per normal. Ideally I think this should happen only once per arm, but if that will complicate the architecture a lot this is fine, it just means that you need to disable collision prevention in flight if the sensors fail.
a340ac7
to
e68aaee
Compare
…ensor orientation
…ation to distance sensor
CollisionPrevention: rename a few variables to make the code more readable
…ance sensors even if they are out of range
correct for all sensor orientation
obstacle_distance and distance sensor
…thods, add doxygen on header file
distance sensor such that if one of the two fails the vehicle goes into failsafe, do not switch off CollisionPrevention if it fails
74d4f09
to
f07cf09
Compare
review comments
f07cf09
to
f319813
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @mrivi, let's bring this in.
ROS CI failure unrelated, I see the same failure on master.
Replacement for #10998
Changes:
cm8jl65
distance sensor with an orientation set by a parameter