Skip to content
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

send velocity setpoint to enable proper takeoff/land #12009

Merged
merged 6 commits into from
May 29, 2019
Merged

Conversation

mrivi
Copy link
Contributor

@mrivi mrivi commented May 13, 2019

Send velocity and position setpoints from AutoMapper to enable proper landing. Before this PR, the avoidance only knew about the position waypoint but due to the drift in the local frame that waypoint could have been reached while still being in air.

Needs MAVROS PR mavlink/mavros#1233 otherwise it isn't possible to send to the companion computer vectors containing NAN.

@mrivi mrivi requested a review from MaEtUgR May 13, 2019 10:07
Copy link
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks fine, since it's only sending out points at a different point in the code.

@@ -86,6 +86,8 @@ bool FlightTaskAutoMapper::update()
_generateVelocitySetpoints();
}

_obstacle_avoidance.updateAvoidanceDesiredSetpoints(_position_setpoint, _velocity_setpoint);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it necessary/desired to publish these all the time even if there is no obstacle avoidance enabled or present?
Could it be conditioned by COM_OBS_AVOID either here or inside the updateAvoidanceDesiredSetpoints() function?

mrivi added 3 commits May 27, 2019 10:21
During takeoff you're always in the condition within xy acceptance radius
and more than altitude radius away from the takeoff waypoint
@mrivi
Copy link
Contributor Author

mrivi commented May 27, 2019

@MaEtUgR do you mind reviewing again. There are a few changes:

  • Send velocity and position setpoints from AutoMapper
  • Do not overwrite yaw setpoints with external yaw handling is enabled (necessary for fixed wing)
  • fix bug in the check for mission progression when OA is enabled. We need to progress the mission if we are within the xy acceptance radius but either above or below the wp in z. However this condition is always valid for takeoff thus updating to the successive waypoint too soon (takeoff not yet completed)

Copy link
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see it breaking anything.

Copy link
Member

@MaEtUgR MaEtUgR left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hotfixes look ok

@MaEtUgR MaEtUgR merged commit 119ccc4 into master May 29, 2019
@MaEtUgR MaEtUgR deleted the control_z_vel branch May 29, 2019 13:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants