Go to Post People can talk a big game, but unless they start working on what they talk about, nothing will get done. - Lisa Perez [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rating: Thread Rating: 2 votes, 4.00 average. Display Modes
  #1   Spotlight this post!  
Unread 13-02-2011, 01:17
pacerobotics pacerobotics is offline
Registered User
FRC #3629
 
Join Date: Feb 2011
Location: Philadelphia
Posts: 6
pacerobotics will become famous soon enoughpacerobotics will become famous soon enough
Unhappy Sample code for Windriver needed (FRC)

Help Please!!!
Thanks
Reply With Quote
  #2   Spotlight this post!  
Unread 13-02-2011, 09:05
jwakeman jwakeman is offline
Registered User
FRC #0063 (Red Barons)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2010
Location: 16510
Posts: 182
jwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nicejwakeman is just really nice
Re: Sample code for Windriver needed (FRC)

In the workbench.

File->New->Project->Examples->VxWorks Downloadable Kernel Module Sample Project

Choose any example project that starts with "FRC".
Reply With Quote
  #3   Spotlight this post!  
Unread 13-02-2011, 17:56
pacerobotics pacerobotics is offline
Registered User
FRC #3629
 
Join Date: Feb 2011
Location: Philadelphia
Posts: 6
pacerobotics will become famous soon enoughpacerobotics will become famous soon enough
Re: Sample code for Windriver needed (FRC)

Thank you so much but it seams I don't have anything that has "FRC" in the beginning. Is there an update I have to download???? please help
Reply With Quote
  #4   Spotlight this post!  
Unread 13-02-2011, 19:09
pacerobotics pacerobotics is offline
Registered User
FRC #3629
 
Join Date: Feb 2011
Location: Philadelphia
Posts: 6
pacerobotics will become famous soon enoughpacerobotics will become famous soon enough
Re: Sample code for Windriver needed (FRC)

OK. We figured out where to get the update but all they all are for arcade drive or tank drive but we have a more complex wheel setup. We would really be amazingly better off if we could figure out how to simply receive values from several joysticks, label give the values to common variables, and know how to assign the variables to jaguars to make the motors move. It seems like a complex list but If someone could just post some code (even from yours, you can trust me I won't plagiarize) that would be great.
Reply With Quote
  #5   Spotlight this post!  
Unread 13-02-2011, 23:09
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: 671
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: Sample code for Windriver needed (FRC)

What kind of complex setup do you have? WPI library provides a lot of different drive configurations, tank drive, arcade drive, mecanum drive. You can look at the WPI source code in robotdrive.cpp (c:\WindRivier\WPILib). It shows you how they implemented all different drives. So it is your sample code if you want to write your own drive system.
__________________
Reply With Quote
  #6   Spotlight this post!  
Unread 17-02-2011, 00:15
garyk garyk is offline
Programming Mentor: 668, 972, 2643
FRC #0668 (Apes of Wrath)
Team Role: Mentor
 
Join Date: Dec 2006
Rookie Year: 2005
Location: Santa Clara (Silicon Valley) Calif.
Posts: 94
garyk is a jewel in the roughgaryk is a jewel in the roughgaryk is a jewel in the roughgaryk is a jewel in the rough
Re: Sample code for Windriver needed (FRC)

Quote:
Originally Posted by pacerobotics View Post
Help Please!!!
Thanks
I've posted a complete C++ program here: http://www.chiefdelphi.com/forums/sh...11#post1024111

It incl. arcade drive, I understand you want to write your own drive code. The code shows how to read (obtain) the values from a joystick and drive a Jaguar/Victor with that value. Joysticks give a value between 1.0 and -1.0, inclusive, in the X, Y, and Z axies. (The Z axis is the throttle thing at the base of the JS.)

Victors and Jaguars accept values -1.0 <= x <= 1.0. The direction of rotation is a function of how the motor is wired and the nature of the gearbox.

The algebra in between the JS and the Jaguar is up to you :-)

Whenever you change the drive code (incl. the first version) YOU MUST TEST WITH YOUR ROBOT ON BLOCKS with the wheels off the ground. There's a real risk of the motors being powered other than as you expect and the robot smashing into an object - I've seen it happen.
__________________

Silicon Valley Regional 2005, 2006 972
Silicon Valley Regional 2007 668 Xerox Creativity Award
Championship Event 2007 668
Portland Regional 2008 668
Silicon Valley Regional 2008 668, 972
Beta Test Team 2008 668 (with 100 & 254)
Silicon Valley Regional 2009 668 Regional Chairman's Award; 2643
Sacramento Regional 2009 668 Winning Alliance (thanks, 1717 & 2473!), 2010 Winning Alliance 3256
CalGames 2006, 2007, 2008, 2009, 2010, 2011 Field Tech
NorCal FTC Regional 2008, 2009 Inspector
Championship Event 2009
San Diego, Silicon Valley Regionals; Champ. Event 2010 668, 2643, 3256
Silicon Valley, Madera Regional 2012 2643
WRRF Programming Instructor 2006-2016
Regional Woodie Flowers Award 2014 2643 Utah Regional

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 03:06.

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