Help to program parabola and spiral for bebop 2


#1

I’m programming a bebop 2 with the ARDSK3 and I need help to understand which parameters to give to the methods sendStartSpiral and sendStartParabola…
these are my methods, but the drone doesn’t execute the command
public void startParabola(){
mDeviceController.getFeatureAnimation().sendStartParabola((byte)2, (float)2, (float)1, (ARCOMMANDS_ANIMATION_PLAY_MODE_ENUM)ARCOMMANDS_ANIMATION_PLAY_MODE_ENUM.ONCE_THEN_MIRRORED);
}
public void startSpiral(){
mDeviceController.getFeatureAnimation().sendStartSpiral((byte)4, (float)2, (float)1, (float)1, (float)2, (ARCOMMANDS_ANIMATION_PLAY_MODE_ENUM)ARCOMMANDS_ANIMATION_PLAY_MODE_ENUM.ONCE_THEN_MIRRORED);
}

I make a casting because Android Studio recognizes the parameters as double and not float.
Please help me :slight_smile:


#2

Hi,

Could you fill the following information please?

Product: [Bebop/Bebop2]
Product version: [X.X.X]
SDK version: [X.X.X]
Use of libARController: [YES/NO] (Only for ARSDK)
SDK platform: [iOS/Android/Unix/Python…]
Reproductible with the official app: [YES/NO/Not tried]


#3

Product: [Bebop2]
Product version: [4.3.0]
SDK version: [3.13.1]
Use of libARController: [YES] (Only for ARSDK)
SDK platform: [Android]
Reproductible with the official app: [Not tried]


#4

All right, thanks.

The first thing you’ll have to do is to check the availability of the animation with this event.

If the animation is not available, (and I think it will be your case), this is certainly because the drone can’t do this animation in its current state. As the spiral and the parabola need a point of reference (the center of the spiral, or the middle point of the parabola), you’ll need to be in piloted Point Of Interest or in FollowMe mode.
To test the animations, I suggest you to try in Piloted POI mode since it is easier to configure.

If the animation is available, the easiest way to test it is to set the provided_params bitfield argument to 0. That way, all parameters of the animation will be set by the drone, you don’t have anything to do.
If this has worked, you can now customize some of the parameter.

Here is the documentation of the command: http://developer.parrot.com/docs/reference/bebop_2/index.html#start-spiral


#5

Thank you so much, I’ll try following your advice.
Neverthless I’ve already read the documentation and I don’t understand why the methods aren’t executed with my parameters, could you help me understanding why?
And how can I configure a Point Of Interest if I have to test the drone in a closed place?
Thank you so much!


#6

I set the POI and the drone looks at it, but when I give the command to execute the spiral or the parabola the drone just goes straight to the point, without executing anything. I’ve tried setting the params provided at 0, but nothing.
Could you help me?
thanks


#7

I’ll need more information to help you.

Could you provide me the command you send (with the parameters).
How far your drone is from the POI?


#8

The POI is set about 2 m far from the drone. When it recognizes the poi I send this command:
public void startParabola(){

    mDeviceController.getFeatureAnimation().sendStartParabola((byte)0, (float)2.1, (float)1,
          (ARCOMMANDS_ANIMATION_PLAY_MODE_ENUM)ARCOMMANDS_ANIMATION_PLAY_MODE_ENUM.ONCE_THEN_MIRRORED);
}

with 0 params provided, and this:
public void startParabola(){

    mDeviceController.getFeatureAnimation().sendStartParabola((byte)3, (float)2.1, (float)1,
            (ARCOMMANDS_ANIMATION_PLAY_MODE_ENUM)ARCOMMANDS_ANIMATION_PLAY_MODE_ENUM.ONCE_THEN_MIRRORED);
}

but in each case the drone just goes straight to the POI, without executing anything…


#9

Ok, thanks.
Do you check the animation availability? If so, could you provide the code extract which prints a log in it and the output log.


#10

The animation is available for my drone, But I can’t get your code. In My opinion the problem is related to the precision of the gps coordinates