Jar Template Swing Problem

Have a nice day, everyone. We are using Jar Template because we want to use PID via VexCode V5 Pro. After actions such as turning, going forward or backward during autonomous, the robot swings where it is located, sometimes for a long time and sometimes for a short time before moving on to the next action. Our inertial and rotation sensors are also used correctly in the existing code.

chassis.drive_distance();

// and

chassis.turn_to_angle();

We do not have basic level errors such as entering the port incorrectly, our gear ratio and wheel size were entered correctly. The Octagonal acceleration of the robot was checked via inertial.

We don’t know exactly what the problem is. We have a tournament on the weekend, we are waiting for urgent support.

Try using the advanced versions of drive_distance() and turn_to_angle().
This allows you to modify the kP, kI, kD values of PID.
If you increase the value of kD, the swings will be dampened.

You can find examples and docs of this in the "* Advanced Prototype " and “* Advanced Example” sections of some of the motor functions.

1 Like

This question was posted almost 10 months ago, and the user says they need urgent support. In the future, please don’t post in dead threads unless it’s necessary.

3 Likes