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

[uxrce_dds_client] add minimal request-reply support #22313

Merged
merged 2 commits into from
Nov 14, 2023
Merged

Conversation

beniaminopozzan
Copy link
Member

@beniaminopozzan beniaminopozzan commented Nov 5, 2023

New Feature

  • Add minimal support for requests and replies over micro xrce_dds.
  • The service /fmu/vehicle_command:
    VehicleCommand request
    ---
    VehicleCommandAck reply
    
    replaces /fmu/in/vehicle_command and fmu/out/vehicle_command_ack.

Base services

The virtual class SrvBase allows to define new services, each new service must implement its new constructor, the process_request method, which is called whenever a new request is received the process_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 by MAX_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 new px4_msgs::srv::Vehicle_Command service.
Then a modified version of px4_ros_com: PX4/px4_ros_com#207 , which implements a version of the offboard_control node using px4_msgs::srv::Vehicle_Command.

Changelog Entry

For release notes:

update CI (github and Jenkins) to push changes of srv/
to PX4/px4_msgs repo

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
…ervice

Signed-off-by: Beniamino Pozzan <beniamino.pozzan@gmail.com>
@dagar dagar merged commit 58d2bad into main Nov 14, 2023
86 of 88 checks passed
@dagar dagar deleted the pr-uxrce-dds-service branch November 14, 2023 16:29
@DronecodeBot
Copy link

This pull request has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-maintainers-call-november-14-2023/35183/1

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

Successfully merging this pull request may close these issues.

3 participants