Adding OpenDroneID plugin and messages#2002
Conversation
|
In ros2 you have You can run tests using |
| src/plugins/obstacle_distance.cpp | ||
| src/plugins/odom.cpp | ||
| src/plugins/onboard_computer_status.cpp | ||
| src/plugins/open_drone_id.cpp |
There was a problem hiding this comment.
This part of file must be generated by cog script. Please do not change this blocks manually.
| <description>@brief Open Drone ID plugin | ||
| @plugin open_drone_id | ||
|
|
||
| Sends Open Drone ID data to the FCU</description> |
There was a problem hiding this comment.
The same - cog extracts metadata from special plugin comments. Do not change manually.
| operator_id.operator_id_type = msg->operator_id_type; | ||
|
|
||
| size_t length = std::min(operator_id.operator_id.size(), msg->operator_id.size()); | ||
| std::memcpy(operator_id.operator_id.data(), msg->operator_id.data(), length); |
There was a problem hiding this comment.
Please use mavlink::set_string() or set_string_z().
Example:
mavros/mavros/src/plugins/param.cpp
Line 277 in 0632e97
| system.category_eu = msg->category_eu; | ||
| system.class_eu = msg->class_eu; | ||
| system.operator_altitude_geo = msg->operator_altitude_geo; | ||
| system.timestamp = msg->timestamp; |
There was a problem hiding this comment.
I'd prefer to see a cog script here...
| msg/OpenDroneID/OperatorID.msg | ||
| msg/OpenDroneID/SelfID.msg | ||
| msg/OpenDroneID/System.msg | ||
| msg/OpenDroneID/SystemUpdate.msg |
| uint8 MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1 | ||
| uint8 MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2 | ||
| uint8 MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3 | ||
| uint8 MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4 |
There was a problem hiding this comment.
https://github.com/mavlink/mavros/blob/ros2/mavros_cog.py#L217
I'd prefer to remove unneded prefix - anyway it'll be namespaced into msg class.
|
Oh, and as i remember - idl do not recognize subdirs, so you must move messages to msg dir, just with prefix. |
Adds a plugin to receive OpenDroneID mavros messages and send the data to the FCU. Messages based on Open Drone ID MAVLink spec.
Looking at the contributing guidelines, it recommends to uncrustify and test, but it looks like the guidelines are out of date as the uncrustify config no longer exists in tools/, and it recommends testing with catkin which is no longer used for ROS2. What is the recommended method for uncrustifying and testing?
Tested using Ardupilot, confirmed that messages are received and broadcasted by Ardupilot Open Drone ID infrastructure.