Go to Post Why is it whenever you tell someone there is a million billion stars in the universe they believe you, but if you tell someone that the bench over yonder has wet paint, or if usfirst.org comes up as the 1st result in Google people have to try it for themselves? - artdutra04 [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 29-01-2010, 07:26
JohnFogarty's Avatar
JohnFogarty JohnFogarty is offline
Trapped under a pile of MECANUMS :P
AKA: @doctorfogarty
FTC #11444 (Garnet Squadron) & FRC#1102 (M'Aiken Magic)
Team Role: Mentor
 
Join Date: Aug 2009
Rookie Year: 2006
Location: SC
Posts: 1,580
JohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond repute
The 2nd Joystick must DIE

it still doesnt work i must have tried one hundred ways now heres my code.


and the teleop vi



HELP! if you could post a tank drive program it would help alot!!
__________________
John Fogarty
2010 FTC World Championship Winner & 2013-2014 FRC Orlando Regional Winner
Mentor FRC Team 1102 M'Aiken Magic
"Head Bot Coach" FTC Team 11444 Garnet Squadron
Former Student & Mentor FLL 1102, FTC 1102 & FTC 3864, FRC 1772, FRC 5632
2013 FTC World Championship Guest Speaker
  #2   Spotlight this post!  
Unread 29-01-2010, 08:00
Greg McKaskle Greg McKaskle is offline
Registered User
FRC #2468 (Team NI & Appreciate)
 
Join Date: Apr 2008
Rookie Year: 2008
Location: Austin, TX
Posts: 4,753
Greg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond reputeGreg McKaskle has a reputation beyond repute
Re: The 2nd Joystick must DIE

What does and doesn't work? Does it move at all, only left side works, etc?

Greg McKaskle
  #3   Spotlight this post!  
Unread 29-01-2010, 08:35
Hadi379's Avatar
Hadi379 Hadi379 is offline
Registered User
FRC #0379
 
Join Date: Jan 2007
Location: Girard
Posts: 171
Hadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to behold
Re: The 2nd Joystick must DIE

Your begin.vi looks fine, although, you need to move your drive code in the telop.vi outside of the case it is in now, and put it into the larger case structure. The case you have it in now, I believe is for camera tracking. Also, I only see "joystick 2" being referenced, you'll need to reference "joystick 1" as well instead of using the "joystick read" block.

Furthermore, don't forget to close the "Joystick 2" in your final.vi, everything else should be closed already.

Last edited by Hadi379 : 29-01-2010 at 08:39.
  #4   Spotlight this post!  
Unread 29-01-2010, 09:43
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,587
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: The 2nd Joystick must DIE

Quote:
Originally Posted by Hadi379 View Post
Your begin.vi looks fine, although, you need to move your drive code in the telop.vi outside of the case it is in now, and put it into the larger case structure. The case you have it in now, I believe is for camera tracking. Also, I only see "joystick 2" being referenced, you'll need to reference "joystick 1" as well instead of using the "joystick read" block..
The case it is in is the case when not camera tracking, so it's correct. Joystick 1 is referenced in the Joystick Read VI from the default framework. I do not see anything wrong with the code.

John, It appears that you have similar problems in this thead. I wonder if the problem isn't with the code, but how you are running it. How are you running the code?

It also looks like you are using Windows 7. Have you tried it on a supported operating system?
  #5   Spotlight this post!  
Unread 29-01-2010, 11:33
JohnFogarty's Avatar
JohnFogarty JohnFogarty is offline
Trapped under a pile of MECANUMS :P
AKA: @doctorfogarty
FTC #11444 (Garnet Squadron) & FRC#1102 (M'Aiken Magic)
Team Role: Mentor
 
Join Date: Aug 2009
Rookie Year: 2006
Location: SC
Posts: 1,580
JohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond repute
Re: The 2nd Joystick must DIE

@Joe tried XP as well, i when i want to try the code i richt click boot time device and select run as startup after the changes I make.

@Greg Only the USB1 stick responds left side. I even tried a program where instead of you separte joysticks it was one daul action usb and i set the axis's to axis 2 and axis 5 and still only the axis 2 worked.
__________________
John Fogarty
2010 FTC World Championship Winner & 2013-2014 FRC Orlando Regional Winner
Mentor FRC Team 1102 M'Aiken Magic
"Head Bot Coach" FTC Team 11444 Garnet Squadron
Former Student & Mentor FLL 1102, FTC 1102 & FTC 3864, FRC 1772, FRC 5632
2013 FTC World Championship Guest Speaker
  #6   Spotlight this post!  
Unread 29-01-2010, 11:51
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,587
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: The 2nd Joystick must DIE

Quote:
Originally Posted by John_1102 View Post
@Joe tried XP as well, i when i want to try the code i richt click boot time device and select run as startup after the changes I make.
I assume you chose build before run as startup?

Do you have any errors on the diagnostics tab of the DS?
  #7   Spotlight this post!  
Unread 29-01-2010, 11:59
JohnFogarty's Avatar
JohnFogarty JohnFogarty is offline
Trapped under a pile of MECANUMS :P
AKA: @doctorfogarty
FTC #11444 (Garnet Squadron) & FRC#1102 (M'Aiken Magic)
Team Role: Mentor
 
Join Date: Aug 2009
Rookie Year: 2006
Location: SC
Posts: 1,580
JohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond reputeJohnFogarty has a reputation beyond repute
Re: The 2nd Joystick must DIE

Yes i do, do you have to rebuild it every time?. When i do have errors they are in reference to the camera, some times a watchdog timeout but it doesn't effect the controller 1 and never gives me any error in reference to controller 2. The Dashboard PWM ports where the 2nd controller would be controlling dont respond either.
__________________
John Fogarty
2010 FTC World Championship Winner & 2013-2014 FRC Orlando Regional Winner
Mentor FRC Team 1102 M'Aiken Magic
"Head Bot Coach" FTC Team 11444 Garnet Squadron
Former Student & Mentor FLL 1102, FTC 1102 & FTC 3864, FRC 1772, FRC 5632
2013 FTC World Championship Guest Speaker
  #8   Spotlight this post!  
Unread 29-01-2010, 12:38
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,587
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: The 2nd Joystick must DIE

Quote:
Originally Posted by John_1102 View Post
Yes i do, do you have to rebuild it every time?.
Yes, you must build after every change if you want to run it as startup.

Alternately, you can click the run button in robot main to run in debug mode. Then you can use debug tools like probes to see what is actually happening in the code. For example, you can probe the value from the joystick and see if it is doing what you expect or if the problem is somewhere downstream.
  #9   Spotlight this post!  
Unread 29-01-2010, 12:55
fritzdejongh fritzdejongh is offline
Coach
FRC #2704
 
Join Date: Jan 2009
Rookie Year: 2009
Location: Batavia, IL
Posts: 18
fritzdejongh has a spectacular aura aboutfritzdejongh has a spectacular aura aboutfritzdejongh has a spectacular aura about
Re: The 2nd Joystick must DIE

Could it be that your joystick assignments are reversed? (ie the one you're assigning to USB1 ends up being joystick 2 and vice versa). It seemed like for us the USB port assignments weren't stable. The students seem to have figured out how to go with the flow, so I don't have a better description of this.
  #10   Spotlight this post!  
Unread 29-01-2010, 14:04
Hadi379's Avatar
Hadi379 Hadi379 is offline
Registered User
FRC #0379
 
Join Date: Jan 2007
Location: Girard
Posts: 171
Hadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to beholdHadi379 is a splendid one to behold
Re: The 2nd Joystick must DIE

Can someone look at my telop code and let me know if this is correct. I thought I was on the right track, but from other posts on here, I decided to go another route. The image of the telop.vi is attached. Sorry for the poor resolution, but i had to make the file size small enough. Thanks....
Attached Images
File Type: bmp holonomic3.bmp (73.5 KB, 42 views)

Last edited by Hadi379 : 29-01-2010 at 14:06.
  #11   Spotlight this post!  
Unread 31-01-2010, 02:27
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: The 2nd Joystick must DIE

Quote:
Originally Posted by Hadi379 View Post
Can someone look at my telop code and let me know if this is correct. I thought I was on the right track, but from other posts on here, I decided to go another route. The image of the telop.vi is attached. Sorry for the poor resolution, but i had to make the file size small enough. Thanks....
It looks reasonable, but there is an easier way to convert from cartesian to polar (the magnitude and direction). In the palette under Programming >> Numeric >> Complex choose "Re/Im to Polar". This VI does all that math internally. The output is in radians, so you still need the conversion to degrees.

In the next update there will also be a VI that takes cartesian inputs so you can wire your joystick up directly.

As for the poor resolution, you should use jpg or png, not bmp. bmp is basically just a raw image with no compression.
  #12   Spotlight this post!  
Unread 31-01-2010, 09:50
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,587
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: The 2nd Joystick must DIE

Quote:
Originally Posted by jhersh View Post
It looks reasonable, but there is an easier way to convert from cartesian to polar (the magnitude and direction). In the palette under Programming >> Numeric >> Complex choose "Re/Im to Polar". This VI does all that math internally. The output is in radians, so you still need the conversion to degrees.
The help implies that some of the inputs should be in degrees. However, when I dug in, it looks like it limits the values to -1 to 1, which implies they should not be degrees, but joystick values. Am I reading that right?

Also, wouldn't putting the gyro in as an input cause positive feedback? Shouldn't that also be a joystick value?
  #13   Spotlight this post!  
Unread 31-01-2010, 16:16
jhersh jhersh is offline
National Instruments
AKA: Joe Hershberger
FRC #2468 (Appreciate)
Team Role: Mentor
 
Join Date: May 2008
Rookie Year: 1997
Location: Austin, TX
Posts: 1,006
jhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond reputejhersh has a reputation beyond repute
Re: The 2nd Joystick must DIE

Quote:
Originally Posted by Joe Ross View Post
The help implies that some of the inputs should be in degrees. However, when I dug in, it looks like it limits the values to -1 to 1, which implies they should not be degrees, but joystick values. Am I reading that right??
I assume you are talking about digging into the HolonomicDrive VI. It takes 3 inputs... Magnitude (which is from 0.0 - 1.0), Direction (which is in degrees) and Rotation (which is -1.0 to 1.0, but has errant documentation claiming it is in degrees/sec).

Quote:
Originally Posted by Joe Ross View Post
Also, wouldn't putting the gyro in as an input cause positive feedback? Shouldn't that also be a joystick value?
Who's putting the Gyro in? I'm guessing you mean into the Direction input. The Gyro only comes into play if you want field oriented control, in which case you would subtract the gyro angle from the desired direction coming from the cartesian to polar conversion.

-Joe
  #14   Spotlight this post!  
Unread 31-01-2010, 16:23
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,587
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: The 2nd Joystick must DIE

Quote:
Originally Posted by jhersh View Post
Who's putting the Gyro in? I'm guessing you mean into the Direction input. The Gyro only comes into play if you want field oriented control, in which case you would subtract the gyro angle from the desired direction coming from the cartesian to polar conversion.

-Joe
Nevermind, I didn't follow the wires correctly.
Closed Thread


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

Similar Threads
Thread Thread Starter Forum Replies Last Post
pic: In the pit everyone must follow the rules Rich Wong Extra Discussion 3 02-07-2009 15:57
The 2nd and 3rd Clue???? nevereverregret General Forum 4 19-01-2009 20:22
Why MUST the 7.2v battery be attached to operate servos on the RC? Mike Rush Control System 17 06-02-2004 18:57
... And the Boards Die AJ Quick Chit-Chat 19 14-04-2003 13:36
I must be the postman... archiver 2001 4 23-06-2002 22:22


All times are GMT -5. The time now is 21:22.

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