frc1418 / 2018-robot

:robot: Code for our 2018 competition robot, Panthera.
MIT License
3 stars 2 forks source link

pathfinder experimentation thoughts #163

Open virtuald opened 6 years ago

virtuald commented 6 years ago

If you're going to go down this path, here's what I recommend:

Pathfinder takes max velocity and max acceleration as parameters. I didn't understand at first what their relation to reality was. However, to get a smooth trajectory, it's really important to understand how they relate to the generated trajectory and the motor output values.

Pathfinder 'features' to be aware of:

Generating your trajectories on the robot is a bad idea, but here's other performance thoughts:

Once you get it working, you need to know how well it's actually working (or not working).

Finally, I'd recommend writing it as a magicbot component. Don't use a separate thread as the Java docs recommend -- threads are bad in python. You can use the LoopTimer to measure how stable your loops are... I've had issues this season but in theory we should be able to obtain stable 20ms loops (+/- 2ms or so).

virtuald commented 6 years ago

I updated the realistic physics PR. It feels a lot realistic than it did previously. I also updated an example program to show how to use it: https://github.com/robotpy/examples/tree/tankmodel/physics-4wheel/src

ErikBoesen commented 6 years ago

Now that the season is over and we have more free time to experiment with these things, we're actually going to work on getting MP working. Sorry we didn't get to this sooner. We'll let you know if we have any questions.