diff --git a/ChangeLog.md b/ChangeLog.md index 3fa9ce4..bc3c3ce 100644 --- a/ChangeLog.md +++ b/ChangeLog.md @@ -6,6 +6,7 @@ Note: This file only contains high level features or important fixes. ### 3.6.0 - Daily Build +* Basic object avoidance added to vehicles. * Added ability to set a joystick button to be single action or repeated action while the button is held down. * Rework joysticks. Fixed several issues and updated setup UI. * Adding support for UDP RTP h.265 video streams diff --git a/custom-example/res/CustomFlyView.qml b/custom-example/res/CustomFlyView.qml index c7e8f01..90760fa 100644 --- a/custom-example/res/CustomFlyView.qml +++ b/custom-example/res/CustomFlyView.qml @@ -604,6 +604,26 @@ Item { } } //------------------------------------------------------------------------- + //-- Object Avoidance + Item { + visible: activeVehicle && activeVehicle.objectAvoidance.available && activeVehicle.objectAvoidance.enabled + anchors.centerIn: parent + width: parent.width * 0.5 + height: parent.height * 0.5 + Repeater { + model: activeVehicle && activeVehicle.objectAvoidance.gridSize > 0 ? activeVehicle.objectAvoidance.gridSize : [] + Rectangle { + width: ScreenTools.defaultFontPixelWidth + height: width + radius: width * 0.5 + color: distance < 0.25 ? "red" : "orange" + x: (parent.width * activeVehicle.objectAvoidance.grid(modelData).x) + (parent.width * 0.5) + y: (parent.height * activeVehicle.objectAvoidance.grid(modelData).y) + (parent.height * 0.5) + property real distance: activeVehicle.objectAvoidance.distance(modelData) + } + } + } + //------------------------------------------------------------------------- //-- Connection Lost While Armed Popup { id: connectionLostArmed diff --git a/qgcimages.qrc b/qgcimages.qrc index 446cea1..2da131c 100644 --- a/qgcimages.qrc +++ b/qgcimages.qrc @@ -1,6 +1,5 @@ - resources/camera.svg src/FlightMap/Images/adsbVehicle.svg src/AutoPilotPlugins/Common/Images/AirframeSimulation.svg src/AutoPilotPlugins/Common/Images/AirframeUnknown.svg @@ -59,6 +58,7 @@ src/FlightMap/Images/attitudePointer.svg src/FlightMap/Images/AwarenessAircraft.svg src/ui/toolbar/Images/Battery.svg + resources/camera.svg src/Camera/images/camera_photo.svg src/Camera/images/camera_video.svg src/AutoPilotPlugins/PX4/Images/CameraComponentIcon.png @@ -91,6 +91,7 @@ src/ui/toolbar/Images/Hamburger.svg src/FlightMap/Images/Help.svg src/FlightMap/Images/HelpBlack.svg + src/AutoPilotPlugins/PX4/Images/HITL.svg src/FlightMap/Images/Home.svg src/ui/toolbar/Images/Joystick.png src/AutoPilotPlugins/PX4/Images/LandMode.svg @@ -117,6 +118,7 @@ src/AutoPilotPlugins/Common/Images/MotorComponentIcon.svg src/AutoPilotPlugins/PX4/Images/no-logging-light.svg src/AutoPilotPlugins/PX4/Images/no-logging.svg + src/AutoPilotPlugins/PX4/Images/ObjectAvoidance.svg src/ui/toolbar/Images/PaperPlane.svg src/FlightMap/Images/PiP.svg src/FlightMap/Images/pipHide.svg diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index 55ac49c..818ed0c 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -855,6 +855,7 @@ HEADERS+= \ src/Vehicle/MultiVehicleManager.h \ src/Vehicle/GPSRTKFactGroup.h \ src/Vehicle/Vehicle.h \ + src/Vehicle/VehicleObjectAvoidance.h \ src/VehicleSetup/VehicleComponent.h \ !MobileBuild { !NoSerialBuild { @@ -881,6 +882,7 @@ SOURCES += \ src/Vehicle/MultiVehicleManager.cc \ src/Vehicle/GPSRTKFactGroup.cc \ src/Vehicle/Vehicle.cc \ + src/Vehicle/VehicleObjectAvoidance.cc \ src/VehicleSetup/VehicleComponent.cc \ !MobileBuild { !NoSerialBuild { diff --git a/src/AutoPilotPlugins/PX4/Images/HITL.svg b/src/AutoPilotPlugins/PX4/Images/HITL.svg new file mode 100644 index 0000000..d8b318b --- /dev/null +++ b/src/AutoPilotPlugins/PX4/Images/HITL.svg @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/AutoPilotPlugins/PX4/Images/LandMode.svg b/src/AutoPilotPlugins/PX4/Images/LandMode.svg index d6dabab..5a6f980 100644 --- a/src/AutoPilotPlugins/PX4/Images/LandMode.svg +++ b/src/AutoPilotPlugins/PX4/Images/LandMode.svg @@ -1,26 +1,24 @@ - + + viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve"> - + - - - + + + - + diff --git a/src/AutoPilotPlugins/PX4/Images/LandModeCopter.svg b/src/AutoPilotPlugins/PX4/Images/LandModeCopter.svg index 5cb700f..fb79a66 100644 --- a/src/AutoPilotPlugins/PX4/Images/LandModeCopter.svg +++ b/src/AutoPilotPlugins/PX4/Images/LandModeCopter.svg @@ -1,10 +1,10 @@ - + + viewBox="0 0 72 72" style="enable-background:new 0 0 72 72;" xml:space="preserve"> - - - + + + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + - - - + + + diff --git a/src/AutoPilotPlugins/PX4/Images/ObjectAvoidance.svg b/src/AutoPilotPlugins/PX4/Images/ObjectAvoidance.svg new file mode 100644 index 0000000..34e1614 --- /dev/null +++ b/src/AutoPilotPlugins/PX4/Images/ObjectAvoidance.svg @@ -0,0 +1,78 @@ + + + + + + + Layer 1 + + + + + + + + + + + Layer 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/AutoPilotPlugins/PX4/Images/ReturnToHomeAltitude.svg b/src/AutoPilotPlugins/PX4/Images/ReturnToHomeAltitude.svg index e6c59e0..0e2fe04 100644 --- a/src/AutoPilotPlugins/PX4/Images/ReturnToHomeAltitude.svg +++ b/src/AutoPilotPlugins/PX4/Images/ReturnToHomeAltitude.svg @@ -1,5 +1,5 @@ - +