View Single Post
  #16   Spotlight this post!  
Unread 12-01-2012, 03:36
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: New to 2CAN and Jaguar

I got it to work now. Here is what I learned:
- My encoders are not working, it could be the cable. We will figure that out later.
- Apparently, if I do kSpeed mode, the motors jerk back and forth violently. Sort of vibrating loudly. That gave me the hint that the encoders are not working. I added a call to GetPosition and saw only zeros.
- So I changed the code to use kVoltage mode and scale the joystick values by multiplying with 12.0. This doesn't work either.
- Then I thought since the encoders are not working, I would disable all the encoder related initialization. To my surprise, that works. I would have thought the encoder is ignored when doing kVoltage mode, but apparently not.
- With the encoder initialization disabled, I changed the code to use kPercentVbus mode and removed the 12.0 multiplier. That also worked.

So the robot is totally tele-operating. Next step is to figure out what's wrong with the encoders.
__________________
Reply With Quote