Skip to content
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

(Remote ID) Fill out and publish open drone id messages, open drone ID preflight check #20036

Closed
wants to merge 4 commits into from

Conversation

ThomasDebrunner
Copy link
Member

@ThomasDebrunner ThomasDebrunner commented Aug 11, 2022

Describe problem solved by this pull request

This PR adds mavlink streams for some of the Open Drone ID messages to be streamed over mavlink
The messages can then be picked up by transceivers connected to the autopilot to be sent out.

This also adds a check for the heartbeat of the ODID system, as well as a pre-arm check to prevent arming in case the heartbeat is not received or does not indicate healthy.

Describe your solution

Adds mavlink streams for open drone id messages and adds a pre-arm check

*
* The default allows the vehicle to arm without the onboard logger reporting as ready via it's heartbeat
*/
PARAM_DEFINE_INT32(COM_ARM_WO_OBLOG, 0);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Default to 1?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, for the normal engineering use case you would not want the requirement, for actual products, you would need to make the param inaccesssible anyways

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Was this parameter COM_ARM_WO_OBLOG accidentally included in this PR?

@ThomasDebrunner ThomasDebrunner marked this pull request as ready for review August 24, 2022 18:40
@ThomasDebrunner ThomasDebrunner changed the title WIP: (Remote ID) Fill out and publish open drone id messages (Remote ID) Fill out and publish open drone id messages, open drone ID preflight check Aug 24, 2022
* @group Commander
* @boolean
*/
PARAM_DEFINE_INT32(COM_PREARM_ODID, 0);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

89.310(d) [standard]: The unmanned aircraft must be designed and produced in a way that reduces the ability of a person to tamper with the remote identification functionality.

Does a parameter satisfy this? Has anyone from the PX4/Ardupilot communities spoken with the FAA about this specifically? "reduces the ability" is kind of vague

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry I just saw your above comment. Maybe we should add a comment like "Warning this parameter must be deleted and hardcoded to being enabled in a commercial product"

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"reduces the ability" is kind of vague

It is. And to further muddy the waters, the FAA expanded a bit on that requirement in the Notice of Availability document. The ASTM remote ID working group is still discussing how exactly to respond to that.

The MoC has some limited text to address this requirement but it will in the end largely be up to the UA manufacturers to decide how they comply with this and then document their decision properly, in case the FAA at some point comes back and asks for details.

@@ -77,6 +77,7 @@ struct subsystem_info_s {
static constexpr uint64_t SUBSYSTEM_TYPE_PREARM_CHECK = 1 << 28;
static constexpr uint64_t SUBSYSTEM_TYPE_OBSTACLE_AVOIDANCE = 1 << 29;
static constexpr uint64_t SUBSYSTEM_TYPE_PARACHUTE = 1ULL << 32;
static constexpr uint64_t SUBSYSTEM_TYPE_OPEN_DRONE_ID = 1ULL << 33;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MAVLink needs a corresponding PR to add bitmask field for MAV_SYS_STATUS_SENSOR_EXTENDED

dakejahl
dakejahl previously approved these changes Aug 24, 2022
@friissoren
Copy link

You probably are already aware of this but just to double check. Some additional changes to support the MAVLink OPEN_DRONE_ID_SYSTEM message for feeding dynamic operator location data from the GCS to the remote ID transmitter will also be needed, in order to be EU/US rule compliant.

But this can of course be added in a different PR. And since I only have a very limited understanding of the PX4 system architecture, of course it is also possible that this data would go directly from the GCS to the transmitter without being routed through the flight controller.

@ThomasDebrunner
Copy link
Member Author

@friissoren That's a good point, in our setup, the operator location goes directly to the transmitter, but in the general case where the transmitter is only connected to an FMU telemetry port, the FMU needs to route it. I believe that should already he happening, we'll have to test

@BluemarkInnovations
Copy link

@ThomasDebrunner Can you give me some guidelines how I can test this PR with my MAVLink OpenDrone ID modules?

I tried to download PX4, switch to this PR and try to build and run the jMAVSim simulator. However, the simulator crashes on Ubuntu 22.04 after a few seconds. Also, I'm not sure if I can connect the module to the simulator in order to test the code. I can't find any references about it in the help pages. Perhaps I need to wait until my Cube hardware arrives.

@ThomasDebrunner
Copy link
Member Author

@BluemarkInnovations Not sure how easy it is to test that in SITL. Do you then connect the transmitter via a USB-UART connector, or do you also run the transmitter in simulation? What's the setup here?

@BluemarkInnovations
Copy link

@ThomasDebrunner I run PIX4 in simulation/SITL and want to attach the transmitter via an USB to UART dongle.

@BluemarkInnovations
Copy link

@ThomasDebrunner I have my CubeOrangePlus finally and tried to build this PR. Can you give me some guidelines how to build?

git clone https://github.com/PX4/PX4-Autopilot.git --recursive
cd PX4-Autopilot/
git checkout up-open-drone-id-publish
make cubepilot_cubeorange

During compiling of the code, I get warnings about some submodules out of sync.

If I choose 'y', I get this error:
../../src/drivers/gps/gps.cpp:849:52: error: no matching function for call to 'GPSDriverUBX::GPSDriverUBX(GPSHelper::Interface&, int (*)(GPSCallbackType, void*, int, void*), GPS*, sensor_gps_s*, satellite_info_s*&, int32_t&, float&, GPSDriverUBX::UBXMode&)' 849 | gps_ubx_dynmodel, heading_offset, ubx_mode); | ^ compilation terminated due to -Wfatal-errors. [474/1102] Building CXX object src/modules/ekf2/CMakeFiles/modules__ekf2_original.dir/EKF/covariance.cpp.obj ninja: build stopped: subcommand failed. make: *** [Makefile:235: cubepilot_cubeorange] Error 1

if I choose 'u', I get this error:
../../src/modules/commander/Arming/PreFlightCheck/PreFlightCheck.cpp: In static member function 'static bool PreFlightCheck::preflightCheck(void**, vehicle_status_s&, vehicle_status_flags_s&, const vehicle_control_mode_s&, bool, bool, bool, bool)': ../../src/modules/commander/Arming/PreFlightCheck/PreFlightCheck.cpp:221:6: error: 'prearm' was not declared in this scope; did you mean 'pread'? 221 | if (prearm) { | ^~~~~~ | pread compilation terminated due to -Wfatal-errors. [631/1102] Building CXX object src/modules/commander/CMakeFiles/modules__commander.dir/Commander.cpp.obj ninja: build stopped: subcommand failed. make: *** [Makefile:235: cubepilot_cubeorange] Error 1

@BluemarkInnovations
Copy link

Extra info.

  • I run it in a dedicated virtual machine with Ubuntu 20.04.
  • Executed the ./Tools/setup/ubuntu.sh command
  • Normal make px4_sitl jmavsim builds without any error

@dagar
Copy link
Member

dagar commented Oct 4, 2022

We should rebase this PR on current main, I've merged the initial mavlink stream support in #20348.

@dagar dagar marked this pull request as draft October 4, 2022 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants