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

AP_DDS: Copter takeoff service #26911

Merged
merged 4 commits into from
Nov 23, 2024
Merged

Conversation

snktshrma
Copy link
Contributor

Added a service for copter to accept takeoff commands using native DDS support.

@snktshrma snktshrma force-pushed the dds-copter-arming branch 3 times, most recently from 7e8d6ef to 1d552af Compare April 28, 2024 21:17
@Ryanf55 Ryanf55 added the ROS label Apr 28, 2024
@Ryanf55 Ryanf55 self-assigned this Apr 28, 2024
@Ryanf55 Ryanf55 self-requested a review April 28, 2024 23:58
Copy link
Collaborator

@Ryanf55 Ryanf55 left a comment

Choose a reason for hiding this comment

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

Looks pretty good.

Can you update libraries/AP_DDS/README.md for the new service channel?
Also, if you can, is it possible to add a test for it?

Tools/ros2/ardupilot_msgs/srv/Takeoff.srv Outdated Show resolved Hide resolved
Tools/ros2/ardupilot_msgs/srv/Takeoff.srv Outdated Show resolved Hide resolved
@snktshrma
Copy link
Contributor Author

Looks pretty good.

Can you update libraries/AP_DDS/README.md for the new service channel? Also, if you can, is it possible to add a test for it?

Alright! I'll add a test for it

@snktshrma snktshrma force-pushed the dds-copter-arming branch 2 times, most recently from 1c47c93 to 433091c Compare April 29, 2024 09:04
@snktshrma
Copy link
Contributor Author

snktshrma commented Apr 29, 2024

Looks pretty good.

Can you update libraries/AP_DDS/README.md for the new service channel? Also, if you can, is it possible to add a test for it?

I have added the test @Ryanf55

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Apr 29, 2024

Can you fix the build errors?
https://github.com/ArduPilot/ardupilot/actions/runs/8877225483/job/24370361196?pr=26911#step:7:2931

@snktshrma snktshrma force-pushed the dds-copter-arming branch 2 times, most recently from cd9a217 to abe32b2 Compare April 30, 2024 05:46
@snktshrma
Copy link
Contributor Author

Can you fix the build errors? https://github.com/ArduPilot/ardupilot/actions/runs/8877225483/job/24370361196?pr=26911#step:7:2931

This build error is fixed @Ryanf55

@srmainwaring
Copy link
Contributor

@snktshrma, @Ryanf55 - while working on support for AP in Aerostack2 I examined the PX4 msgs and services for comparison (PX4 added a service interface at the end of last year for vehicle commands). The service request message structure is similar to the mavlink equivalent: https://github.com/PX4/px4_msgs/blob/main/msg/VehicleCommand.msg. Wondering whether we want to use something similar rather than add many separate messages for the various commands?

@snktshrma
Copy link
Contributor Author

snktshrma commented Jun 22, 2024

hi @srmainwaring !
That seems a feasible idea. It'll be easier for users also to have command of all the required functions.
Though I think there are some persisting issues with DDS like float issue, which needs to be solved alongside.

ArduCopter/Copter.h Outdated Show resolved Hide resolved
libraries/AP_DDS/README.md Outdated Show resolved Hide resolved
Tools/ros2/ardupilot_msgs/srv/Takeoff.srv Outdated Show resolved Hide resolved
Tools/ros2/ardupilot_msgs/srv/Takeoff.srv Outdated Show resolved Hide resolved
@snktshrma snktshrma force-pushed the dds-copter-arming branch 2 times, most recently from 69ac7e8 to 4ebbf38 Compare September 24, 2024 17:34
@Ryanf55
Copy link
Collaborator

Ryanf55 commented Oct 19, 2024

Looks good. The reason the diff looks bad is because you reordered two methods. This introduces noise in the diff.
image

I'm going to force push to put these back to original, which will make it quicker to review/merge.
image

Hopefully during the conference this week.

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Oct 29, 2024

@snktshrma Now that all the services are wrapped in ifdefs, can you rebase and add that for this PR?
AP_DDS_COPTER_TAKEOFF_SERVICE or something similar could be a good name for it.

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Nov 16, 2024

Hi @snktshrma Please let me know if you can do this or need someone else. We really want this capability in 4.6.

@snktshrma
Copy link
Contributor Author

snktshrma commented Nov 16, 2024

Hi @snktshrma Please let me know if you can do this or need someone else. We really want this capability in 4.6.

Hi @Ryanf55 ! I’m missed your previous comment but I’ll make the changes and push the updates asap.

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Nov 17, 2024

Please fix the astyle cleanliness. ./Tools/scripts/run_astyle.py

Copy link
Contributor

@rmackay9 rmackay9 left a comment

Choose a reason for hiding this comment

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

The Copter changes are tiny so I'm happy. I haven't reviewed the DDS changes but I trust others will ensure that part is correct

@snktshrma snktshrma force-pushed the dds-copter-arming branch 4 times, most recently from 80c2e3b to c15c9e7 Compare November 21, 2024 08:00
@rmackay9 rmackay9 merged commit f5c28cc into ArduPilot:master Nov 23, 2024
99 checks passed
@peterbarker
Copy link
Contributor

peterbarker commented Nov 23, 2024

Board                    AP_Periph  blimp  bootloader  copter  heli  iofirmware  plane  rover  sub
CubeBlack                           0      *           0       0                 0      0      0
CubeOrange-periph-heavy  *                                                                     
CubeOrangePlus                      0      *           0       0                 0      0      0
CubeRedPrimary                      0      *           0       0                 0      0      0
Durandal                            0      *           0       0                 0      0      0
Hitec-Airspeed           *                                                                     
KakuteH7-bdshot                     0      *           0       0                 0      0      0
MatekF405                           16     *           88      88                8      8      8
Pixhawk1-1M-bdshot                  8                  96      88                8      8      8
f103-QiotekPeriph        *                                                                     
f303-Universal           *                                                                     
iomcu                                                                *                         
revo-mini                           8      *           88      96                8      8      8
skyviper-journey                                       88                                      
skyviper-v2450                                         88                                      

... this is costing us bytes.... but DDS is disabled by default. This isn't good....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

7 participants