Thread: RobotDrive Bug?
View Single Post
  #1   Spotlight this post!  
Unread 01-02-2010, 14:44
Bryscus's Avatar
Bryscus Bryscus is offline
EE, CpE
AKA: Bryce B.
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Jan 2009
Rookie Year: 1999
Location: Jupiter, FL
Posts: 173
Bryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud ofBryscus has much to be proud of
RobotDrive Bug?

Hi Guys,

I have a weird situation that I've come across. I'll start with the back story:

Using last year's cRio setup, we have 4 Jags and 4 Victors. I have implemented the CAN interface using the Jags. Our robot requires 5 Jags to drive. Hence, I have a dilemma where I'm short one Jaguar. So the quick fix was to use 4 Jags and 1 Victor. This would not be the final configuration, but I figured it would work for the meantime. Just to get something up and running quickly, I made use of the RobotDrive class. I instantiated the class in its 4 wheel drive mode and used the arcade function using 3 Jags and 1 Victor (again, I know this isn't necessarily a good idea). The 4th Jag is being used for position control using the closed-loop position mode on the Jags over the CAN interface. I then make use of the ArcadeDrive method of RobotDrive. Now, all the parts work separately, but when put together I can't get position mode anymore. Hence, the potential bug I'm seeing.

When I remove the Victor and replace it with a Jag, the code runs just fine. HOWEVER, I'm not sure why this SHOULDN'T work because the constructor for the 4 wheel drive method uses the SpeedController class from which both the Victors and Jags are derived. Thus, I'm at a loss to determine why this is happening. Everything seems fine in the provided WPI source code, but for some reason using a Victor hoses something else which then kills my CAN control. The position Jag will then move, but it won't move with feedback (like it's in kPercentVoltage mode or something).

Does anyone have any ideas?

- Bryce
__________________
The opulence of the front office decor varies inversely with the fundamental solvency of the firm.