forked from ArduPilot/ardupilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2e872f9
commit 24dbca4
Showing
6 changed files
with
253 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#include "uxr/client/client.h" | ||
|
||
enum class ServiceIndex: uint8_t { | ||
ARMING_MOTORS | ||
}; | ||
|
||
static inline constexpr uint8_t to_underlying(const ServiceIndex index) | ||
{ | ||
static_assert(sizeof(index) == sizeof(uint8_t)); | ||
return static_cast<uint8_t>(index); | ||
} | ||
|
||
constexpr struct AP_DDS_Client::Service_table AP_DDS_Client::services[] = { | ||
{ | ||
.req_id = to_underlying(ServiceIndex::ARMING_MOTORS), | ||
.rep_id = to_underlying(ServiceIndex::ARMING_MOTORS), | ||
.srv_profile_label = "ArmMotorsService", | ||
.req_profile_label = "", | ||
.rep_profile_label = "ArmMotors_Replier", | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
types: | ||
idls: | ||
- > | ||
struct ArmMotors_Request | ||
{ | ||
boolean arm; | ||
}; | ||
struct ArmMotors_Response | ||
{ | ||
boolean result; | ||
}; | ||
systems: | ||
dds: { type: fastdds } | ||
ros2: { type: ros2 } | ||
|
||
routes: | ||
dds_server: | ||
server: dds | ||
clients: ros2 | ||
|
||
services: | ||
arm_motors: { | ||
request_type: ArmMotors_Request, | ||
reply_type: ArmMotors_Response, | ||
route: dds_server, | ||
remap: { | ||
dds: { | ||
topic: ArmMotorsService, | ||
}, | ||
ros2: { | ||
request_type: "ardupilot_msgs/ArmMotors:request", | ||
reply_type: "ardupilot_msgs/ArmMotors:response" | ||
} | ||
} | ||
} |
Oops, something went wrong.