PathPlanner - holonomic rotation trajectory issues

We’re starting with Swerve this year, and got the field-centric teleop working very well. We wrote our code using multiple team’s repositories (and can share if interested; we purposefully documented it in detail, and made both motors and IMU interface objects, so easy to substitute for any motor controller or IMU). We’re at the point of configuring and trying the auto path navigation.

With the tank drive in the past we used PathPlanner to much success. However, I noted that PathPlanner does not seem to generate trajectories that have holonomic component or any kind of sideways movement quite well.

The worst one is a sample trajectory where we simply want robot to run in place 90 degrees. Instead of simply turning in place the PathPlanner wants it to go forward a little, turn and then move back. In other words, definitely not turning in place.

With the sideways trajectory if we go from, say, 2,2,0,0 to 2,3,0,0 it goes forward a little, then sideways and back, and then forward a little again.

Why???

We calibrated our robot that the wheel turns are on 1ms cycle, and are VERY fast. There is no need to do any kind of adjustments for the time it takes to turn the wheel to a given angle.

1 Like

Do you have holomonic rotation enabled? In PathPlanner, open the settings, and check the “Holomonic Mode”. That will allow you to turn while moving.

Yes, holonomic is enabled. Same issue.

This picture may explain it better.

This trajectory suppose to simply move the robot to the left 1 meter. Instead it’s moving a little forward, then to the left and backward, then a little forward again.

Why??

Coordinates of the start and end points:

Settings:

There isn’t any holomonic rotation happening. You can adjust the angle at each stop point by dragging on the white dot on the edge of the rectangles

If you adjust the angles of those, the robot will rotate

The heading (and not the holonimic rotation) determines the path itself. You can change its angle and magnitude by dragging around the white dots that extend from the middle of the poses.

So, the solution is set heading to 90 in both cases?

What about the rotation in place?

For instance, this is what it draws for the in-place rotation when the start heading is 0, and end heading is 90.

When both are zeros, the linear motion is a straight line

And I think I got it! The magnitude of the forward motion is done via white dots. If you do not want any, just place it in the center. We can see how well that works.

1 Like

We imagine that the little white dots are representing the way you want the wheels to face (not the way you want the robot frame to face). This means that for the robot to go left, the wheels have to rotate from forward to the left. But at the same time it’s accelerating so the robot will move forward then left. You can adjust the white dots to tell the robot to put the wheels to face left initially and when the routine starts the wheels will snap to the left

You can use the preview function to see it will show the robot following the curved white like path. To just go in a straight line you should move the spline control points to point up and down. Then you can probably lower the magnitude of the length of the line as well.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.