|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Hey folks,
I did a windows search for some of the WPI library files and did not find them on my local hard drive. Where are the WPI library files hidden relative to WIndriver? I see the *.h files but not the *.cpp files. |
|
#2
|
||||
|
||||
|
Re: Location of WPI Library cpp files attached to Windriver
They do not come with it, they are pre-compiled. You can download the WPILib files off of the WPI site if you would like though.
|
|
#3
|
|||||
|
|||||
|
Re: Location of WPI Library cpp files attached to Windriver
Quote:
http://first.wpi.edu/FRC/frcupdates.html The direct link to the Update 3.0 source code is http://first.wpi.edu/Images/CMS/Firs...SourceCode.zip |
|
#4
|
||||
|
||||
|
Hey guy's thanks for info.
Part 2 now: I wanted to create my own version of TankDrive so I could have a rate-limited (RL) input for acceleration control (TankDriveRL) by comparing last loop value to present loop value. I began modifying TankDrive by copying/pasting to TankDriveRL within Robotdrive.h but couldn't really finish because I did have access to Robotdrive.cpp source code. What do you recommend to proceed? (I am new to C++ and Windriver development environments) 1) Figure out a way to modfy Robotdrive.cpp? (seems not possible) 2) Create new files(*.h, *.cpp) for TankDriveRL and make up new TankDriveRL class/method?. (most likely candidate). Last edited by marccenter : 09-02-2009 at 12:22. Reason: Screen editing |
|
#5
|
|||||
|
|||||
|
Re: Location of WPI Library cpp files attached to Windriver
Quote:
I'm not the right person to give detailed directions on exactly how to do that. Someone else with more C++ expertise than I do will have to help you further. |
|
#6
|
|||
|
|||
|
Re: Location of WPI Library cpp files attached to Windriver
Another good option for operations like this is to use a pipeline pattern. Our team created a class that inherits from SpeedController and takes another SpeedController as it's output. Inside this class's Set method, it procceses the input and passes the result to the output. This pattern allows you to create classes to perform operations such as rate limiting, traction control, velocity control, etc. to each act individually. You can then chain them together through the constructors as below.
Code:
float accelLimit = .03; SpeedController leftDriveMotor = new Jaguar(1); SpeedController leftAccelLimiter = new AccelerationLimiter (leftDriveMotor, accelLimit); SpeedController leftTractionControl = new TractionControl(leftAccelLimiter); SpeedController rightDriveMotor = new Jaguar(2); SpeedController rightAccelLimiter = new AccelerationLimiter (rightDriveMotor, accelLimit); SpeedController rightTractionControl = new TractionControl(rightAccelLimiter); m_robotDrive = new RobotDrive(leftTractionControl, rightTractionControl); |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Possible confusion between competition location and shipping location | rl1806 | General Forum | 2 | 07-02-2009 00:27 |
| Need Help Locating .h and .cpp files | jkjohnson | Programming | 0 | 30-01-2009 09:00 |
| downloading the WPI library off the SVN | nickmagus | Programming | 13 | 05-01-2009 14:29 |
| cRIO-FRC Training Video: WPI Library Overview | BLAQmx | National Instruments LabVIEW and Data Acquisition | 5 | 09-11-2008 19:58 |
| Where is WPI Library Information PDF? | koenig3456 | Programming | 2 | 15-01-2006 16:19 |