Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   C/C++ (http://www.chiefdelphi.com/forums/forumdisplay.php?f=183)
-   -   Sample code for Windriver needed (FRC) (http://www.chiefdelphi.com/forums/showthread.php?t=91688)

pacerobotics 13-02-2011 01:17

Sample code for Windriver needed (FRC)
 
Help Please!!!
Thanks

jwakeman 13-02-2011 09:05

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".

pacerobotics 13-02-2011 17:56

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

pacerobotics 13-02-2011 19:09

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.

mikets 13-02-2011 23:09

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.

garyk 17-02-2011 00:15

Re: Sample code for Windriver needed (FRC)
 
Quote:

Originally Posted by pacerobotics (Post 1021849)
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.


All times are GMT -5. The time now is 13:27.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi