Virtual Sticks for mini 2

Completed

Comments

22 comments

  • DJI Developer Support
    Perhaps you could use ADBWIFI to capture the logs of this process for analysis. It worked well on my side in the test environment.
    0
    Comment actions Permalink
  • Oleg O Vasilenko

    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?

    0
    Comment actions Permalink
  • DJI Developer Support
    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)​
    0
    Comment actions Permalink
  • Oleg O Vasilenko

    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

    0
    Comment actions Permalink
  • DJI Developer Support
    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.
    0
    Comment actions Permalink
  • Oleg O Vasilenko

    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

    0
    Comment actions Permalink
  • DJI Developer Support
    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
    0
    Comment actions Permalink
  • Oleg O Vasilenko

    The firmware version of the drone is 01.03.0000, the firmware version of the RC is 04.11.0032.

    I'm sorry, what is T gear?

    Where can I find the code that you modified to locate the problem? The link you provided doesn't contain any files.

    Thanks,

    Oleg

    0
    Comment actions Permalink
  • 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
    0
    Comment actions Permalink
  • Oleg O Vasilenko

    Done. We have run the code and uploaded a new log file (log 1.txt) to your link.

    0
    Comment actions Permalink
  • 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.
    0
    Comment actions Permalink
  • Oleg O Vasilenko

    Ok, I understand. In our case the selection button in this position would point to CINE. Could be the same meaning as TRIPOD. In all tests we set it to NORMAL.

    0
    Comment actions Permalink
  • DJI Developer Support
    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)​
    0
    Comment actions Permalink
  • Oleg O Vasilenko

    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.

    0
    Comment actions Permalink
  • DJI Developer Support
    Did you use ASSISTANT 2 for your flight test? If yes, then there is no need to enable the internal simulator, i.e. click on the StartSimulator button.
    0
    Comment actions Permalink
  • Oleg O Vasilenko

    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

    0
    Comment actions Permalink
  • DJI Developer Support
    I apologise for giving an inappropriate reply, but I saw the logs in log2.txt for opening the simulator, and if it was a real take-off, then there was no need to open the simulator. Thank you very much for your cooperation,if there are other possible solutions, we will reach out to you.
    0
    Comment actions Permalink
  • Oleg O Vasilenko

    No problem at all. I'm glad to receive all your replies since it lets us synchronize. All logs that we sent you have been collected in simulator mode. 

    0
    Comment actions Permalink
  • DJI Developer Support
    I tested the mini2 using the virtualstick in actual flight. When I clicked on the takeoff, the mini2 took off successfully, then I enabled the virtualstick and could operate it forward smoothly through the joystick on the left. Are you operating in the same process as me?
    0
    Comment actions Permalink
  • Oleg O Vasilenko

    Hi,

    Yes, we followed your instruction and I confirm that in actual flight the drone takes off successfully and obeys the virtual sticks when they are enebled.

    Kind regards,

    Oleg

    0
    Comment actions Permalink
  • DJI Developer Support
    According to what you say, you seem to be able to use virtualstick normally.Do you have any other questions?
    0
    Comment actions Permalink
  • Oleg O Vasilenko

    No more questions at the moment. Thank you!

    0
    Comment actions Permalink

Please sign in to leave a comment.