-
Notifications
You must be signed in to change notification settings - Fork 13.6k
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
[Sponsored by Cubepilot and Holybro] Cube ID via DroneCAN #23113
Conversation
Awesome, you managed to update the libuavcan and dsdl dependencies so that we can generate latest data types? |
@PetervdPerk-NXP I just updated it and nothing seemed to break, so I'm not sure I did it right... |
We definitely need to test it on hardware, since I have updated previously to support newer data types, but there were issues translating the messages between FMU and Cannodes. I specify remember that the Servo Array Command didnt work as expected. I will see if I can find the Issue or some internal doc which describes the issue. |
@henrykotze or @AlexKlimaj any tips how I test whether the DroneCAN update breaks anything? |
c2036d4
to
e9857fd
Compare
Add a parameter to enable/disable this in UAVCAN? Only allocating |
@dagar what param name do you suggest, given this has subscriptions as well as publications? |
@dagar let me know what param name you want, and what else you need me to do to merge this. |
@henrykotze or @AlexKlimaj, please speak up how I have to test this, otherwise I'd like to get this in. |
I can test in a few days. @dakejahl may be able to test sooner. |
I don't have the CAN version of the CubeID |
That's what I have tested already. However, I was told that other CAN devices such as CANnodes with servo array might be broken with the update. |
FYI @BluemarkInnovations and @dirksavage88 |
@julianoes I can test the holybro, but I don't have the Cube ID CAN either |
This largely looks good, I'm just not sure about some of the message flow specifics given the range of different use cases (more convoluted than you might expect). For example rather than just copying around |
Another case is |
Thanks for the review and comments:
The way it seems to work is that the remote ID module sends this message out and PX4 parses it, and sends it out to the GCS via MAVLink. Are you saying PX4 should modify the message?
That's how I did it for the DroneCAN ones. If the GCS has sent a system message, then it is just forwarded. If not, then it will fall back to the takeoff location. If you want we can add a param to explicitly configure that. |
c3143dd
to
5342dfe
Compare
@dagar: regarding the last commit: I did not manage to properly extract the open_drone_id MAVLink helpers into its own library. At build time there seemed to be a race condition between the MAVLink headers having been generated and the library requiring it. Making the library depend on Using ifs to avoid the open_drone_id files to be built for IO failed, as well as making it dependent on the MAVLink module. I assume that's because it is a circular dependency. Instead I went with just moving the helpers into the MAVLink module and including the file in the UAVCAN driver as well. Any other idea how I ought to do that? |
5342dfe
to
e908ee1
Compare
@mrpollo it would be good not to cancel all other builds when one fails. Otherwise, I have to fix one board at a time and then try again, just to find the next one that fails. |
e908ee1
to
e41eaec
Compare
Signed-off-by: Julian Oes <[email protected]>
This extracts the function mapping from MAV_TYPE to MAV_ODID_UA_TYPE to the library, so that it can be re-used later by the remote ID implementation over DroneCAN. Signed-off-by: Julian Oes <[email protected]>
Signed-off-by: Julian Oes <[email protected]>
In order to have operator ID be sent by QGC, we need to forward ArmStatus from the remote ID module (here on DroneCAN) to MAVLink.
This will send the System message if it is already being sent by a ground station. Otherwise, it will assemble the message itself using the takeoff/home location.
I could not extract the open_drone_id helpers to a separate lib because it would require the mavlink headers while the mavlink library would also depend on it, so it ended up being a circular dependency. Instead, I'm now just using the headers from within the mavlink module as well as from the uavcan driver.
e41eaec
to
3f89f17
Compare
@julianoes I've added the new uORB messages in PX4/PX4-user_guide#3370 Are there any docs implications to https://docs.px4.io/main/en/peripherals/remote_id.html ? |
I think we already updated the docs @hamishwillee. |
I actually need sd bench in the ARV6X build. I use it on the production line to test the SD card. |
Oh, I'm sorry! Anything else you can remove instead? Although, you could consider having a separate test image that gets reflashed with the production image once all tested. |
It looks like it all fits just adding it back in. I want to avoid having to flash multiple times in production. The time it takes really adds up. |
Ok good. Again, sorry about that but I find it super hard to get anything merged as any feature is going to hit the flash limit on at least some boards, and they all come with a slightly different set of modules and drivers installed, so it's impossible to know what's actually needed on each of them. The PR had been dragging for weeks, so I just took things in my own hands, disabled what I thought was "safe" and merged it. In an idea world I'd wait for everyone to give a thumbs up. Next time I know to ping you when I mess with an ARK board. |
Looks like the libuavcan update breaks CAN FW updating. I just tested the commits before and after this PR and confirmed it. |
…ory) - upstream libuavcan was broken and then marked deprecated, this fully absorbs the submodule (renamed libdronecan to deconflict) up to our last good working commit and all commit history is kept - fixes #23727 (regression introduced in #23113) - this puts us in a much better position to evolve the library as needed now that we have full control
…ory) - upstream libuavcan was broken and then marked deprecated, this fully absorbs the submodule (renamed libdronecan to deconflict) up to our last good working commit and all commit history is kept - fixes #23727 (regression introduced in #23113) - this puts us in a much better position to evolve the library as needed now that we have full control
This adds support for Cubepilot's Cube ID modules via DroneCAN, so that users are not limited to the Cube ID serial variant.
Thanks to dirksavage88, I borrowed quite a bit of code from #21647.
Tested using QGC master and DroneScanner.
QGC v4.4.0 doesn't properly implement the "Fixed GPS GCS" setting (see mavlink/qgroundcontrol#11673).Initial work for CubeID was sponsored by CubePilot.
Additionally, testing/fixup for the Holybro Remote ID was sponsored by Holybro.