Go to Post po-nos, cancans, and totes ma goats - dubiousSwain [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 01-02-2014, 14:15
jls667 jls667 is offline
Registered User
None #2579
 
Join Date: Feb 2014
Location: ny
Posts: 25
jls667 is an unknown quantity at this point
Autonomous with Mechanum Wheels

It looks like I got driving mechanum wheels working. How do I get autonomous working? I use command like the ones below.

drive.mecanumDrive_Polar(.5,0,0);
timer(1,0);
drive.mechanumDrive_Polar(0,45,0);
timer(1,0);
drive.mecanumDrive_Polar(0,0,0);

I get an error, "Output not updated often enough." Any ideas?
Reply With Quote
  #2   Spotlight this post!  
Unread 02-02-2014, 06:17
pblankenbaker pblankenbaker is offline
Registered User
FRC #0868
 
Join Date: Feb 2012
Location: Carmel, IN, USA
Posts: 102
pblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of lightpblankenbaker is a glorious beacon of light
Re: Autonomous with Mechanum Wheels

That sounds like the motor safety mechanism is kicking in and stopping your motors because you are not setting the output powers quickly enough (the one second pause from your timer delay).

So, you have two choices. The simple solution is to disable the motor safety feature.

Code:
// Turn off drive safety feature as there are long delays between
// changing motor speeds during autonomous
drive.setSafetyEnabled(false);

// Your autonomous code

// Optionally turn drive safety feature back on (if you want it for teleop)
drive.setSafetyEnabled(true);
Alternatively, you can break your time delay up into smaller chunks.

Our team leaves the drive safety feature disabled for the entire match and rely on manual intervention to hit the Enter key when we need to disable a run away robot.
Reply With Quote
  #3   Spotlight this post!  
Unread 03-02-2014, 12:07
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,561
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Autonomous with Mechanum Wheels

The first important question is whether you're using SimpleTemplate or IterativeTemplate. If you're using SimpleTemplate, then your only problem is Motor Safety. If you are using IterativeRobot, you will need to restructure your code to remove the delays.

Here's a description of motor safety: http://wpilib.screenstepslive.com/s/...safety-feature The example Java program disabled motor safety in autonomous and enables it in teleop. See http://wpilib.screenstepslive.com/s/...ot-programming
Reply With Quote
  #4   Spotlight this post!  
Unread 06-02-2014, 12:59
jls667 jls667 is offline
Registered User
None #2579
 
Join Date: Feb 2014
Location: ny
Posts: 25
jls667 is an unknown quantity at this point
Re: Autonomous with Mechanum Wheels

I am using the SimpleRobot class. It turns out that I did turn safety off. My robot does nothing in autonomous. The robot works great in TeleOperator mode. I must have missed something else.
Reply With Quote
  #5   Spotlight this post!  
Unread 06-02-2014, 13:04
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,715
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Autonomous with Mechanum Wheels

Quote:
Originally Posted by jls667 View Post
I am using the SimpleRobot class. It turns out that I did turn safety off. My robot does nothing in autonomous. The robot works great in TeleOperator mode. I must have missed something else.
Can you post your code including the method for autonomous? Also, please post it in CODE tags so it will be easier to read.
Reply With Quote
  #6   Spotlight this post!  
Unread 06-02-2014, 15:42
jls667 jls667 is offline
Registered User
None #2579
 
Join Date: Feb 2014
Location: ny
Posts: 25
jls667 is an unknown quantity at this point
Re: Autonomous with Mechanum Wheels

Public void automous() {
myDrive.setSafetyEnabled(false);
myDrive.mecanumDrive_Polar(.5,0,0);
Timer.delay(1.0);
}
Reply With Quote
  #7   Spotlight this post!  
Unread 07-02-2014, 07:55
notmattlythgoe's Avatar
notmattlythgoe notmattlythgoe is offline
Flywheel Police
AKA: Matthew Lythgoe
FRC #2363 (Triple Helix)
Team Role: Mentor
 
Join Date: Feb 2010
Rookie Year: 2009
Location: Newport News, VA
Posts: 1,715
notmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond reputenotmattlythgoe has a reputation beyond repute
Re: Autonomous with Mechanum Wheels

Quote:
Originally Posted by jls667 View Post
Public void automous() {
myDrive.setSafetyEnabled(false);
myDrive.mecanumDrive_Polar(.5,0,0);
Timer.delay(1.0);
}
You have autonomous spelled wrong.

Is this what your code looks like, or is it spelled wrong in your code also?

Code:
public void autonomous() {
     myDrive.setSafetyEnabled(false);
     myDrive.mecanumDrive_Polar(.5,0,0);
     Timer.delay(1.0);
}
Reply With Quote
  #8   Spotlight this post!  
Unread 07-02-2014, 14:21
jls667 jls667 is offline
Registered User
None #2579
 
Join Date: Feb 2014
Location: ny
Posts: 25
jls667 is an unknown quantity at this point
Re: Autonomous with Mechanum Wheels

I made a different spelling mistake on my program. Thanks.
Reply With Quote
  #9   Spotlight this post!  
Unread 07-02-2014, 23:21
jls667 jls667 is offline
Registered User
None #2579
 
Join Date: Feb 2014
Location: ny
Posts: 25
jls667 is an unknown quantity at this point
Re: Autonomous with Mechanum Wheels

I have another related question. I want to use the method myDrive.mecanumDrive.Polar(x,y,z) in my autonomous method. Please explain the three numbers x,y,z. What does each do to the robot?
Reply With Quote
  #10   Spotlight this post!  
Unread 08-02-2014, 00:11
Domenic Rodriguez's Avatar
Domenic Rodriguez Domenic Rodriguez is offline
Registered User
FRC #0316 (LuNaTeCs)
Team Role: College Student
 
Join Date: Sep 2010
Rookie Year: 2011
Location: Grove City, PA
Posts: 213
Domenic Rodriguez has a spectacular aura aboutDomenic Rodriguez has a spectacular aura aboutDomenic Rodriguez has a spectacular aura about
Re: Autonomous with Mechanum Wheels

Quote:
Originally Posted by jls667 View Post
I have another related question. I want to use the method myDrive.mecanumDrive.Polar(x,y,z) in my autonomous method. Please explain the three numbers x,y,z. What does each do to the robot?
RobotDrive#mecanumDrive_Polar() takes input in the form of polar coordinates, as opposed to RobotDrive#mecanumDrive_Cartesian() which takes Cartesian (Rectangular) coordinates. The three parameters for RobotDrive#mecanumDrive_Polar() are as follows:

Quote:
Originally Posted by FRC Javadocs
magnitude - The speed that the robot should drive in a given direction.
direction - The direction the robot should drive in degrees. The direction and magnitude are independent of the rotation rate.
rotation - The rate of rotation for the robot that is completely independent of the magnitude or direction. [-1.0..1.0]
You can find information like this in the Javadocs in the sunspotfrcsdk directory.
__________________

LuNaTeCs - Learning Under Nurturing Adults Teaching Engineering Concepts and Skills - Small and Mighty!

FRC 316 LuNaTeCs - Student (2011-2014), Lead Programmer (2011-2014), Team Captain (2013-2014), Operator (2013), Drive Coach (2014), Mentor (2015-????)
'11 Philly Regional Finalists, '13 Chestnut Hill Finalists, '13 Lenape Champions, '13 Archimedes Division, '14 Chestnut Hill Champions, '14 Lenape Champions
FTC 7071 EngiNerds - Founding Advisor (2013-2014) | FRC 5420 Velocity - Founding Advisor (2015)
Grove City College Class of '18, Electrical/Computer Engineering (B.S.E.E)

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 11: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