Go to Post Oh, the magic smoke will just make make it seem a bit more like Christmas. - CJO [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-01-2015, 15:57
nathanzentner08 nathanzentner08 is offline
Registered User
FRC #2073
 
Join Date: Jan 2015
Location: Sacramento
Posts: 6
nathanzentner08 is an unknown quantity at this point
RobotDrive

Ive Created a RobotDrive with 4 controllers, and associated it to a Joystick. I do have 2 Victors that are working, which should be my left side. I have tested them with code using the set(.50) and they both work.

drive = new RobotDrive(vic01, vic02, vic03, vic04)
drive.arcadeDrive(stick);


when I go into teleop mode, I get a message "Robot Drive... Output not updated enough"

1) I do not have vic03, or vic04 connected. (Assuming that the left side should work regardless of the right side failure.
2) Im assuming that associating a drive with controllers and then associating a Joystick to the drive is going to automatically allow me to control movement of my motors.
3) Im assuming that I will not have to capture inputs from the joystick and translate them myself to the motors.
4) I have opened the SRC of the edu.wpi.first libs and searched for this message. I could not find it anywhere. What is the standard logging mechanism that writes to the Riolog? (System.out, Log4j, Other?)
Reply With Quote
  #2   Spotlight this post!  
Unread 08-01-2015, 16:27
fsilberberg fsilberberg is offline
WPILib Developer
AKA: Fred Silberberg
FRC #0190
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Redmond
Posts: 146
fsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura about
Re: RobotDrive

Try disabling the safety on the RobotDrive with
Code:
drive.setSafetyEnabled(false)
This is the timeout between updates of the RobotDrive. It really isn't super important to keep it enabled, but if you want to enable it, then try timing your code and set the timeout longer than the loop that is calling arcade drive.

About the RioLog, anything printed to stdout or stderror will appear in the log.
Reply With Quote
  #3   Spotlight this post!  
Unread 08-01-2015, 16:42
nathanzentner08 nathanzentner08 is offline
Registered User
FRC #2073
 
Join Date: Jan 2015
Location: Sacramento
Posts: 6
nathanzentner08 is an unknown quantity at this point
Re: RobotDrive

So that solved my "Robot Drive... Output not updated enough" issue and I did find that message in MotorSafetyHelper, so I was close,

But what about 2, and 3

2) Im assuming that associating a drive with controllers and then associating a Joystick to the drive is going to automatically allow me to control movement of my motors.
3) Im assuming that I will not have to capture inputs from the joystick and translate them myself to the motors.
Reply With Quote
  #4   Spotlight this post!  
Unread 08-01-2015, 16:51
TFleig78's Avatar
TFleig78 TFleig78 is offline
Registered User
AKA: Tyler
FRC #0078 (Air Strike)
Team Role: Programmer
 
Join Date: Jan 2013
Rookie Year: 2012
Location: Rhode Island
Posts: 58
TFleig78 will become famous soon enoughTFleig78 will become famous soon enough
Re: RobotDrive

Yes, the code you have should allow you to drive with that Joystick. You should not have to manually write code to get stick values then write them to the motors. Robot drive will do this for you.
Reply With Quote
  #5   Spotlight this post!  
Unread 08-01-2015, 16:54
nathanzentner08 nathanzentner08 is offline
Registered User
FRC #2073
 
Join Date: Jan 2015
Location: Sacramento
Posts: 6
nathanzentner08 is an unknown quantity at this point
Re: RobotDrive

Now that Im reading further into the demos, it looks like you do have to keep pulling the value of the

2) Im assuming that associating a drive with controllers and then associating a Joystick to the drive is going to automatically allow me to control movement of my motors. (FALSE)
3) Im assuming that I will not have to capture inputs from the joystick and translate them myself to the motors. (FALSE)

In the operatorControl method, they are looping and polling. I thought it was going to be more event driven.
Reply With Quote
  #6   Spotlight this post!  
Unread 08-01-2015, 16:55
fsilberberg fsilberberg is offline
WPILib Developer
AKA: Fred Silberberg
FRC #0190
Team Role: Alumni
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Redmond
Posts: 146
fsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura aboutfsilberberg has a spectacular aura about
Re: RobotDrive

Those assumptions are incorrect. Every time you call drive.arcadeDrive, it will update the speed controllers with the new values. The drive methods that take a joystick are simply convenience methods that save you the step of getting the joystick axes and passing them into the RobotDrive object. With safety off, the motors will continue to drive at the last set speed until you disable the robot or it runs out of power.
Reply With Quote
  #7   Spotlight this post!  
Unread 09-01-2015, 00:13
nickmcski nickmcski is offline
Registered User
AKA: Nicholas McCurry
FRC #1482 (Grandin Ghosts)
Team Role: Alumni
 
Join Date: Nov 2012
Rookie Year: 2012
Location: Canada
Posts: 111
nickmcski has a spectacular aura aboutnickmcski has a spectacular aura aboutnickmcski has a spectacular aura about
Re: RobotDrive

just to make sure, you aren't calling the constructor (drive = new RobotDrive(vic01, vic02, vic03, vic04) every time in the loop, you just have that once in robotInit()?
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 22:40.

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