[dji-sdk][onboard-sdk] Loosing GPS while in Onboard control flight mode - dji-sdk

How does the DJI UAV (A3 or M600) behave if the GPS signal was completely lost during the flight and the setpoint was given as Horizontal command in ground_ENU frame.
According to this appendix:
Only when the GPS signal is good (health_flag >=3),horizontal position control (HORI_POS) related control modes can be used.
Only when GPS signal is good (health_flag >=3),or when Guidance system is working properly with Autopilot,horizontal velocity control(HORI_VEL)related control modes can be used.
Will the DJI switch to Attitude Flight mode?
Will you still have the authority to control over Onboard-SDK? And if yes, does this mean that you could control it only via HORI_ATTI_TILT_ANG mode?
Thanks!

I never test the full case which hook up the dji a3 and osdk and let it crash.
What I tested is using ground set up with A3 and turn off the ESC and motor. Run the mission and plot the GPS. But I moutned many other sensors to get the correct position/velocity command.
When next to the building. GPS went to crash on the building. The DJI GPS mission control follows that. The GPS from DJI sdk is denoted in the green line. I have to use aullixary visual and Lidar based navigation to get to correct position

Related

Is there any way to get live telemetry data from the DJI Mavic 2 Zoom to another unit, say a computer?

As part of a course on my university we've been given the task of taking the live wind telemetry from a drone and then feeding it to a neural network so that it gives better estimates than just using a sensor.
The research we've concluded so far tells us that our drone, the DJI Mavic 2 Zoom, is only compatible with the Windows SDK but not the onboard SDK.
Simply our question is; is there any way for us to send the raw wind speed and direction data from the drones sensors to a computer?
Create Android application with DJI Mobile SDK and send data from msdk to your computer with wifi.
The SDK only provides the wind warning level(0, 1 and 2). It does not provide any information regarding the direction from which the wind is blowing or the actual speed of the wind.
The aircraft tries to stay in it's current position on it's own, even if there is moderate wind blowing. However the drone does not tell the user how much it has to work in which direction to negate the effect of the wind.
I assume you're better off with accessing real time wind information for your position from a weather service on the internet, if that's available in your country.
I've done a wind meter app.
The best method is:
Fly against the wind
In virtualstick use angle mode, and set pitch and roll to 0 This will let the drone drift with the wind.
Slowly rotate the yaw.
Meassure the speed, when it stop increasing, the gps-speed gives you the windspeed and direction.
Warning, in strong wind you have to fly for quite a while against the wind.
The yaw rotation needs to be done due to the drone is never exactly leveled, and it will pick up speed at one direction. If turned, it cancel that out.
Send the info to a server over internet/wifi.
I've done this on an android phone connected the controller.
Windows api doesn't seem to support virtualsticks, which I find strange. In that case it must be done on android or ios, and trasnmitted to a server. I might be wrong since I never used the windows api.

Move in velocity the UAV in attitude mode

First of all I am sorry for my English.
I am trying to control the UAV with the DJI A3 in speed without GPS, indoors.
With no GPS, the drone flies in ATTITUDE mode. I am in P_GPS mode to obtain control authority. Due to not having GPS, the UAV is in ATTITUDE and although I have the authority control the UAV does not move.
Is there any possible way to move the UAV in speed while in ATTITUDE mode by not having GPS?
Yes you can. You won't be able to use velocity or position control but you should be able to set roll, pitch and yaw angles on the control flags. Take a look at the following links here:
https://github.com/dji-sdk/Onboard-SDK-ROS/issues/10
https://github.com/dji-sdk/Onboard-SDK-ROS/issues/294
https://github.com/dji-sdk/Onboard-SDK-ROS/issues/248

How to design a mission to visit several locations and in each location process some computer vision tasks on the mobile platform?

I would need to make my dron Mavic2 Pro to visit approx 10 locations in relatively low altitude 1.7 m. In each location the camera should look at right direction and the mission paused to let the mobile application process some CV tasks. I am not sure what is the best approach to make a mission that is partially processed on mobile platform? What to use in DJI mobile sdk api to pause mission when the location is reached?
I am going to use a time line mission composed from sequence of GoToAction. I wonder if this is a good way to do it. Is there a better solution?
Is MissionControl.Listener right place to interrupt a mission when a TimeLineElement finish or should I use WaypointReachedTrigger?
I wasn't able to find any suitable example.
Please add specific programming question. Otherwise, all answer is primarily opinion-based see https://stackoverflow.com/help/dont-ask for detail
DJI method allows you to control the drones gimbal and gps navigation through MissionAction. The gotoaction is a subclass of the Missionaction class. the gotoaction only goes to some GPS location . So you need other things in the mission action such as gimbalattiudeaction and camera capture action to perform camera pointing and capturing. See the Fig below.
For CV tasks, it is easy to link DJI app to OpenCV. But I highly not recommend you to do so as the task such as dection using CNN system takes too much resources. The popular approach is to upload the image taken in local buffer to a local server with GPU for processing in near real-time manner. See the Fig below, I`m using WSDK with windows online OCR for detection. Video at https://youtu.be/CcndnHkriyA . I tried with local phone based approch, but result is limited by the model accuracy. And I could not apply high accuracy model because of the processing demand for such model is high. You can see my demo in the Fig below
What you want is pretty ez to implement but hard to perfect. Flying in low altitude(1.7m) requires you to have some degree of obstacle avoidance and GPSless path planning. The one implemented in Mavic hardware is only simple avoidance or slip through. For a bit more complex like go around a wall or maze-like environment, it better to add your own global path planer and local path planner. For the feedback you can use the SVO method to get odometry and map the local sparse obstacle map for inflated radius calculation. See Fig below.
Fig taken from video https://www.youtube.com/watch?v=2YnIMfw6bJY.
The feedback code is available at https://github.com/uzh-rpg/rpg_svo.
The path planning code you can try with ETH`s https://github.com/ethz-asl/mav_voxblox_planning as well.
Good luck with your work.

Code to autoland DJI matrice 100

I am working on developing program for autonomous control of DJI matrice drone. I like to have precise landing of DJI drone with tolerance of approx 5cm in X and Y axes. For this I am trying to control the drone until 50cm from ground and then immediately landing() function is called. But after the landing() function is called, I see that the drone moves in X and Y directions as well. Due to this landing within defined tolerance fails. Is there a way, that I may write an own code for autolanding program with different constraints.
Thanks.
you can use a combination of a few tools:
Use flightCtrl APIs such as positionAndYawControl documented here to command the drone in the z-axis, slowly reducing the z position desired
Monitor flight status using broadcast->getStatus() as documented here, and keep sending lower z-setpoints till the drone's flight status changes to M100FlightStatus::LANDING
Send disArm() command to turn the motors off and ensure that the status changes to M100FlightStatus::FINISHING_LANDING.
You might have to experiment a little with the z set points and the time duration to keep sending lower setpoints in order to get this to work.

Remove GPS on matrice 100

With my team we are programming indoor flight for the matrice 100, and we don't have the use of the GPS.
Is it possible to remove it?
And sometimes at the floor level we have electromagnetic problems, and the drone refuses to turn on the rotors, are they any way to force it ?
We use guidance, and I have noticed even without GPS and with electromagnetic interference the drone is stable.
As of Mar 2018, on ALL DJI drones you need to have at least the compass connected in order to start flight.
Can't you just remove the GPS module from the M100? The module rises above the rest of the craft; it's that little white puck with "DJI" written on it in red.
Alternatively, I've heard of people covering it with tin foil to prevent the GPS signal from coming through.

Resources