Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Robot not reaching any target point, and is off by the same amount every time #1026

Open
onthegrid007 opened this issue Jan 23, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@onthegrid007
Copy link

Describe the bug
Robot not reaching any target point, and is off by the same amount every time
we have tuned the pathplanner PID's, input accurate robot dimensions for chassis, wheel diameter, mass, moi, friction COEF.

To Reproduce

we run this path

{
  "version": "2025.0",
  "waypoints": [
    {
      "anchor": {
        "x": 2.0,
        "y": 7.0
      },
      "prevControl": null,
      "nextControl": {
        "x": 2.25,
        "y": 7.0
      },
      "isLocked": false,
      "linkedName": null
    },
    {
      "anchor": {
        "x": 4.0,
        "y": 7.0
      },
      "prevControl": {
        "x": 3.750000000000004,
        "y": 7.0
      },
      "nextControl": {
        "x": 4.26321391015674,
        "y": 7.0
      },
      "isLocked": false,
      "linkedName": null
    },
    {
      "anchor": {
        "x": 2.0,
        "y": 7.0
      },
      "prevControl": {
        "x": 1.75,
        "y": 7.0
      },
      "nextControl": null,
      "isLocked": false,
      "linkedName": null
    }
  ],
  "rotationTargets": [],
  "constraintZones": [
    {
      "name": "Constraints Zone",
      "minWaypointRelativePos": 0.7982942430703587,
      "maxWaypointRelativePos": 1.0063965884861379,
      "constraints": {
        "maxVelocity": 0.5,
        "maxAcceleration": 0.1,
        "maxAngularVelocity": 540.0,
        "maxAngularAcceleration": 720.0,
        "nominalVoltage": 12.0,
        "unlimited": false
      }
    }
  ],
  "pointTowardsZones": [],
  "eventMarkers": [],
  "globalConstraints": {
    "maxVelocity": 3.0,
    "maxAcceleration": 2.0,
    "maxAngularVelocity": 540.0,
    "maxAngularAcceleration": 720.0,
    "nominalVoltage": 12.0,
    "unlimited": false
  },
  "goalEndState": {
    "velocity": 0,
    "rotation": 0.0
  },
  "reversed": false,
  "folder": null,
  "idealStartingState": {
    "velocity": 0,
    "rotation": 0.0
  },
  "useDefaultConstraints": false
}

Expected behavior
should be reaching target points

Screenshots
If applicable, add screenshots to help explain your problem.

Versions: (please complete the following information):

  • OS: Windows 11
  • GUI Version: 2025.2.1
  • PPLib Version: 2025.2.1
  • PPLib Language: C++
@onthegrid007 onthegrid007 added the bug Something isn't working label Jan 23, 2025
@mjansen4857
Copy link
Owner

This is an issue with your config/swerve code. I don't really have the time to debug other teams' code anymore, so you're probably better off looking for help on CD or something. I've seen a few threads there that have found the issue to be part of their config or unit conversions that you could look at.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants