team4909 / 2018-PowerUp

Team 4909's 2018 Robot Code
MIT License
5 stars 0 forks source link

Try SRX Path Following w/ Pathfinder #34

Closed roshanr10 closed 6 years ago

roshanr10 commented 7 years ago

As per #5, we were able to create a trajectory given input waypoints.

Next step is to follow this trajectory, Pathfinder has their own code to do so: https://github.com/JacisNonsense/Pathfinder/wiki/Pathfinder-for-FRC---Java#following-a-trajectory. We should also integrate gyro input, as shown in their example.

However, this uses raw voltage control, and does not take advantage of the motion profile mode that the Talon SRXs have. We need to do some more research into how we can use the motion profile mode, while still introducing gyro control.

This Chief Delphi Thread details some of the options: https://www.chiefdelphi.com/forums/showthread.php?t=156726.

CTR Electronics Talon SRX Motion Profiling Manual: https://www.ctr-electronics.com/downloads/pdf/Talon%20SRX%20Motion%20Profile%20Reference%20Manual.pdf

Here's a sample of Reading's code: https://github.com/Team4761/2017-Robot-Code/blob/0db905865d212a287a3b2f1e69ded5c1e46abcf7/src/org/robockets/steamworks/mystery/FollowTrajectory.java

Here's the sample drive straight in terms of the output trajectory data: Center Trajectory Left Trajectory Right Trajectory

roshanr10 commented 7 years ago

https://www.chiefdelphi.com/forums/showthread.php?t=156921&page=2

If this can use the Pigeon IMU directly in motion profiling this season to do heading correction, I think we might be better off with that than us trying to use a NavX and calculating stuff ourselves. Waiting to hear from CTRE.

roshanr10 commented 7 years ago

FYI: https://github.com/CrossTheRoadElec/FRC-Examples/issues/7#issuecomment-337076017

roshanr10 commented 6 years ago

New Finds:

Motion Profiling w/ Pigeon IMU Sample Java Code

Upcoming CTRE Pheonix Library