Robot turns too fast with Pathplanner

We are trying out Pathplanner this year. We have a differential drive robot. I set up a simple L-shaped path. I can control the drive speed of the robot with the Pathplanner settings but when it makes the 90 degree turn, it seems like the motors go at high speed and it overshoots the turn before driving the final leg. Is there some place in Pathplanner or in my robot code where the turn speed can be controlled? I assume Pathplanner just calls my drive method with ChassisSpeeds for both straight and turns so I would not know it was making a turn. Seems like that setting should be in Pathplanner for a non-holonomic drive. Or the max velocity settings should apply to turns, too.

Ensure you’re actually using your global constraints in your path file. For us we had to check a box to use them for those values to change the speeds.

It drives forward at the correct speed I set in the constraints. It’s the turn that seems to be ignoring the max speed settings.

Can you send your code?

Which part of the code do you want?

Ideally a GitHub link to your entire repository

I don’t see a way to share a private repository via a link.

We had this problem. Our root cause was configuring swerve kinematics in inches when it wanted meters. Any rotational command completely maxed out the motors because it thought the radius of the robot was 13 m instead of in. :man_facepalming:

You can add my account to the repository if you want, “nobody5050” on GitHub. Otherwise, share your pathplanner ramseteconfig and your path file.

They’re using a differential drive, but I could definitely see this be a unit conversion issue. @stu54 are you using java or c++?

Since this drive is not holonomic, there is not a rotate rate involved. We will move to our swerve drive once we get our differential test chassis working with Pathplanner. I figured there were less things to go wrong if we learned on the differential drive first.

Ironically you’ll probably have more success starting with swerve since teams with enough resources to use swerve are likely to use pathplanner also. Because of this, you might see more help with issues you experience while writing it for swerve than for differential drive.

Our swerve is not available since they are mounting the mechanisms. I think I have all the encoder values correct since it drives the desired distance at the desired speed. That makes me think my Ramsete is set up right. I have not tuned any PID values but I don’t think that would matter. Try this link to see the files https://drive.google.com/drive/folders/1-MFy7tWFy0UwQ2IjrXNTmG4IL7Gq9hCG?usp=drive_link

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