Go to Post so instead of saying why, we said why not? - Alpha Beta [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Spotlight this post!  
Unread 23-02-2016, 05:51
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: 666
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 class in WPILibJ

Thanks Andrew. In the past, I have seen a lot of students wrote code that did trial and error. When the motors did not go the way they wished, they negate the power. For example, I've seen students doing tankDrive(0.5, -0.5) or tankDrive(-0.5, -0.5) just to go forward. They said as long as it works, it shouldn't matter. But eventually, the code became very confusing. So when I taught my students, I always tell them to test each individual motor by setting positive power and make sure they go forward by doing setInverted on motors that spin in the wrong direction. And in theory when all motors are going forward with positive power, there should never be negative value in any kind of drive: tankDrive, arcadeDrive and mecanumDrive, when going forward. If you have to negate the power, somebody screwed up. That's why I think RobotDrive class is wrong.
__________________
Reply With Quote
 


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 09:34.

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