Simple “turtle” type commands?
1212 6 2019-11-3
Uploading and Loding Picture ...(0/1)
o(^-^)o
gpvillamil
lvl.4
Flight distance : 210226 ft
United States
Offline

I want to set up some simple "turtle graphic" type examples for a class, and I was wondering if there some basic commands for turning x number of degrees, then moving forward in the resulting orientation for a given time.

Most of the chassis commands seem to incorporate multiple parameters, such as heading and duration one command. I could use simpler commands for teaching, eg

Number of sides = 3
Repeat for number of sides
    Turn right 360 / number of sides
    Move forward for 1 second

Do you know if this is possible?
2019-11-3
Use props
rhoude57 - YUL
lvl.4
Canada
Offline

I think this is what you are looking for:

2019-11-3
Use props
gpvillamil
lvl.4
Flight distance : 210226 ft
United States
Offline

Thanks, that seems to work well. I have a Sphero robot with an IMU, and on that one I need to read the existing heading and add the turn angle.

On the Robomaster S1 the turn seems to be relative, which is good.

I notice an odd thing: it pauses for quite a long time after the second turn, I wonder if it is waiting for the IMU to settle down or something.

2019-11-3
Use props
DJI Tony
Administrator

Offline

Hi, we're glad that you've managed to figure out your concern via the help of our DJI Forum member. Should you have further concerns, please keep us posted. Thank you for your support!
2019-11-3
Use props
gpvillamil
lvl.4
Flight distance : 210226 ft
United States
Offline

Here is the equivalent for a Sphero RVR - since it makes its turns using absolute values, I have to read back the existing heading first

2019-11-3
Use props
rhoude57 - YUL
lvl.4
Canada
Offline

gpvillamil Posted at 11-3 12:06
Thanks, that seems to work well. I have a Sphero robot with an IMU, and on that one I need to read the existing heading and add the turn angle.

On the Robomaster S1 the turn seems to be relative, which is good.

Strange... I ran the exact same program and did not experience the pause after the 2nd turn.
2019-11-3
Use props
gpvillamil
lvl.4
Flight distance : 210226 ft
United States
Offline

rhoude57 - YUL Posted at 11-3 13:22
Strange... I ran the exact same program and did not experience the pause after the 2nd turn.

It’s pretty consistent. I’ve narrowed it down a bit. It pauses for 2 seconds before starting the final straight segment, after making the last turn.
2019-11-4
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules