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

DDS: add guided path external control and implement for plane #26339

Open
wants to merge 8 commits into
base: master
Choose a base branch
from

Conversation

srmainwaring
Copy link
Contributor

@srmainwaring srmainwaring commented Feb 27, 2024

Add guided path external control in DDS and implement for Plane.

Details

  • Add new method to AP_ExternalControl: set_path_position_tangent_and_curvature.
  • Provide implementation for Plane in AP_ExternalControl_Plane
  • Update handle_global_position_control in AP_DDS_External_Control to handle path guidance setpoint requests

Dependencies

The path guidance control for plane depends on the changes in:

Tasks

Testing

Run with a modified version of terrain_navigation with the addition of a relay node to forward the mavros GlobalPositionTarget messages onto AP_DDS instead of mavros.

Figure: ROS 2 node graph showing setpoint commands from planner forwarded to AP_DDS
dds_path_rqt

Figure: ROS 2 setpoint messages
dds_path_msg

Figure: rviz view of terrain navigation running via DDS
dds_path_rviz

@srmainwaring srmainwaring marked this pull request as draft February 27, 2024 20:51
@srmainwaring srmainwaring changed the title DDS: add guided path support to external control and implement for plane DDS: add guided path external control and implement for plane Feb 27, 2024
@srmainwaring srmainwaring requested a review from Ryanf55 February 27, 2024 20:52
@srmainwaring srmainwaring force-pushed the prs/pr-plane-dds-guided-path branch 3 times, most recently from 9f4e088 to e81395b Compare March 6, 2024 11:06
@srmainwaring srmainwaring force-pushed the prs/pr-plane-dds-guided-path branch 3 times, most recently from 769ee2d to cd7a712 Compare March 12, 2024 21:08
@srmainwaring srmainwaring marked this pull request as ready for review March 12, 2024 21:17
@srmainwaring srmainwaring force-pushed the prs/pr-plane-dds-guided-path branch from cd7a712 to f237983 Compare March 12, 2024 22:20
@tridge tridge removed the DevCallEU label Mar 13, 2024
@srmainwaring srmainwaring force-pushed the prs/pr-plane-dds-guided-path branch from f237983 to 29efcdb Compare March 13, 2024 08:20
} else {
// moving along a line segment - navigate to wp ahead of closest point
// in direction of path tangent
float ofs_m = 100.0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Should this be the L1 distance?
image

https://mercury.kau.ac.kr/park/Archive/PCUAV/gnc_park_deyst_how.pdf

The paper recommends it be configurable.

- Implement method update_path
- Update comment
- Reduce look-ahead distance in update_path

Signed-off-by: Rhys Mainwaring <[email protected]>
- Add guided path sub-mode

- Extend handling of SET_POSITION_TARGET_GLOBAL_INT to include path guidance
- Check for non-zero velocity and acceleration
- Calculate path curvature and direction
- Force update of adjust_altitude_target.
- Remove duplicate check for guided mode.

Signed-off-by: Rhys Mainwaring <[email protected]>
- Add guided control.
- Update type mask comparisons.
- Satisfy codestyle.

Signed-off-by: Rhys Mainwaring <[email protected]>
@srmainwaring srmainwaring force-pushed the prs/pr-plane-dds-guided-path branch from 29efcdb to 9c40c52 Compare October 28, 2024 14:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: 👀 In review
Development

Successfully merging this pull request may close these issues.

3 participants