Commit Graph

51 Commits

Author SHA1 Message Date
arshPratap 8c2627ca40 AP_DDS: Added Mode Switch Service 2023-09-11 09:50:14 +10:00
Rhys Mainwaring eeb5227228 AP_DDS: update dds profile, eliminate need for integration service
- Use type and topic name mapping rules in the arm_motors service profile.
- Remove the integration service configuration file.
- Update the service section in the README and document the topic and service mapping rules.

Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
2023-09-07 08:46:05 +10:00
Rhys Mainwaring 7897f7bfe7 AP_DDS: add IDL for ArmMotors and ModeSwitch services
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
2023-09-07 08:45:32 +10:00
pedro-fuoco 62b15a8af0 AP_DDS: Accept body-frame velocity inputs 2023-09-06 20:31:19 +10:00
pedro-fuoco 15702c46b0 AP_DDS: subscribe to /tf instead of /ap/tf
README update cointains the new topic name
2023-09-05 12:30:40 +10:00
Ryan Friedman d31896a545 AP_DDS: Stub out external odom
* Implement frame ID checking and test it
* Implement the visual odom function that does narrowing to floats
* Normalize quaternions from ROS
* Supply 0 error to EKF
* Handle external odomo only if HAL_VISUALODOM_ENABLED is defined
* Implement odom timestamping and improve docs
* Add unit tests
* Add a CONFIG file for DDS

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-08-24 07:46:06 +10:00
Andrew Tridgell 847c7980c7 AP_DDS: use AP_ExternalControl for velocity control
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
Co-authored-by: Andrew Tridgell <tridge60@gmail.com>
2023-08-22 18:21:23 +10:00
Ryan Friedman e14afa6f2b AP_DDS: Add AP_DDS_config.h for feature defines
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-08-18 08:35:24 +10:00
Ryan Friedman 2c5f90adca AP_DDS: Enable the DDS parameter by default
* DDS is still disabled by default in all builds for the library level compile flag
* This parameter was blocking running ROS 2 automated testing in CI
* This can be changed once ENABLE_DDS compiler flag is enabled in SITL or for the 4.5 release

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-08-15 18:32:39 +10:00
arshPratap 47efaf9c62 AP_DDS: Added ROS 2 service support 2023-08-11 13:35:49 +10:00
Ryan Friedman be5d846af0 AP_DDS: Switch topic to cmd_vel
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-08-08 15:35:43 +10:00
Ryan Friedman 9b0f485fee AP_DDS: Add velocity control DDS subscriber
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-08-08 15:35:43 +10:00
Ryan Friedman 01c5f44556 AP_DDS: Add dynamic TF subscriber support
* This is the first step for GSOC Cartographer external odometry input
* Moved subscriber data members to class member variables

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-07-31 13:28:10 +10:00
Rhys Mainwaring 3bb6fb460e AP_DDS: fix reliable stream buffer size
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
2023-07-19 16:59:38 +09:00
Ryan Friedman f3a6c71c6b AP_DDS: Update docs for supported topics
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-06-16 22:39:26 +10:00
Ryan Friedman 2b906bc714 AP_DDS: Fix typo with pts serial port when in UDP
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-06-08 20:20:21 +10:00
Ryan Friedman da2beb1ec1 AP_DDS: Improve subscriber safety
* Remove unused void* functions
* Switch subscriber handling based on ID
* Use enums instead of relying on manual alignment of indices in code
* Pass topic by reference using local stack
* Relates to #23964

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-06-08 09:47:50 +10:00
Ryan Friedman 8cf855970d AP_DDS: Fix unitialized memory
* Found under valgrind

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-06-06 10:42:02 +10:00
arshPratap 5168f39463 AP_DDS: Add Subscriber support with Joy
* Register subscriber and deserialize sensor_msgs/Joy

Co-authored-by: Rhys Mainwaring <rhys.mainwaring@me.com>
Co-authored-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-06-01 11:37:59 +10:00
Ryan Friedman a53cac8241 AP_DDS: Add UDP instructions to README
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-05-25 11:26:37 +10:00
Rhys Mainwaring fd775bf08d AP_DDS: update README
- Update list of available topics.

Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
2023-05-14 06:20:12 +10:00
Rhys Mainwaring 56ed76f479 AP_DDS: add publisher for rosgraph_msgs/msg/Clock
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
2023-05-14 06:20:12 +10:00
Rhys Mainwaring 371c19bb32 AP_DDS: rename topic name for builtin_interfaces/msg/Time
- Rename to ap/time as ap/clock should be for rosgraph_msgs/msg/Clock

Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
2023-05-14 06:20:12 +10:00
Rhys Mainwaring c60796a0df AP_DDS: add IDL for rosgraph_msgs/msg/Clock
Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
2023-05-14 06:20:12 +10:00
pedro-fuoco c044ba67cc AP_DDS: Support single precision hw 2023-05-09 11:06:59 +10:00
pedro-fuoco 57c2753bdd AP_DDS: Add GeoPose support
* Add GeoPoint.idl
* Add GeoPose.idl
* Add GeoPoseStamped.idl
* Update geopose topic name to follow #23603
* Add GeoPose topic support

Co-authored-by: Pedro Fuoco <pedrofuoco6@gmail.com>
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-05-05 12:02:31 +10:00
arshPratap fbc7a6dd9b AP_DDS: support UDP transport
and switch serial transport to use custom transport
2023-05-03 15:22:42 +10:00
Rhys Mainwaring a654027a45 AP_DDS: update topic names
- Change to lower case and prefix with /ap

Signed-off-by: Rhys Mainwaring <rhys.mainwaring@me.com>
2023-04-28 07:37:04 +10:00
pedro-fuoco 819431050a AP__DDS: update velocity topic name to follow #23603 2023-04-28 07:36:00 +10:00
pedro-fuoco 2298048079 AP_DDS: Add local velocity publisher 2023-04-28 07:36:00 +10:00
pedro-fuoco 171e09d28c AP_DDS: Add local pose publisher 2023-04-25 14:18:54 +10:00
Ryan Friedman bb6c872138 AP_DDS: Publish NavSatFix as soon as its available
* Removes the hard coded timing, now it's driven by the GPS update times
* Changed the function signature to return true if the data topic has been changed

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-04-22 11:04:49 +10:00
Ryan Friedman edde5d2e48 AP_DDS: Add developer recommended steps for pre-commit
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-04-22 11:03:04 +10:00
Ryan Friedman 7ff2a9eec3 AP_DDS: Use mirror of DDS Gen
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-04-22 08:28:58 +10:00
pedro-fuoco 72a693e68e AP_DDS: Switch BatteryState topic to sensor data QOS
Resolves #23365 for the BatteryState topic
2023-04-15 09:40:33 +10:00
pedro-fuoco e1b06a1b99 AP_DDS: Integrate AP_BattMonitor to work with AP_DDS
* Edit BatteryState.idl
* Add BatteryState to AP_DDS_Topic_table.h
* Add BatteryState to the DDS Client
	* Add voltage
	* Add temperature
	* Add current
	* Add charge
	* Add capacity with NAN value
	* Add design_capacity
	* Add percentage
	* Add power_supply_status
	* Add power_supply_health
	* Add power_supply_technology with 0 value
	* Add present
	* Cell_voltage and Serial_number need to be implemented in the future
	* Did not add cell_temperature as AP_BattMonitor doesn't support it
	* Did not add location as this is a generic implementation
* Parameterize battery instance number
2023-04-15 09:40:33 +10:00
Ryan Friedman 9e9d487442 AP_DDS: Consume covariance implementation in AP_DDS
* Use float precision as long as possible

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-04-14 12:06:42 +10:00
Ryan Friedman 06d9a08d16 AP_DDS: Remove unused commented code
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-04-14 12:05:14 +10:00
arshPratap 63ed2c646e AP_DDS: Preserve folder structure and includes for IDL files
* Remove ALL local changes in IDL (it mirrors upstream)
* Convert to pathlib for more robust manipulation
* Added EOF newlines for all the other missing IDL files

Co-authored-by: Arsh Pratap <arshpratapofficial@gmail.com>
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-04-14 12:05:14 +10:00
Ryan Friedman 80ed6125aa AP_DDS: Add support for static transforms
* This encodes the position of the GPS receivers relative to the aircraft origin

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-04-13 07:05:24 +10:00
pedro-fuoco ffed6e0f26 AP_DDS: Switch NavSatFix topic to sensor data QOS
* Change Reliability to BEST_EFFORT
* Change Durability to VOLATILE
* Change to smaller queue size on NavSatFix QOS
2023-04-04 10:48:29 +10:00
Ryan Friedman 9633950098 AP_DDS: Use GPS semaphore
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-03-30 13:41:28 +11:00
Ryan Friedman a610474cdc AP_DDS: Parametrize the GPS instance number
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-03-30 13:41:28 +11:00
Ryan Friedman ee59d527e8 AP_DDS: Fix spelling in participant name
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-03-30 13:41:28 +11:00
Ryan Friedman 863656b037 AP_DDS: Add multi-topic support with NavSatFix
* Implement NavSatFix message
* Support covariance
* Set frame ID to WGS-84
* Closes #23284

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-03-30 13:41:28 +11:00
Ryan Friedman 80a0373717 AP_DDS: Bump to using latest MicroXRCEDDSGen
* Adds -cs argument to fix case sensitive issue with PoseStamped
* Adds support for uint8_t type alias
* Updated the copies of IDL to remove these mods, matching upstream
* Solves #23302

Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-03-29 21:50:12 +11:00
pedro-fuoco cb628e6875 AP_DDS: update readme headers overhaul 2023-03-29 07:11:42 +11:00
pedro-fuoco dfdd7cde1b AP_DDS: update readme with feedback provided 2023-03-29 07:11:42 +11:00
pedro-fuoco 3c09a9e8aa AP_DDS: update readme bash scripts and tutorial order
* Fix install java apt script
* Fix text indentation
* Add export PATH script for micro-XRCE-DDS-Gen
* Comment on the option to change ardupilot parameters through GCS
* Fix MicroROS PR 401 hyperlink
* Change tutorial order so that the user runs the microROS agent first
2023-03-29 07:11:42 +11:00
Ryan Friedman 04ec39eb9f AP_DDS: Use python3 shebang
Signed-off-by: Ryan Friedman <ryanfriedman5410+github@gmail.com>
2023-03-23 13:51:38 +11:00