-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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: Mode Switch Service #24706
AP_DDS: Mode Switch Service #24706
Conversation
38eeaee
to
644b75d
Compare
Nice! Where is the mode switch IDL at? I would like to review the message and compare to rep147 |
@Ryanf55 you can find the IDLs currently defined in the yaml file |
Is there a way to add enums or int constants so the user knows what the modes ID's are? |
644b75d
to
7a1baef
Compare
The service interface definition is in |
7a1baef
to
4ec66c8
Compare
@Ryanf55 , @srmainwaring and @tridge have made the changes that were requested..Would like to know your thoughts |
The name of the IS config file has changed to
ros2 service call /mode_switch ardupilot_msgs/srv/ModeSwitch "{mode: 1}"
requester: making request: ardupilot_msgs.srv.ModeSwitch_Request(mode=1)
response:
ardupilot_msgs.srv.ModeSwitch_Response(status=True, curr_mode=1) with the expected output on the GSC console: Mode ACRO
AP: DDS Client: Request for Mode Switch : SUCCESS |
4ec66c8
to
a3fa6d0
Compare
@srmainwaring done !
|
a3fa6d0
to
937e6bb
Compare
Have replicated the examples. FWIW on macOS there are a few extra / more detailed steps needed to build and run. macOS instructionsBuild colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_MACOSX_RPATH=FALSE -DUAGENT_USE_SYSTEM_FASTDDS=ON -DUAGENT_USE_SYSTEM_FASTCDR=ON -DMIX_ROS_PACKAGES="example_interfaces ardupilot_msgs" --packages-select is-ros2-mix-generator Run LD_LIBRARY_PATH=$(pwd)/install/is-fastdds/lib ./build/is-core/integration-service ./src/ardupilot/libraries/AP_DDS/Is-Config/DDS_Service_IS_config.yaml --is-prefix-path=$(pwd)/install/is-ros2/lib/is/ros2 --is-prefix-path=$(pwd)/install/is-ros2-mix-generator/lib/is Where I've placed the integration service package into the colcon workspace for ros2-ardupilot which reduces the need to switch between multiple projects and workspaces.
It is worth remarking that there is an integration service build dependency on #24705, as without the updated version of |
937e6bb
to
71f0699
Compare
3eb7c3f
to
5294e1b
Compare
5294e1b
to
f5b5e33
Compare
@@ -10,6 +10,7 @@ | |||
#include <AP_BattMonitor/AP_BattMonitor.h> | |||
#include <AP_AHRS/AP_AHRS.h> | |||
#include <AP_Arming/AP_Arming.h> | |||
#include <AP_Vehicle/AP_Vehicle.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The one thing I am unsure about is the circular includes.
Oddly enough, AP_Vehicle.h doesn't include AP_DDS_Client.h.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
AP_Vehicle.h
forward declares AP_DDS_Client
, has a pointer member variable dds_client
, and pulls the include into the translation unit. So I think that's ok.
f5b5e33
to
a4593cf
Compare
a4593cf
to
2241f28
Compare
2241f28
to
c5a6860
Compare
@srmainwaring thanks for the work on #24880 .. have rebased this PR over the latest changes..Hoping to have this merged soon. |
LGTM @arshPratap. Tested in SITL and working fine. |
This PR aims to add Mode Switch service and has a dependency on #24705
@srmainwaring @Ryanf55 @tridge