View Single Post
  #1   Spotlight this post!  
Unread 24-01-2015, 13:32
Ether's Avatar
Ether Ether is offline
systems engineer (retired)
no team
 
Join Date: Nov 2009
Rookie Year: 1969
Location: US
Posts: 8,100
Ether has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond reputeEther has a reputation beyond repute
Re: Mecanum Encoders

Quote:
Originally Posted by Nunez4296 View Post
Could someone please explain how to utilize the encoders in our code to set the outputs of our motors?
If your encoders are connected to roboRIO:

You take the 4 outputs of the mecanum inverse kinematic computation (the desired wheel speed outputs) and you use those as the setpoint input to 4 corresponding closed-loop controllers (most teams use PID).

You use the encoder speed signals (suitably scaled) as the process_variable input to the corresponding closed-loop controllers.

You use the output from the 4 closed-loop controllers to command the 4 corresponding motor controllers.

OR...

If you are using TalonSRX motor controllers with CAN bus, and your encoders are connected directly to the Talons:

You setup the Talons for speed_control mode and send the desired wheel speeds (suitably scaled from the mec inverse kinematic computation) to the Talons.



Last edited by Ether : 24-01-2015 at 13:40.
Reply With Quote