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: ArduPilot Parameter Reading/Writing through DDS interface #28292

Closed
PQuill33 opened this issue Oct 2, 2024 · 2 comments
Closed

AP_DDS: ArduPilot Parameter Reading/Writing through DDS interface #28292

PQuill33 opened this issue Oct 2, 2024 · 2 comments
Labels
Milestone

Comments

@PQuill33
Copy link

PQuill33 commented Oct 2, 2024

It would be helpful to have read/write access to ardupilot parameters for all vehicle types through the ROS2/DDS interface.

Proposed Solution
Use ros2 service calls to set/read parameters from ArduPilot by exposing the SetParameters and GetParameters interface from rcl_interfaces.

To set a parameter:

  • Create /ap/set_parameters service of type rcl_interfaces/srv/SetParameters.srv
  • Response is an array of type rcl_interfaces/msg/SetParametersResult.msg

To retrieve a parameter:

  • Create /ap/get_parameters service of type rcl_interfaces/srv/GetParameters.srv
  • Response is an array of type rcl_interfaces/msg/ParameterValue.msg

I would add code to the AP_DDS_Client interface to get/set the parameters based on the service call.

Alternative Approach
Is it possible to declare the ardupilot parameters in a way that the ros2 param set/get CLI works? My concern is that there are a lot of parameters and I'm not sure the best way to declare them all for this kind of usage.

Platform
[ X ] All
[ ] AntennaTracker
[ ] Copter
[ ] Plane
[ ] Rover
[ ] Submarine

Additional context
rcl_interfaces: https://github.com/ros2/rcl_interfaces

Similar to issue in ticket: #23309

@Ryanf55 Ryanf55 added the ROS label Oct 2, 2024
@Ryanf55 Ryanf55 added this to DDS/ROS2 Oct 2, 2024
@Ryanf55 Ryanf55 added this to the DDS 4.6 milestone Oct 2, 2024
@PQuill33
Copy link
Author

PQuill33 commented Oct 3, 2024

Here is a draft PR with some work towards a set parameter service
#28298

@Ryanf55
Copy link
Collaborator

Ryanf55 commented Nov 15, 2024

This is now complete. Woohoo!

@Ryanf55 Ryanf55 closed this as completed Nov 15, 2024
@github-project-automation github-project-automation bot moved this to ✅ Done in DDS/ROS2 Nov 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Done
Development

No branches or pull requests

2 participants