RobotMesh Python Vex IQ Autonomous

I am trying to do some autonomous programming for IQ with Robot Mesh Studio Python. So far the only thing i can figure out about how to run my functions is to use wait times to let the motors move to the rotations I want to set. Is there a way to program it without using wait times to let the motors move?

Hi Noah.

Could you link to your project? Don’t forget to set the privacy level to “Public, Including Code” first.

https://www.robotmesh.com/studio/5e89fdab0b2ab463806c4e8b
The autonomous program for my x-drive drivetrain.

The class method you’re looking for is run_until(). The documentation can be found here.

Separately, it looks like you’re using the old API Python A. For future projects, you may consider switching to Python B, which uses the same calling conventions as V5, making it easier to graduate to that platform later.

    frontRightDrive.run(-speed,rot)
    frontLeftDrive.run(speed,rot)

You may also want to set your right motors to reverse polarity in the interface monitor:
image
This way you can command all your motors to run forward, and they’re just magically do the right thing.

3 Likes

Thank you so much for your help! I was wondering why the V5 API was so different than IQ.

1 Like