-
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
Treat UAVS diffrently from manned aviation #13159
Conversation
@ItsTimmy Don't know if you have interest in this since you looked at this code recently. |
Hey! Sorry, I've been traveling (and still are). What is your testing state with this PR? |
I wasnt yet able to test, I hope I can do that this week. |
Hi @LorenzMeier testing was successful. See #13159 (comment) @ItsTimmy may you please review, comment and merge if ok. Thank you! |
I'll test this with @ItsTimmy suggestions again on Wednesday. |
Build Error on Nxp_fmuk66-v3: Cast from 'Constant Char*' to 'constant uint16_t*'
I referenced the Mavlink Variable "ADSB_EMITTER_TYPE" in Navigator_Main, (I Included Mavlink in the Cmake.txt) Px4 builds correctly but i get this Error when i Build nxp_fmuk66-v3: @davids5 could you take a look at this? |
Todo fix and enable
Added fourth fake_traffic message, added additional info to Mavlink warnings these wont be displayed in QGC due to Message Link Limitation but are written to log.
I Added a simulated drone to fake_traffic and used that to validate my changes. What i tested: Standard Params No warnings All Warnings RETURN TO LAUNCH LAND MODE NO WARNING All Messages where cut of at 50 Digits, in QGC, due to this limitation. NAV_TRAFFIC_AVOID = 3 is not implemented yet. So won't do anything. This shows that the Parameter works correctly and Changes the distance PX4 Considers a Collision warning. |
src/modules/navigator/CMakeLists.txt
Outdated
@@ -34,6 +34,10 @@ | |||
px4_add_module( | |||
MODULE modules__navigator | |||
MAIN navigator | |||
COMPILE_FLAGS | |||
-Wno-cast-align # TODO: fix and enable |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is how it is Implemented in the CMakeLists.txt off mavlink_receiver.cpp.
This will need fixfin in the future
@mrpollo - Please add for dev call |
src/modules/navigator/CMakeLists.txt
Outdated
COMPILE_FLAGS | ||
-Wno-cast-align # TODO: fix and enable | ||
INCLUDES | ||
${PX4_SOURCE_DIR}/mavlink/include/mavlink |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't want to directly access mavlink outside of the mavlink module.
Added Behavior: HOLD Position to collision avoidance mode. and implemented Landmode to collision avoidance.
Added Behavior: Hold Position to collision avoidance mode. Landmode was not implemented in PX4. The German DLR wanted the Hold Position function for a Demo While testing I found out that Check_Traffic will respond to selfpublished Uorb messages of Transponder_report. |
FYI only, last set of docs discussed for this feature are here: PX4/PX4-user_guide#527. Still waiting on clarification. |
I like the PR, but I expect a 10m minimum separation is too small. Drones can be moving quite fast, and there won't be time to react unless the transponder publish rate is very high. |
Collision avoidance ignores messages with the Uas_id identical to Board GUID
Changed location where Selfpublished UTM msg are ignored from Navigator_main to Mavlink_reciever fixed mavlink critical warning wrong value being send
I had an interesting Testing day. I changed where the UTM message is captured and ignored: while Testing on the ground with 2 Vehicles. We had trouble getting Collision messages on the modified Drone. more testing Confirmed the issues we where having today. Iam not sure why this happens. Is this due to the way the Parameter is Defined in QGC? To warn the user I programmed the uas_id parameter into the mavlink_warning |
Boards where no Hardware GUID is defined will send 0 as GUID. rightnow COllision avoidance for more then one FMU with out Hardware GUID is not possible. We should consider adding a randomly generated HW GUID as a placeholder for legacy Boards
i removed the report of emitter_type to mavlink to reduce footprint
Succsessfully Tested. Test was wether the Drone reacts correctly to changes in Observed could be that the Parameter defined in QGC changes the maximum Distance a Collision is called. |
@julianoes FYI I am not tracking this discussion. Happy to rejoin when there are docs to be done. |
LOG Everything works now. @dagar could you Review it please? I already started with the Updates to the Documentation and will make a PR when this PR is approved. |
// ask the commander to land | ||
vehicle_command_s vcmd = {}; | ||
vcmd.command = vehicle_command_s::VEHICLE_CMD_NAV_LAND; | ||
publish_vehicle_cmd(&vcmd); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is okay as a test, but if we want it to exist long term it should really be tied into the state machine a little more directly.
@@ -898,7 +898,7 @@ Navigator::load_fence_from_file(const char *filename) | |||
* | |||
*/ | |||
void Navigator::fake_traffic(const char *callsign, float distance, float direction, float traffic_heading, | |||
float altitude_diff, float hor_velocity, float ver_velocity) | |||
float altitude_diff, float hor_velocity, float ver_velocity, int emitter_type) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
float altitude_diff, float hor_velocity, float ver_velocity, int emitter_type) | |
float altitude_diff, float hor_velocity, float ver_velocity, uint16_t emitter_type) |
Type should match the size used in the message definition.
I didn't go through the specific utm_global_position handling in detail, but overall from PX4/Firmware perspective this change looks like safe to merge. |
* | ||
* @group Mission | ||
*/ | ||
PARAM_DEFINE_INT32(NAV_TRAFF_AVOID, 1); | ||
|
||
/** | ||
* Set NAV TRAFFIC AVOID RADIUS MANNED |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LowOrbitIonCannon Can we have a new PR to change this to more natural formatting?
Set avoidance radius/distance for manned vehicles (ADS-B/FLARM).
/** | ||
* Set NAV TRAFFIC AVOID RADIUS MANNED | ||
* | ||
* Defines the Radius where NAV TRAFFIC AVOID is Called |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LowOrbitIonCannon Can we have a new PR to change this to more natural formatting?
Defines the avoidance radius/distance at which the avoidance action is triggered for for manned vehicles (ADS-B/FLARM).
PARAM_DEFINE_FLOAT(NAV_TRAFF_A_RADM, 500); | ||
|
||
/** | ||
* Set NAV TRAFFIC AVOID RADIUS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LowOrbitIonCannon Can we have a new PR to change this to more natural formatting?
... following pattern as I put above
Using ADSB transmitter data existing or not.
A seperation distance of 10 Meters should suffice for D2D Collision avoidance. This is needed to test the collision avoidance of UAVs. 500 Meters is an unnecessary Distance for UAVs.
Describe problem solved by the proposed pull request
500 Meters is an unnecessary Distance for UAV to UAV Collision avoidance
Describe your preferred solution
A Flag that decides if the encountered entity is Manned or an UAV
Additional context
Collision avoidance uses UTM_Global_Position as per this PR
Testing Collision avoidance would mean a seperation distance of 500 meters.
@hamishwillee rightly informed me of the docs changes needed with this request:
http://docs.px4.io/master/en/advanced_features/traffic_avoidance_adsb.html#implementation
#11262