Virtual Sticks for mini 2
已完成Hi,
I use VirtualStickView.java module from Mobile-SDK-Android sample application (https://github.com/dji-sdk/Mobile-SDK-Android/tree/master/Sample%20Code/app/src/main/java/com/dji/sdk/sample/demo/flightcontroller) to test the virtual sticks in action. The application and the simulator perform as expected when I initiate takeoff, but they completely ignore control actions by virtual sticks. I use the suggested settings for the control modes and the coordinate system. The drone SW version is up-to-date.
I don't have a clue what can be wrong as everything is implemented in accordance with dji instructions. Could you please suggest what should I doublecheck to find a solution to the problem?
Br, Oleg
-
We captured the logs with ADBWIFI (https://drive.google.com/file/d/1q8_GPj8BDmNPomKVyZZ5XqT2epKPzN4O/view?usp=sharing). What data in the log can explain the problem? Do we need to add more check points in the code to enreach the log with necessary for analysis data?
-
Sorry,i can't open this link. Did you find out what the problem was in the log? Did an error occur? Perhaps you can use this interface(isVirtualStickControlModeAvailable) to know if VirtualStick is available. ![](https://djisdksupport.zendesk.com/attachments/token/t4YHWmjF4svFSA3XhGdpE3To1/?name=inline-266634602.png) -
I'm sorry, other disk should be more convenient for sharing: https://disk.yandex.ru/d/wwiNLYDFxN-0oQ.
Yes, the log contains some errors. For example, at 15:31:09.088 it writes "com.dji.sdk.sample W/System.err: java.lang.NoSuchMethodException: dji.midware.data.model.P3.DataGetProductInfoFromPayload.getInstance []".
We will also collect more specific trace data today, as you suggested.
Thank you,
Oleg
-
You can ignore some errors,such as java.lang.NoSuchMethodException and javax.crypto.IllegalBlockSizeException. I don't find some useful information in the logs after ignoring the errors mentioned above. Did isVirtualStickControlModeAvailable help you in some way?The drone appears to need to meet his five conditions to successfully start VirtualStick. -
We embedded small fragments of log commands to the original java file to get more information about the execution of the application (https://disk.yandex.ru/d/3OS7qcGCJhZfcA). The log file (https://disk.yandex.ru/d/uRAZzbr4f5FUOg) recorded that
- at 17:41:48.101 the drone started takeoff
- at 17:41:51.540 the drone ended takeoff
- at 17:41:53.043 virtual stick mode was enabled
- at 17:41:56.987 horizontal coordinate was set to BODY
- at 17:41:58.732 roll-pitch controll mode was set to VELOCITY
- at 17:42:00.688 vertical control mode was set to VELOCITY
- at 17:42:03.765 the virtual sticks began to send user data to move the drone, but the drone position didn't ever changed.It was strange that the log recorded virtual stick activities even when nobody touched the sticks.
All in all, I can conclude from the log that the application behaves as expected until the virtual stick data are sent to the flight controller that doesn't react to the control data. My guess is that either the control data from the application don't pass the remote control unit or the flight controller / onboard simulator ignores the control data from the stick.
Should we add more traces or carry out more tests to troubleshoot?
Best regards,
Oleg
-
Dear Client Thank you for contacting DJI. Can you tell me firmware version of your drone and RC? You can check which gear the remote controller is in when you use the VirtualStick, it is not possible to use the VirtualStick in T gear. I've modified some of the log output statements in the code you passed over to help us locate the problem, and you can upload your log in this link. Link:https://pan-sec.djicorp.com/s/zCS5WrX9gjS8EAc password:dji123 Kindly Regards, DJI Developer Support -
Dear Client Thank you for contacting DJI. Sorry about that. You can download the code file from the link now. I had previously placed the file in an attachment. Could you please run the code I uploaded and upload the log file to the same link? Thank you in advance for your help. Kindly Regards, DJI Developer Support -
![](https://djisdksupport.zendesk.com/attachments/token/VSFKit7w2D53SFkF1thNgQWCj/?name=inline-299774194.png) This button points to Tripod indicating that the drone is now in T mode, in which case VirtualStick cannot be switched on. -
I received the log file you uploaded and noticed that there has been a change in values. The change in value is only reflected when pX and pY are greater than 0.2. Has your problem been solved? isVirtualStickControlModeAvailable returns true, indicating that VirtualStick is available. ![](https://djisdksupport.zendesk.com/attachments/token/Ip9I3dAzym7eaWSb25czh9kIi/?name=inline-989238959.png) -
Yes, we know that the values of the virtual sticks change. The problem is that it has no effect on the drone movements. The virtual stick values are sucessfully updated, then the virtual sticks values are transformed to the pitch, roll and throttle values that are used as control data for the flight controller. The control data are assumed to be passed to the flight controller that however never changes drone's velocities in response to the control data. As you can see from the log 2.txt (https://pan-sec.djicorp.com/s/zCS5WrX9gjS8EAc), the drone takes off and then hovers at the altitude of 1.2 m completely ignoring any stimulus that we send to it through the virtual sticks. Obviously, it is not the expected drone's behavior and it should have some cause that we are struggling to find out.
-
To my knowledge, Assistant 2 cannot be used for simulation in case of mini 2. I connected mini 2 to Assistant 2 and the only functionality available to me was to save logs. We also tried virtual sticks to test them in real flight and they didn't work either.
I know that on your side virtual sticks work well, while on our side they don't work at all. Our strategy to understand the cause of the problem is to completely align with what you do, meaning we want to use the same SW and the same settings.
Can we record more logs to find out the cause of the problem? Should we check some more settings?
Thank you,
Oleg
请先登录再写评论。
评论
22 条评论