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: Added ROS 2 service support #24145
Conversation
bf928b8
to
aa8dd3e
Compare
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.
Looks good so far. Could you update the README with how to use it so I can test it out?
Are there not any new messages to add to the build?
aa8dd3e
to
0d230db
Compare
@Ryanf55 thanks for the suggestions , have filled in the README as requested ... I hope you guys are able to successfully setup the Integration Services ( just in case , you can also take a look at this to get yourself a bit more familiar with this aspect of the project) |
0d230db
to
2e34ba2
Compare
Some notes for running on macOS and making this PR independent of other projects / repos. 1. Move the ArduPilot custom service definitions into
|
32e4c6c
to
5beb219
Compare
@Ryanf55 @srmainwaring have rebased the branch to the latest master branch and have merged @srmainwaring 's PRs into this branch (as requested). @Ryanf55 I have also worked upon all the suggested changes and would love to know your thoughts on them |
Thanks @arshPratap - the commits to
and squash the changes within those groupings. Alternatively we could break them out into 3 separate PRs - with the custom messages [2] going in first, then [1] which depends on [2], and finally [3] which is intended to simplify the process of setting up and running the service example. @Ryanf55 - your thoughts? Did you manage to resolve the error reported in the integration service terminal that is raised when the service returns it's reply message? I see this in macOS and Ubuntu (so not a macOS thing). Update: This is the error message I see in the integration service terminal:
|
Either approach of 3 commits or 3 PR's sounds good to me, whichever works best for Arsh. I agree- it cannot be done in one single commit. |
5beb219
to
65bb56c
Compare
@arshPratap - here are the logs from running the Arming_DDS_Server example. I see the same error in the IS terminal when running in SITL. Running these versions: repositories:
ardupilot_ros2:
type: git
url: https://github.com/arshPratap/ardupilot_ros2.git
version: ArmingClient
ROS2_DDS_Service_Demo:
type: git
url: https://github.com/arshPratap/ROS2_DDS_Service_Demo.git
version: Ros2ArmingServer
Micro-CDR:
type: git
url: https://github.com/ArduPilot/Micro-CDR.git
version: master
Micro-XRCE-DDS-Client:
type: git
url: https://github.com/ArduPilot/Micro-XRCE-DDS-Client.git
version: master
Micro-XRCE-DDS-Agent:
type: git
url: https://github.com/eProsima/Micro-XRCE-DDS-Agent.git
version: v2.4.0
Integration-Service:
type: git
url: https://github.com/eProsima/Integration-Service.git
version: main
FastDDS-SH:
type: git
url: https://github.com/srmainwaring/FastDDS-SH
version: wips/wip-macos
ROS2-SH:
type: git
url: https://github.com/eProsima/ROS2-SH
version: main MicroXRCEAgent: $ MicroXRCEAgent udp4 -p 2019 -v6
[1688730229.983349] info | UDPv4AgentLinux.cpp | init | running... | port: 2019
[1688730229.984016] info | Root.cpp | set_verbose_level | logger setup | verbose_level: 6
[1688730263.205322] debug | UDPv4AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0x00000000, len: 24, data:
0000: 80 00 00 00 00 01 10 00 58 52 43 45 01 00 01 0F CC CC DD DD 81 00 FC 01
[1688730263.205465] info | Root.cpp | create_client | create | client_key: 0xCCCCDDDD, session_id: 0x81
[1688730263.205503] info | SessionManager.hpp | establish_session | session established | client_key: 0xCCCCDDDD, address: 127.0.0.1:4073
[1688730263.205556] debug | UDPv4AgentLinux.cpp | send_message | [** <<UDP>> **] | client_key: 0xCCCCDDDD, len: 19, data:
0000: 81 00 00 00 04 01 0B 00 00 00 58 52 43 45 01 00 01 0F 00
[1688730263.205634] debug | UDPv4AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0xCCCCDDDD, len: 280, data:
0000: 81 80 00 00 01 05 60 00 00 0A 00 11 01 02 00 42 51 00 00 00 3C 64 64 73 3E 3C 70 61 72 74 69 63
0020: 69 70 61 6E 74 3E 3C 72 74 70 73 3E 3C 6E 61 6D 65 3E 41 72 6D 4D 6F 74 6F 72 73 5F 53 65 72 76
0040: 65 72 3C 2F 6E 61 6D 65 3E 3C 2F 72 74 70 73 3E 3C 2F 70 61 72 74 69 63 69 70 61 6E 74 3E 3C 2F
0060: 64 64 73 3E 00 8B 00 00 01 05 AC 00 00 0B 00 18 08 02 00 00 9E 00 00 00 3C 64 64 73 3E 3C 72 65
0080: 70 6C 69 65 72 20 70 72 6F 66 69 6C 65 5F 6E 61 6D 65 3D 22 41 72 6D 4D 6F 74 6F 72 73 5F 52 65
00A0: 70 6C 69 65 72 22 73 65 72 76 69 63 65 5F 6E 61 6D 65 3D 22 41 72 6D 4D 6F 74 6F 72 73 53 65 72
00C0: 76 69 63 65 22 72 65 71 75 65 73 74 5F 74 79 70 65 3D 22 41 72 6D 4D 6F 74 6F 72 73 5F 52 65 71
00E0: 75 65 73 74 22 72 65 70 6C 79 5F 74 79 70 65 3D 22 41 72 6D 4D 6F 74 6F 72 73 5F 52 65 73 70 6F
0100: 6E 73 65 22 3E 3C 2F 72 65 70 6C 69 65 72 3E 3C 2F 64 64 73 3E 00 00 11
[1688730263.218969] info | ProxyClient.cpp | create_participant | participant created | client_key: 0xCCCCDDDD, participant_id: 0x001(1)
[1688730263.219024] debug | UDPv4AgentLinux.cpp | send_message | [** <<UDP>> **] | client_key: 0xCCCCDDDD, len: 14, data:
0000: 81 80 00 00 05 01 06 00 00 0A 00 11 00 00
[1688730263.219195] debug | UDPv4AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0xCCCCDDDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 01 00 00 00 80
[1688730263.219869] info | ProxyClient.cpp | create_replier | replier created | client_key: 0xCCCCDDDD, requester_id: 0x001(7), participant_id: 0x001(1)
[1688730263.219902] debug | UDPv4AgentLinux.cpp | send_message | [** <<UDP>> **] | client_key: 0xCCCCDDDD, len: 14, data:
0000: 81 80 01 00 05 01 06 00 00 0B 00 18 00 00
[1688730263.219916] debug | UDPv4AgentLinux.cpp | send_message | [** <<UDP>> **] | client_key: 0xCCCCDDDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 01 00 00 00 80
[1688730263.219951] debug | UDPv4AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0xCCCCDDDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 02 00 00 00 80
[1688730263.219969] debug | UDPv4AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0xCCCCDDDD, len: 24, data:
0000: 81 80 01 00 08 01 10 00 00 0C 00 18 80 00 00 01 FF FF 00 00 00 00 00 00
[1688730263.220060] debug | UDPv4AgentLinux.cpp | send_message | [** <<UDP>> **] | client_key: 0xCCCCDDDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 02 00 00 00 80
[1688730422.636606] debug | Replier.cpp | read_fn | [==>> DDS <<==] | client_key: 0x00000001, len: 28, data:
0000: 01 0F 57 FA 62 F2 8D 42 01 00 00 00 00 00 01 03 00 00 00 00 01 00 00 00 01 00 00 00
[1688730422.636692] debug | UDPv4AgentLinux.cpp | send_message | [** <<UDP>> **] | client_key: 0xCCCCDDDD, len: 40, data:
0000: 81 80 02 00 09 01 20 00 00 0C 00 18 01 0F 57 FA 62 F2 8D 42 01 00 00 00 00 00 01 03 00 00 00 00
0020: 01 00 00 00 01 00 00 00
[1688730422.636784] debug | UDPv4AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0xCCCCDDDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 03 00 00 00 80
[1688730423.636880] debug | UDPv4AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0xCCCCDDDD, len: 44, data:
0000: 81 80 02 00 07 01 24 00 00 0D 00 18 01 0F 57 FA 62 F2 8D 42 01 00 00 00 00 00 01 03 00 00 00 00
0020: 01 00 00 00 01 00 00 00 00 00 00 00
[1688730423.637018] debug | Replier.cpp | write | [** <<DDS>> **] | client_key: 0x00000001, len: 32, data:
0000: 01 0F 57 FA 62 F2 8D 42 01 00 00 00 00 00 01 03 00 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00
[1688730423.637115] debug | UDPv4AgentLinux.cpp | send_message | [** <<UDP>> **] | client_key: 0xCCCCDDDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 03 00 00 00 80 Arming_DDS_Server: $ ./a.out 127.0.0.1 2019 1
Entities Created Successfully
Request recieved for Arming
Reply : Armed Integration Service $ LD_LIBRARY_PATH=/Users/rhys/Code/ros2/xrce-dds/eprosima_ws/install/is-fastdds/lib integration-service ./src/ROS2_DDS_Service_Demo/AP_Services/Arming_DDS_Server/Arm_Motors_DDS_IS_config.yaml --is-prefix-path /Users/rhys/Code/ros2/xrce-dds/eprosima_ws/install/is-ros2/lib/is/ros2 --is-prefix-path /Users/rhys/Code/ros2/xrce-dds/eprosima_ws/install/is-ros2-mix-generator/lib/is
[Integration Service][WARN] [is::sh::FastDDS] Participant not provided in configuration file. A participant using the default transport locators and Domain ID 0 will be created.
[Integration Service][INFO] [is::sh::FastDDS::Participant] Created Fast DDS participant 'default_IS-FastDDS-SH_participant' with default QoS attributes and Domain ID: 0
[Integration Service][INFO] [is::sh::FastDDS] Configured!
[Integration Service][INFO] [is::sh::ROS2] Created node '/is_ros2_node_16807' with Domain ID: 0
[Integration Service][INFO] [is::sh::ROS2] Configured!
[Integration Service][INFO] [is::sh::FastDDS::Server] Publisher for topic 'ArmMotorsService_Request' matched
[Integration Service][INFO] [is::sh::FastDDS::Server] Subscriber for topic 'ArmMotorsService_Reply' matched
[Integration Service][INFO] [is::sh::FastDDS] Server created for service 'ArmMotorsService', with request_type 'ArmMotors_Request' and reply_type 'ArmMotors_Response'
[Integration Service][INFO] [is::core::Config] [dds SystemHandle] Produced a service provider for the service 'arm_motors', with request type 'ArmMotors_Request' and reply type 'ArmMotors_Response'.
[Integration Service][INFO] [is::sh::ROS2] Creating entity using the default QoS.
[Integration Service][INFO] [is::sh::ROS2] Created service client for service 'arm_motors' with type 'ap_custom_services/ArmMotors:response' on node '/is_ros2_node_16807'
[Integration Service][INFO] [is::core::Config] [ros2 SystemHandle] Produced a service client for the service 'arm_motors', with request type 'ArmMotors_Request' and reply type 'ArmMotors_Response'.
[Integration Service][INFO] [is::sh::ROS2] Receiving request from ROS 2 for service request topic 'arm_motors_Request'
[Integration Service][INFO] [is::sh::FastDDS::Server] Translating request from Integration Service to DDS for service request topic 'ArmMotorsService_Request': [[ Structure: <ap_custom_services/ArmMotors:request>
[arm] <bool> 1
]]
2023-07-07 12:47:03.637 [RTPS_READER_HISTORY Error] Change payload size of '12' bytes is larger than the history payload size of '8' bytes and cannot be resized. -> Function can_change_be_added_nts
Request timeout. Arm Motors Client: $ ros2 run ap_service_clients arm_motors_client 1
[INFO] [1688730369.125680900] [rclcpp]: Enter Arming Command
arm
[INFO] [1688730427.639468326] [rclcpp]: Motors : Disarmed Successfully or alternatively the ROS 2 service call may be made directly: $ ros2 service call /arm_motors ap_custom_services/srv/ArmMotors "{arm: 0}"
requester: making request: ap_custom_services.srv.ArmMotors_Request(arm=False)
response:
ap_custom_services.srv.ArmMotors_Response(result=False) |
@arshPratap - additional tools: https://github.com/srmainwaring/ROS2_DDS_Service_Demo/tree/wips/wip-ros2-arming-server-fastdds Build:Build a FastDDS server and client based on the AddTwoInts example, and the Micro XRCE Client example service using cmake: $ cd ~/ws/src/ROS2_DDS_Service_Demo/AP_Services/Arming_DDS_Server
$ mkdir build && cd build
$ cmake ..
$ make Expected build outputs:
Example 1: ROS 2 <=> FastDDS:
RunIntegration Service: cd ~ws
$ LD_LIBRARY_PATH=$(pwd)/install/is-fastdds/lib integration-service $(pwd)/src/ROS2_DDS_Service_Demo/AP_Services/Arming_DDS_Server/Arm_Motors_DDS_IS_config.yaml --is-prefix-path $(pwd)/install/is-ros2/lib/is/ros2 --is-prefix-path $(pwd)/install/is-ros2-mix-generator/lib/is
[Integration Service][WARN] [is::sh::FastDDS] Participant not provided in configuration file. A participant using the default transport locators and Domain ID 0 will be created.
[Integration Service][INFO] [is::sh::FastDDS::Participant] Created Fast DDS participant 'default_IS-FastDDS-SH_participant' with default QoS attributes and Domain ID: 0
[Integration Service][INFO] [is::sh::FastDDS] Configured!
[Integration Service][INFO] [is::sh::ROS2] Created node '/is_ros2_node_16807' with Domain ID: 0
[Integration Service][INFO] [is::sh::ROS2] Configured!
[Integration Service][INFO] [is::sh::FastDDS] Server created for service 'ArmMotorsService', with request_type 'ArmMotors_Request' and reply_type 'ArmMotors_Response'
[Integration Service][INFO] [is::core::Config] [dds SystemHandle] Produced a service provider for the service 'arm_motors', with request type 'ArmMotors_Request' and reply type 'ArmMotors_Response'.
[Integration Service][INFO] [is::sh::ROS2] Creating entity using the default QoS.
[Integration Service][INFO] [is::sh::ROS2] Created service client for service 'arm_motors' with type 'ap_custom_services/ArmMotors:response' on node '/is_ros2_node_16807'
[Integration Service][INFO] [is::core::Config] [ros2 SystemHandle] Produced a service client for the service 'arm_motors', with request type 'ArmMotors_Request' and reply type 'ArmMotors_Response'.
[Integration Service][INFO] [is::sh::FastDDS::Server] Publisher for topic 'ArmMotorsService_Request' matched
[Integration Service][INFO] [is::sh::FastDDS::Server] Subscriber for topic 'ArmMotorsService_Reply' matched FastDDS arming service: $ cd ~/ws/src/ROS2_DDS_Service_Demo/AP_Services/Arming_DDS_Server/build
$ ./ArmMotors -m server
ArmMotorsService server running under DDS Domain ID: 0
ArmMotorsService server running. Please press enter to stop it at any time. ROS 2 CLI service call: ros2 service call /arm_motors ap_custom_services/srv/ArmMotors "{arm: 1}"
requester: making request: ap_custom_services.srv.ArmMotors_Request(arm=True)
response:
ap_custom_services.srv.ArmMotors_Response(result=True) OutputsIntegration Service output: [Integration Service][INFO] [is::sh::ROS2] Receiving request from ROS 2 for service request topic 'arm_motors_Request'
[Integration Service][INFO] [is::sh::FastDDS::Server] Translating request from Integration Service to DDS for service request topic 'ArmMotorsService_Request': [[ Structure: <ap_custom_services/ArmMotors:request>
[arm] <bool> 1
]]
[Integration Service][INFO] [is::sh::FastDDS::Server] Receiving reply from DDS for service reply topic 'ArmMotorsService_Reply'
[Integration Service][INFO] [is::sh::ROS2] Translating reply from Integration Service to ROS 2 for service reply topic 'arm_motors_Reply': [[ Structure: <ArmMotors_Response>
[result] <bool> 1
]] FastDDS arming service: ArmMotorsService server: processing incoming request, arm 1
- Sending back response: 1 Example 2: FastDDS <=> Micro XRCE Agent <=> Micro XRCE Client:
RunIntegration Service: (As per the first example). Micro XRCE Agent:
Micro XRCE Client arming service: $ cd ~/ws/src/ROS2_DDS_Service_Demo/AP_Services/Arming_DDS_Server/build
./ArmMotorsMicro 127.0.0.1 2019 FastDDS service call: $ cd ~/ws/src/ROS2_DDS_Service_Demo/AP_Services/Arming_DDS_Server/build
$ ./ArmMotors -m client -c 1
ArmMotorsService client running under DDS Domain ID: 0
ArmMotorsService client performing 1 requests.
ArmMotorsService client:
- Request 1
2023-07-08 16:15:11.918 [RTPS_READER_HISTORY Error] Change payload size of '12' bytes is larger than the history payload size of '11' bytes and cannot be resized. -> Function can_change_be_added_nts
- Error: client exceeded maximum time to wait for a response! OutputsIntegration Service output: $ LD_LIBRARY_PATH=$(pwd)/install/is-fastdds/lib integration-service $(pwd)/src/ROS2_DDS_Service_Demo/AP_Services/Arming_DDS_Server/Arm_Motors_DDS_IS_config.yaml --is-prefix-path $(pwd)/install/is-ros2/lib/is/ros2 --is-prefix-path $(pwd)/install/is-ros2-mix-generator/lib/is
[Integration Service][WARN] [is::sh::FastDDS] Participant not provided in configuration file. A participant using the default transport locators and Domain ID 0 will be created.
[Integration Service][INFO] [is::sh::FastDDS::Participant] Created Fast DDS participant 'default_IS-FastDDS-SH_participant' with default QoS attributes and Domain ID: 0
[Integration Service][INFO] [is::sh::FastDDS] Configured!
[Integration Service][INFO] [is::sh::ROS2] Created node '/is_ros2_node_16807' with Domain ID: 0
[Integration Service][INFO] [is::sh::ROS2] Configured!
[Integration Service][INFO] [is::sh::FastDDS::Server] Publisher for topic 'ArmMotorsService_Request' matched
[Integration Service][INFO] [is::sh::FastDDS::Server] Subscriber for topic 'ArmMotorsService_Reply' matched
[Integration Service][INFO] [is::sh::FastDDS] Server created for service 'ArmMotorsService', with request_type 'ArmMotors_Request' and reply_type 'ArmMotors_Response'
[Integration Service][INFO] [is::core::Config] [dds SystemHandle] Produced a service provider for the service 'arm_motors', with request type 'ArmMotors_Request' and reply type 'ArmMotors_Response'.
[Integration Service][INFO] [is::sh::ROS2] Creating entity using the default QoS.
[Integration Service][INFO] [is::sh::ROS2] Created service client for service 'arm_motors' with type 'ap_custom_services/ArmMotors:response' on node '/is_ros2_node_16807'
[Integration Service][INFO] [is::core::Config] [ros2 SystemHandle] Produced a service client for the service 'arm_motors', with request type 'ArmMotors_Request' and reply type 'ArmMotors_Response'.
2023-07-08 16:15:11.918 [RTPS_READER_HISTORY Error] Change payload size of '12' bytes is larger than the history payload size of '8' bytes and cannot be resized. -> Function can_change_be_added_nts Micro XRCE Client arming service: $ ./ArmMotorsMicro 127.0.0.1 2019
Entities Created Successfully
Request recieved for Arming
Reply : Armed Micro XRCE Agent: $ MicroXRCEAgent udp4 -p 2019 -v6
[1688829296.438878] info | UDPv4AgentLinux.cpp | init | running... | port: 2019
[1688829296.439526] info | Root.cpp | set_verbose_level | logger setup | verbose_level: 6
[1688829299.514055] debug | UDPv4AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0x00000000, len: 24, data:
0000: 80 00 00 00 00 01 10 00 58 52 43 45 01 00 01 0F CC CC DD DD 81 00 FC 01
[1688829299.514166] info | Root.cpp | create_client | create | client_key: 0xCCCCDDDD, session_id: 0x81
[1688829299.514204] info | SessionManager.hpp | establish_session | session established | client_key: 0xCCCCDDDD, address: 127.0.0.1:43263
[1688829299.514260] debug | UDPv4AgentLinux.cpp | send_message | [** <<UDP>> **] | client_key: 0xCCCCDDDD, len: 19, data:
0000: 81 00 00 00 04 01 0B 00 00 00 58 52 43 45 01 00 01 0F 00
[1688829299.514337] debug | UDPv4AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0xCCCCDDDD, len: 280, data:
0000: 81 80 00 00 01 05 60 00 00 0A 00 11 01 02 00 42 51 00 00 00 3C 64 64 73 3E 3C 70 61 72 74 69 63
0020: 69 70 61 6E 74 3E 3C 72 74 70 73 3E 3C 6E 61 6D 65 3E 41 72 6D 4D 6F 74 6F 72 73 5F 53 65 72 76
0040: 65 72 3C 2F 6E 61 6D 65 3E 3C 2F 72 74 70 73 3E 3C 2F 70 61 72 74 69 63 69 70 61 6E 74 3E 3C 2F
0060: 64 64 73 3E 00 8B 00 00 01 05 AC 00 00 0B 00 18 08 02 00 00 9E 00 00 00 3C 64 64 73 3E 3C 72 65
0080: 70 6C 69 65 72 20 70 72 6F 66 69 6C 65 5F 6E 61 6D 65 3D 22 41 72 6D 4D 6F 74 6F 72 73 5F 52 65
00A0: 70 6C 69 65 72 22 73 65 72 76 69 63 65 5F 6E 61 6D 65 3D 22 41 72 6D 4D 6F 74 6F 72 73 53 65 72
00C0: 76 69 63 65 22 72 65 71 75 65 73 74 5F 74 79 70 65 3D 22 41 72 6D 4D 6F 74 6F 72 73 5F 52 65 71
00E0: 75 65 73 74 22 72 65 70 6C 79 5F 74 79 70 65 3D 22 41 72 6D 4D 6F 74 6F 72 73 5F 52 65 73 70 6F
0100: 6E 73 65 22 3E 3C 2F 72 65 70 6C 69 65 72 3E 3C 2F 64 64 73 3E 00 00 11
[1688829299.530461] info | ProxyClient.cpp | create_participant | participant created | client_key: 0xCCCCDDDD, participant_id: 0x001(1)
[1688829299.530528] debug | UDPv4AgentLinux.cpp | send_message | [** <<UDP>> **] | client_key: 0xCCCCDDDD, len: 14, data:
0000: 81 80 00 00 05 01 06 00 00 0A 00 11 00 00
[1688829299.530736] debug | UDPv4AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0xCCCCDDDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 01 00 00 00 80
[1688829299.532110] info | ProxyClient.cpp | create_replier | replier created | client_key: 0xCCCCDDDD, requester_id: 0x001(7), participant_id: 0x001(1)
[1688829299.532153] debug | UDPv4AgentLinux.cpp | send_message | [** <<UDP>> **] | client_key: 0xCCCCDDDD, len: 14, data:
0000: 81 80 01 00 05 01 06 00 00 0B 00 18 00 00
[1688829299.532171] debug | UDPv4AgentLinux.cpp | send_message | [** <<UDP>> **] | client_key: 0xCCCCDDDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 01 00 00 00 80
[1688829299.532221] debug | UDPv4AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0xCCCCDDDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 02 00 00 00 80
[1688829299.532269] debug | UDPv4AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0xCCCCDDDD, len: 24, data:
0000: 81 80 01 00 08 01 10 00 00 0C 00 18 80 00 00 01 FF FF 00 00 00 00 00 00
[1688829299.532365] debug | UDPv4AgentLinux.cpp | send_message | [** <<UDP>> **] | client_key: 0xCCCCDDDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 02 00 00 00 80
[1688829310.917022] debug | Replier.cpp | read_fn | [==>> DDS <<==] | client_key: 0x00000001, len: 28, data:
0000: 01 0F 7A 56 DE 01 9C E7 01 00 00 00 00 00 01 03 00 00 00 00 01 00 00 00 01 00 00 00
[1688829310.917083] debug | UDPv4AgentLinux.cpp | send_message | [** <<UDP>> **] | client_key: 0xCCCCDDDD, len: 40, data:
0000: 81 80 02 00 09 01 20 00 00 0C 00 18 01 0F 7A 56 DE 01 9C E7 01 00 00 00 00 00 01 03 00 00 00 00
0020: 01 00 00 00 01 00 00 00
[1688829310.917152] debug | UDPv4AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0xCCCCDDDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 03 00 00 00 80
[1688829311.918279] debug | UDPv4AgentLinux.cpp | recv_message | [==>> UDP <<==] | client_key: 0xCCCCDDDD, len: 44, data:
0000: 81 80 02 00 07 01 24 00 00 0D 00 18 01 0F 7A 56 DE 01 9C E7 01 00 00 00 00 00 01 03 00 00 00 00
0020: 01 00 00 00 01 00 00 00 00 00 00 00
[1688829311.918446] debug | Replier.cpp | write | [** <<DDS>> **] | client_key: 0x00000001, len: 32, data:
0000: 01 0F 7A 56 DE 01 9C E7 01 00 00 00 00 00 01 03 00 00 00 00 01 00 00 00 01 00 00 00 00 00 00 00
[1688829311.918508] debug | UDPv4AgentLinux.cpp | send_message | [** <<UDP>> **] | client_key: 0xCCCCDDDD, len: 13, data:
0000: 81 00 00 00 0A 01 05 00 03 00 00 00 80 NotesDon't require the Integration Service - it's enough to run the Micro XRCE Agent / Client and FastDDS client.
So the timeout issue has nothing to do with the ROS2-SH plugin. |
Hi @arshPratap, when including:
the commits to Might be easier if we break them out from this PR, get - arshPratap#8 merged first and follow up with arshPratap#9 after this. Update Submitted PRs for the contributions to |
6542c3d
to
9456585
Compare
Hi @arshPratap - thanks for getting all the changes in. I have run a clean build and test of the most recent version and appears to be working. Tested the following:
|
With the testing of @srmainwaring , I'm happy to let this in and resolve the integration service compilation issues on my side separately. @arshPratap Please fix the merge conflicts, and we can merge it. Many thanks. |
24dbca4
to
f5456c9
Compare
@srmainwaring @Ryanf55 thanks for the review and testing .. I have made the requested changes and have pushed in the code |
Please run pre-commit, it is failing on cd /your/path/to/ardupilot
python3 -m pip install pre-commit
pre-commit install
pre-commit run --files libraries/AP_DDS/* -v |
f5456c9
to
073ec4e
Compare
thanks @Ryanf55 ... have applied the changes |
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.
As mentioned in chat, I am strongly opposed to the modified logging method that is globally applied to all the logging. I would be happy to accept the PR without it. If it's not too work, split those changes to another PR, and this can go in. Changing the logging methodology to hide errors is not part of ROS 2 service support.
@tridge is it alright if I split the logging changes to another PR as @Ryanf55 suggests ? Or should it be in this PR |
@Ryanf55 I'm fine with the debug being a separate PR. It should probably take an enum level. Main reason for changing is right now we do SEND_TEXT on every message, which would be complete impractical while flying (would flood the radio link). For example, on every joystick pkt |
Thanks for the explanation. Totally on board; it wasn't the intent to leave those once the interfaces were developed. We can figure better plan in the next PR. |
073ec4e
to
b9534a3
Compare
b9534a3
to
680814f
Compare
thanks @Ryanf55 for the review..have made the changes as requested |
680814f
to
bbef54e
Compare
bbef54e
to
e5b77eb
Compare
This is work in progress PR that aims to provide support for service support as requested in #23822 and will work as a foundation for #23363 . Currently we focus on providing support for Arming / Disarming motors.
@Ryanf55 @srmainwaring @tridge would like to know your thoughts on this