View Single Post
  #4   Spotlight this post!  
Unread 05-04-2012, 15:17
mikets's Avatar
mikets mikets is offline
Software Engineer
FRC #0492 (Titan Robotics)
Team Role: Mentor
 
Join Date: Jan 2010
Rookie Year: 2008
Location: Bellevue, WA
Posts: 667
mikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of lightmikets is a glorious beacon of light
Re: Arcade Drive with Speed PID?

Quote:
Originally Posted by rawrxp View Post
Hi all,

My team has decided that we want to use Speed PID because they think it will be better for fine tuning on the bridge. However, the only problem I see with it is that we have to use Arcade Drive because our driver prefers it over anything else. We use the CAN Speed settings on our jaguars to indicate our velocity and we are wondering if we can use RobotDrive with the Speed PID. Note we are also using Master/ Slave mode. Do we have to come up with our own algorithm to do Arcade Drive in master slave mode or can we just use some of the Robot Drive functions given to us?
By Speed PID, do you mean using the CAN Jaguar kSpeed control mode? If so, you should be able to use RobotDrive::ArcadeDrive with speed control mode. According to the code, you should be able to call RobotDrive::SetMaxOutput to set the maximum speed of your robot and then just feed RobotDrive::ArcadeDrive with your joystick values that's in the range of -1.0 to 1.0, the SetLeftRightMotorOutputs() code in RobotDrive will scale your -1.0 to 1.0 range to your -maxOutput to maxOutput range which is your speed range.
__________________
Reply With Quote