PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.48k stars 13.51k forks source link

Multiple UUIDs for Dronecode SDK #9286

Closed varunvp closed 6 years ago

varunvp commented 6 years ago

Feature Request I wanted to simulate the offboard control of multiple PX4's using DroneCode. Unfortunately, it so happens that DroneCore distinguishes between PX4's using UUIDs, and all PX4 instances start with the same UUID. It does have another feature where if there is no UUID is available, it will fallback to using the system IDs. So it would be useful if we had the option to declare the UUIDs for each drone, let PX4 set different UUIDs for each vehicle or disable them completely.

Here is the link of the issue I raised in DroneCore : https://github.com/dronecore/DroneCore/issues/353

julianoes commented 6 years ago

Also see: http://discuss.px4.io/t/duplicated-uuid-for-multi-vehicle-problem/6730 https://github.com/dronecore/DroneCore/issues/411

julianoes commented 6 years ago

The UUID is generated here: https://github.com/PX4/Firmware/blob/master/platforms/posix/include/system_config.h

Seunghwan17 commented 6 years ago

using UUID method have some problem. stm32 has 92bit UUID, but mavlink has only 64bit uuid. Therefore, some FC has same UUID.

julianoes commented 6 years ago

@Seunghwan17 correct, we should switch DroneCore from 64bit to 92bit. Mavlink2 actually has the 92bit UUID in the uid2 field.

julianoes commented 6 years ago

We discussed this on the dev call and decided that the best way would be to do the existing UUID + mavlink system ID.

julianoes commented 6 years ago

Pointer: https://github.com/PX4/Firmware/blob/master/platforms/posix/include/system_config.h#L56-L57

TSC21 commented 6 years ago

I guess this is also applicable to MAVROS.

varunvp commented 6 years ago

Great! So how exactly should I use this to connect to new drones now?

julianoes commented 6 years ago

@varunvp what exactly do you want to do? I don't have context for what you're trying to do.

varunvp commented 6 years ago

I would like to control drone swarms.

julianoes commented 6 years ago

@varunvp this should work now, please make a new issue in Dronecode/DronecodeSDK if you still can't connect to multiple drones at once.