Go to Post FIRST is an opportunity for me to tackle problems that have long been solved. - Madison [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 06-02-2012, 16:47
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
RobotDrive::Drive() with CANJaguar

I see that RobotDrive:rive(),RobotDrive::ArcadeDrive(), RobotDrive::TankDrive() are setup to work with the CANJaguar class. However, since the output from the RobotDrive class is always limited to -1.0 to 1.0 I think it will only work if the Jaguar is in percent vbus control mode. It looks like if the min and max output was able to be set for RobotDrive then it could be used with the other control modes. Can someone confirm my conclusions? I may submit an enhancement request on FIRSTForge.
Reply With Quote
  #2   Spotlight this post!  
Unread 06-02-2012, 17:19
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: RobotDrive::Drive() with CANJaguar

Quote:
Originally Posted by jwakeman View Post
I see that RobotDrive:rive(),RobotDrive::ArcadeDrive(), RobotDrive::TankDrive() are setup to work with the CANJaguar class. However, since the output from the RobotDrive class is always limited to -1.0 to 1.0 I think it will only work if the Jaguar is in percent vbus control mode. It looks like if the min and max output was able to be set for RobotDrive then it could be used with the other control modes. Can someone confirm my conclusions? I may submit an enhancement request on FIRSTForge.
If I read the source code correctly, you can change the max output by calling RobotDrive::SetMaxOutput. So if you are running Speed mode, for example, with a 400 RPM as max output value, you can call it to set max output to 400 and SetLeftRightMotorOutputs will multiply the -1.0 to 1.0 range with maxOutput. So essential, you will be specifying a percentage of max output.
__________________
Reply With Quote
  #3   Spotlight this post!  
Unread 07-02-2012, 09:32
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
Re: RobotDrive::Drive() with CANJaguar

Yeah your right, not sure how I missed it. I should have slowed down a bit, I was on a thread starting terror yesterday.
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 12:35.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi