Go to Post It is possible to live without the Big sponsors, it just takes a lot of fund raising and hard work. - Raumiester2010 [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
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-03-2009, 18:17
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,752
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: Automous Programming

We can't tell what the polarity of your motors are or how they are mounted and geared. But your first loop is doing the same as moving one joystick forward and the other backwards. The second loop moves them both backwards. It may seem odd that pushing the joystick forward is negative numbers, but that is the way that HID devices are defined, and that was the standard chosen for the joystick library.

So my prediction is that the robot increases the spin speed for eight seconds, then sets the motors to slow backward and increases speed backwards for eight seconds.

Another thing to think about is how the robot drives using the joystick. After four seconds, your loop will effectively have the joysticks maxed out. Does that match what your human driver would do? It seems like you may want to try a smaller increment so that you wind up at the same point as the human driver.

To clean up the code a bit in readability, you can right click on the outer case and Remove the case. You can also do that to the sequence structure. You can right click on the output tunnels on the first for loop and disable the auto-indexing.

Greg McKaskle
Reply With Quote
  #2   Spotlight this post!  
Unread 01-03-2009, 18:43
EricVanWyk EricVanWyk is offline
Registered User
no team
 
Join Date: Jan 2007
Rookie Year: 2000
Location: Boston
Posts: 1,597
EricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond reputeEricVanWyk has a reputation beyond repute
Send a message via AIM to EricVanWyk
Re: Automous Programming

I strongly recommend making your code clearer by using the Arcade Mode VI during autonomous. It is easier to understand and code for (IMHO). For me, Tank is easier to drive but Arcade is easier to code.

To do so, you will need to invert that motor. I always "force" my programmers to fix things as soon as possible. In your case, you can fix it by using a -.2, or you can fix it by inverting that bit. The bit is sooner, which means you have to worry about it less. Less worry is more better.
Reply With Quote
  #3   Spotlight this post!  
Unread 01-03-2009, 21:26
gwytheyrn gwytheyrn is offline
Registered User
AKA: David
FRC #0461 (West Side Boiler Invasion)
Team Role: Programmer
 
Join Date: Dec 2007
Rookie Year: 2004
Location: Indiana
Posts: 44
gwytheyrn is infamous around these parts
Send a message via AIM to gwytheyrn
Re: Automous Programming

Meh, I disagree, since for tank drive, you're essentially setting the motor values yourself, whereas arcade it's processed by the arcade vi (note: i say essentially).

just out of curiosity, try the attached code...It uses a different structure and does it in a smaller steps (time and motor value), but should have the same overall function. The positives and negatives might be flipped around as previously mentioned though
Attached Files
File Type: vi Autonomous Independent.vi (24.1 KB, 62 views)
Reply With Quote
  #4   Spotlight this post!  
Unread 02-03-2009, 09:07
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,752
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: Automous Programming

From the little exerience I had in DC, I think there is benefit for using the same drive version or both tele and auto. That allows the auto code to replicate driver actions. True, if you can visualize the joystick maneuver either way, then I also prefer arcade for auto, but the important thing to me is that the person writing the auto can pretend they are setting the joystick and build code to replay that.

Perhaps someone would like to build a recorder for a drive session and play that back using an array of setpoints?

Greg McKaskle
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Team 1675' s AutoFlex automous Program bcieslak Programming 8 14-03-2007 20:29
Automous Code? Raikon Programming 5 29-01-2007 01:13
programming motors with programming kit BorisTheBlade FIRST Tech Challenge 4 01-11-2005 19:03
so lost we need help with automous evilhunter Programming 2 21-02-2005 13:54
2001 2002 in Automous SpaceOsc Control System 12 17-05-2004 01:52


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

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