[uxrce_dds_client] add minimal request-reply support #22313
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New Feature
/fmu/vehicle_command
:/fmu/in/vehicle_command
andfmu/out/vehicle_command_ack
.Base services
The virtual class
SrvBase
allows to define new services, each new service must implement its new constructor, theprocess_request
method, which is called whenever a new request is received theprocess_reply
method, which process and send the reply.VehicleCommandSrv
gives an example of implementation.The registration of new services is performed by
UxrceddsClient::add_replier()
, the maximum number of services that can be instantiated is fixed byMAX_NUM_REPLIERS
.How to test
The easiest way to test this PR is in simulation.
The PR requires custom versions
px4_msgs
: PX4/px4_msgs#31 , which defines the newpx4_msgs::srv::Vehicle_Command
service.Then a modified version of
px4_ros_com
: PX4/px4_ros_com#207 , which implements a version of theoffboard_control
node usingpx4_msgs::srv::Vehicle_Command
.Changelog Entry
For release notes: