dji-sdk / Mobile-SDK-Android

DJI Mobile SDK for Android: http://developer.dji.com/mobile-sdk/
Other
994 stars 581 forks source link

Virtual stick mode with spotlight mode #1322

Closed HEEJUN-SHIN closed 1 month ago

HEEJUN-SHIN commented 1 month ago

Hello, dji.

I am trying to use virtual stick mode to control the drone while focusing on the object (e.g., human) using spotlight mode.

Here is the scenario :

  1. Take off
  2. enable virtual stick (sequence can be switched with 3)
  3. set spotlight to the target object (sequence can be switched with 2)
  4. move drone with virtual stick

This might be very helpful because we do not need to take care about the gimbal orientation when take a photo or video while moving drone by focusing on the target automatically.

however, whenever I set virtual stick enabled true,

mFlightController.setVirtualStickModeEnabled(true)

the ActiveTrackMIssionOperatorListener() does not give any updates (seems like imcompatible together?). It seems like active track operator does not work.

Is it possible to implement this?

Drone model : DJI AIR 2 SDK version : 4.16.4

dji-dev commented 1 month ago

Agent comment from SHENRONG.LE in Zendesk ticket #118618:

Dear developers, Hello, thank you for contacting DJI Innovation.

Here are some possible solutions and considerations:

  1. According to the relevant knowledge of virtual joystick, virtual joystick mode requires the aircraft not to be in any automatic task. Therefore, when you enable virtual joystick mode, ActiveTrack tasks may be interrupted or not work properly.
  2. Make sure the drone has taken off and is hovering. Enable the virtual joystick: call setVirtualStickModeEnabled (true) enable virtual joystick mode.
  3. Before enabling the virtual joystick, complete the ActiveTrack task. Then enable virtual joystick mode for flight control. Make sure the version of the SDK you are using supports the features you need and has no known compatibility issues. You can refer to the SDK update log or documentation.

I hope our solution can help you, thank you for your email, wish you a happy life! Best Regards, Dji innovation SDK technical support

°°°

HEEJUN-SHIN commented 1 month ago

Thanks for the your support!

So, I understood that the virtual stick mode and active track mode is not compatible to be used simultaneously.

Sorry for bothering, but I have few more questions regarding the issue.

  1. Is the SPOTLIGHT Mode also not able to be used together with virtual stick mode? (I know that the SPOTLIGHT Mode is inside the ActiveTrackMIssion class, but just for double check..)
  2. If so, is there any alternative way to control the drone while focusing on the target?
  3. It seems like autosensing of active track operator also stops when enabling virtual stick mode even I did not start Active track mission. Is autosensing also not able to be used together with virtual stick? If I could at least have autosensed object, I can control the gimbal to focus on desired target.

Thank you again.

dji-dev commented 1 month ago

Agent comment from SHENRONG.LE in Zendesk ticket #118618:

Dear developers, Hello, thank you for contacting DJI Innovation.

Virtual Joystick mode cannot be used in conjunction with spotlight Mode or other Mission type tasks. The automatic sensing function also stops in virtual joystick mode. A similar effect can be achieved by pausing the waypoint task and making adjustments using the virtual joystick.

I hope our solution can help you, thank you for your email, wish you a happy life! Best Regards, Dji innovation SDK technical support

°°°

HEEJUN-SHIN commented 1 month ago

I see.

However, we can actually control drone with RC while performing active track. (when using DJI FLY)

Why is it different?

Thank you.

dji-dev commented 1 month ago

Agent comment from SHENRONG.LE in Zendesk ticket #118618:

Dear developers, Hello, thank you for contacting DJI Innovation.

1、OSDK and remote control issues: The OSDK and remote control cannot control the drone at the same time. 2、Active tracking: ActiveTrackMission uses a vision system to track objects and does not require GPS information. 3、The DJI FLY app may better integrate these features, allowing simultaneous control of the drone and active tracking missions.

I hope our solution can help you, thank you for your email, wish you a happy life! Best Regards, Dji innovation SDK technical support

°°°

HEEJUN-SHIN commented 1 month ago

So, to summarize, the virtual stick mode is not compatible with any Active tracking features. I got it.

Then my last question is

Is the "Collision Avoidance" feature of flight assistant available with virtual stick mode?

dji-dev commented 1 month ago

Agent comment from SHENRONG.LE in Zendesk ticket #118618:

Dear developers, Hello, thank you for contacting DJI Innovation.

In virtual joystick mode, the obstacle avoidance function of some models may not work properly. The details are as follows: M30 and later models: Visual obstacle avoidance is not effective when the virtual joystick is turned on, please fly with caution. M300: Visual obstacle avoidance takes effect when the virtual joystick is enabled. DJI Mini 3 Pro: Supports virtual joystick obstacle avoidance. Therefore, the ability to use obstacle avoidance in virtual joystick mode depends on the specific model. Please check whether obstacle avoidance is available based on your model.

I hope our solution can help you, thank you for your email, wish you a happy life! Best Regards, Dji innovation SDK technical support

°°°

HEEJUN-SHIN commented 1 month ago

As I mentioned at the first commit, I am using DJI AIR 2.

dji-dev commented 1 month ago

Agent comment from SHENRONG.LE in Zendesk ticket #118618:

Dear developers, Hello, thank you for contacting DJI Innovation.

virtual joystick does not affect obstacle avoidance, the user does not turn off obstacle avoidance, encounter obstacles will trigger obstacle avoidance.

I hope our solution can help you, thank you for your email, wish you a happy life! Best Regards, Dji innovation SDK technical support

°°°

HEEJUN-SHIN commented 1 month ago

Thank you! helped a lot.

dji-dev commented 1 month ago

Agent comment from SHENRONG.LE in Zendesk ticket #118618:

Dear developers, Hello, thank you for contacting DJI Innovation.

Please feel free to contact us if you have any follow-up questions

I hope our solution can help you, thank you for your email, wish you a happy life! Best Regards, Dji innovation SDK technical support

°°°