Drive_with_wasd_keys behavior

Hi. I have a Raspberry Pi connected to RVR. I tried out the drive_with_wasd_keys python script. It seems to work fine but when I pick up RVR it drives by itself (tracks move). And when I rotate it (while picked up) the tracks move faster. When I set it down again it stays still.

Is this expected behavior? Any ideas any this might be happening?

Thanks,

-Steve

This is the behaviour of the RVR when running that script. The RVR will try to drive towards a specific heading.

When you start the script the heading is set to 0:

heading = 0

Keypresses (A or D) increase or decrease the heading by steps of 10:

    elif current_key_code == 100:  # D
        heading += 10

The drive command issued to the RVR is:

    await rvr.drive_with_heading(speed, heading, flags)

When you pick it up and change where the RVR is pointing the tracks move to compensate for the change in heading when you physically move it.

So you dont acutally change the speed of the tracks with A and D, the RVR does that by itself when needed. You only change the heading the RVR is driving towards.

SPHERO Email Marketing -