test program
Dependencies: LSM9DS1_Library2 MotorV2 SRF05 Tracker2 mbed nRF24L01P
Fork of DUMP_TRUCK_SPR2017 by
DumpTruck.h
- Committer:
- pvela
- Date:
- 2017-02-14
- Revision:
- 7:dd3a7dcc5c84
- Parent:
- 6:5cc6a9b6f60e
- Child:
- 8:9c94865bd087
File content as of revision 7:dd3a7dcc5c84:
/** * @file DumpTruck.h * * @brief DumpTruck class implements API for commanding the dump truck and * for implementing proprioceptive sensing. * * @author Terrabots Team * */ #ifndef MBED_DUMP_TRUCK_H #define MBED_DUMP_TRUCK_H #include "mbed.h" /** * @class DumpTruck * * @brief Implment interface for DumpTruck class. */ class DumpTruck { public: /** * Constructor for the DumpTruck object. * * @param[in] truckId Not sure. */ DumpTruck(int truckId); /** * Command the dump truck to drive with a desired sped for a specified * distance. * * @param[in] mSpeed The desired motor speed. * @param[in] dDist The desired driver distance. */ void drive(); // Drive DC motors with a desired motor speed and distance /** * Command the dump truck to stop. * */ void stop(); /** * Perform calibration routine. It will ... FILL OUT * */ void Calibrate(); /** * WHAT IS THIS ABOUT? * */ //void RotateTo(); /** * Move the bed to the fully down position. The down switch should * engage. * */ void BedDown(); /** * Move the bed to the fully up position. The up switch should * engage. * */ void BedUp(); /** * Raise the bed to the desired angle. Only effective if the bed angle * estimate has been zeroed out. * */ //void raiseTo(); /** * NOT SURE. HOW DIFFERENT FROM ABOVE? raiseTo should raise to any * arbitrary angle within limits. * */ //void LowerBed(); protected: int truckNumber; float speed; // desired speed to drive the robot, a number between -1 and 1 float distance; float getDistance(); // input of desired distance to be traveled float setTruckSpeed(); // set truck speed float setTruckDistance(); // set distance to be traveled //getBedAngle(); //Get data from Bed potentiometer, Hari is looking into the component for this //getPivotAngle(double PivotAngle); //Get data from potentiometer //SetPivotSpeed(double PivotSpeed); //Set arbitrary rotation of servo motor //SetBedSpeed(); //Set arbitrary rotation of DC Motor //bool GetBedUpperSwitch(); //Checks if bed is all the way up //bool GetBedLowerSwitch(); //Checks if bed is all the way down //bool SwitchState; //Switch state variable for Up and down bed functions //float DesiredPivotAngle; // User Input of desired angle for the bed to be pivoted //float DesiredBedAngle; //User Input of desired bed angle to be raised. //float BedSpeed; //User input of desired speed for the dump truck's bed to rotate //float PivotSpeed; //User input of desired speed for the dump truck to pivot its back at //bool isCalibrated;// returns 0 and 1 to check if the robot has been calibrated }; #endif