#include <controller.h>
Public Member Functions | |
| Controller (msg *daemon, std::ofstream &dataFile, const char *servo_serial_device) | |
| int | run (void) |
| Short Description. | |
| Controller (msg *daemon, const char *servo_serial_device) | |
| Short Description. | |
| int | run (void) |
| Controller (msg *daemon, const char *servo_serial_device) | |
| int | run (void) |
| Controller (msg *daemon, const char *servo_serial_device) | |
| int | run (void) |
Private Member Functions | |
| int | joyX (void) |
| Short Description. | |
| int | joyY (void) |
| Short Description. | |
| int | heartbeat (void) |
| int | stop (void) |
| Short Description. | |
| int | info (void) |
| Short Description. | |
| int | kill (void) |
| Short Description. | |
| int | gps (void) |
| Short Description. | |
| int | setPower (void) |
| Short Description. | |
| int | setPowerValue (void) |
| Short Description. | |
| int | setAngle (void) |
| Short Description. | |
| int | setAngleValue (void) |
| Short Description. | |
| int | processMsgs (void) |
| Short Description. | |
| void | sendAck (void) |
| Short Description. | |
| void | sendNack (void) |
| Short Description. | |
| float | calcAdjustedValue (float value, float &valueErr) |
| Allows setting "fractional" values by returns values that fluctuates proportially between two consecutive integers. | |
| int | joyX (void) |
| int | joyY (void) |
| int | heartbeat (void) |
| int | stop (void) |
| int | info (void) |
| int | kill (void) |
| int | gps (void) |
| int | gain (float &K) |
| Short Description. | |
| int | speed (void) |
| Short Description. | |
| int | processMsgs (void) |
| void | sendAck (void) |
| void | sendNack (void) |
| float | encSum (hwInterface &truck_hw) |
| Short Description. | |
| int | forward (void) |
| Increase power output of engine Servo. | |
| int | back (void) |
| Decrease power output of engine Servo. | |
| int | left (void) |
| Turn wheel to the left. | |
| int | right (void) |
| Turn wheel to the right. | |
| int | stop (void) |
| int | kill (void) |
| int | gps (void) |
| int | processMsgs (void) |
| void | sendAck (void) |
| void | sendNack (void) |
| int | processMsgs (void) |
| void | sendAck (void) |
| void | sendNack (void) |
Private Attributes | |
| hwInterface | hw |
| msg * | daemon |
| EncEstimator | est |
| std::ofstream & | f |
| int | verbose |
| bool | useAngleValue |
| float | angle |
| float | angleValue |
| float | angleValueErr |
| bool | usePowerValue |
| float | power |
| float | powerValue |
| float | powerValueErr |
| int | msecLeft |
| hwInterface | truck_hw |
| msg * | daemon |
| float | targetVeloc |
| float | veloc |
| float | Kp |
| float | Ki |
| float | Kd |
| float | errSum |
| int | cyclesLeft |
| msg * | daemon |
| int | quit |
| msg * | daemon |
| int | ack_count |
| FILE * | dataFile |
Long Description if necessary.
| <parameter_name> | <parameter_descreption> |
Definition at line 15 of file controller.h.
|
||||||||||||||||
|
|
|
||||||||||||
|
Short Description. Long Description if necessary.
Definition at line 14 of file controller.cpp. References angle, cyclesLeft, errSum, Kd, Ki, Kp, hwInterface::reset(), targetVeloc, truck_hw, veloc, and hwInterface::wait(). |
|
||||||||||||
|
|
|
||||||||||||
|
|
|
|
Decrease power output of engine Servo. Long Description if necessary.
Definition at line 111 of file controller.cpp. References msecLeft, power, POWER_DELTA, and sendAck(). |
|
||||||||||||
|
Allows setting "fractional" values by returns values that fluctuates proportially between two consecutive integers. For example if this function is called continously with input an input value of 100.5, half the time the return value will be 100 and the other half of the time the return value will be 101. Over multiple calls the output value should average out to be 101.5
Definition at line 433 of file controller.cpp. Referenced by run(). |
|
|
Short Description. Long Description if necessary.
Definition at line 355 of file controller.cpp. References hwInterface::BACK_LEFT, hwInterface::BACK_RIGHT, hwInterface::encTicks(), hwInterface::FRONT_LEFT, and hwInterface::FRONT_RIGHT. |
|
|
Increase power output of engine Servo. Long Description if necessary.
Definition at line 92 of file controller.cpp. References msecLeft, power, POWER_DELTA, and sendAck(). |
|
|
Short Description. Long Description if necessary.
Definition at line 163 of file controller.cpp. References daemon, endmsg, errSum, startmsg(), and msg::type(). |
|
|
|
|
|
|
|
|
Short Description. Long Description if necessary.
Definition at line 410 of file controller.cpp. Referenced by processMsgs(). |
|
|
|
|
|
|
|
|
|
|
|
Short Description. Long Description if necessary.
Definition at line 169 of file controller.cpp. References angle, endmsg, est, EstimatorBase::getAngle(), EstimatorBase::getXPos(), EstimatorBase::getYPos(), msg::moreArgs(), power, and startmsg(). Referenced by processMsgs(). |
|
|
|
|
|
Short Description. Long Description if necessary.
Definition at line 109 of file controller.cpp. References angle, endmsg, msg::moreArgs(), startmsg(), and msg::type(). Referenced by processMsgs(). |
|
|
|
|
|
Short Description. Long Description if necessary.
Definition at line 139 of file controller.cpp. References endmsg, msg::moreArgs(), power, startmsg(), and msg::type(). Referenced by processMsgs(). |
|
|
|
|
|
|
|
|
Short Description. Long Description if necessary.
Definition at line 229 of file controller.cpp. References angle, hw, power, quit, sendAck(), hwInterface::setAngle(), hwInterface::setSCPower(), hwInterface::wait(), and hwInterface::writeControl(). Referenced by processMsgs(). |
|
|
Turn wheel to the left. Move Servo to turn wheels left by incrementing the servo position by 5 units Motion to the left using setAngle is from 0 to +30
Definition at line 132 of file controller.cpp. References angle, ANGLE_DELTA, and sendAck(). |
|
|
|
|
|
|
|
|
|
|
|
Short Description. Long Description if necessary.
Definition at line 49 of file controller.cpp. References msg::dispatch(), msg::error(), gps(), info(), joyX(), joyY(), kill(), msecLeft, msg::recvNoWait(), sendNack(), setAngle(), setAngleValue(), setPower(), setPowerValue(), stop(), msg::type(), and verbose. Referenced by run(). |
|
|
Turn wheel to the right. Move Servo to turn wheels right by decrementing the servo position by 5 units Motion to the right using setAngle is from 0 to -30
Definition at line 152 of file controller.cpp. References angle, ANGLE_DELTA, and sendAck(). |
|
|
|
|
|
|
|
|
|
|
|
Short Description. Long Description if necessary.
Definition at line 452 of file controller.cpp. References angle, angleValue, angleValueErr, calcAdjustedValue(), hwInterface::encTicksBL(), hwInterface::encTicksBR(), hwInterface::encTicksFL(), hwInterface::encTicksFR(), est, f, hwInterface::getSteeringA2DValue(), hw, i, msecLeft, power, powerValue, powerValueErr, processMsgs(), quit, hwInterface::readStatus(), hwInterface::setAdjustedSCPower(), hwInterface::setAngle(), hwInterface::setSCPower(), hwInterface::setSCValue(), hwInterface::setSteeringValue(), EncEstimator::update(), useAngleValue, usePowerValue, hwInterface::wait(), and hwInterface::writeControl(). Referenced by main(). |
|
|
|
|
|
|
|
|
|
|
|
Short Description. Long Description if necessary.
Definition at line 380 of file controller.cpp. References endmsg, startmsg(), and msg::type(). Referenced by back(), forward(), kill(), left(), right(), and stop(). |
|
|
|
|
|
|
|
|
|
|
|
Short Description. Long Description if necessary.
Definition at line 395 of file controller.cpp. References endmsg, startmsg(), and msg::type(). Referenced by processMsgs(). |
|
|
Short Description. Long Description if necessary.
Definition at line 318 of file controller.cpp. References angle, endmsg, msg::moreArgs(), msecLeft, startmsg(), msg::type(), and useAngleValue. Referenced by processMsgs(). |
|
|
Short Description. Long Description if necessary.
Definition at line 349 of file controller.cpp. References angleValue, endmsg, msg::moreArgs(), msecLeft, startmsg(), msg::type(), and useAngleValue. Referenced by processMsgs(). |
|
|
Short Description. Long Description if necessary.
Definition at line 254 of file controller.cpp. References endmsg, msg::moreArgs(), msecLeft, power, startmsg(), msg::type(), and usePowerValue. Referenced by processMsgs(). |
|
|
Short Description. Long Description if necessary.
Definition at line 285 of file controller.cpp. References endmsg, msg::moreArgs(), msecLeft, powerValue, startmsg(), msg::type(), and usePowerValue. Referenced by processMsgs(). |
|
|
Short Description. Long Description if necessary.
Definition at line 280 of file controller.cpp. References cyclesLeft, daemon, endmsg, startmsg(), targetVeloc, and msg::type(). |
|
|
|
|
|
|
|
|
Short Description. Long Description if necessary.
Definition at line 211 of file controller.cpp. References power, and sendAck(). Referenced by processMsgs(). |
|
|
Definition at line 24 of file fcontroller.h. |
|
|
Definition at line 30 of file controller.h. Referenced by Controller(), info(), joyX(), kill(), left(), right(), run(), and setAngle(). |
|
|
Definition at line 31 of file controller.h. Referenced by run(), and setAngleValue(). |
|
|
Definition at line 32 of file controller.h. Referenced by run(). |
|
|
Definition at line 35 of file controller.h. Referenced by Controller(), and speed(). |
|
|
Definition at line 19 of file fcontroller.h. |
|
|
Definition at line 22 of file controller.h. |
|
|
Definition at line 25 of file controller.h. |
|
|
Definition at line 18 of file controller.h. |
|
|
Definition at line 25 of file fcontroller.h. |
|
|
Definition at line 31 of file controller.h. Referenced by Controller(), and gain(). |
|
|
Definition at line 20 of file controller.h. |
|
|
Definition at line 22 of file controller.h. Referenced by run(). |
|
|
Definition at line 17 of file controller.h. |
|
|
Definition at line 30 of file controller.h. Referenced by Controller(). |
|
|
Definition at line 30 of file controller.h. Referenced by Controller(). |
|
|
Definition at line 30 of file controller.h. Referenced by Controller(). |
|
|
Definition at line 43 of file controller.h. Referenced by back(), forward(), processMsgs(), run(), setAngle(), setAngleValue(), setPower(), and setPowerValue(). |
|
|
Definition at line 37 of file controller.h. Referenced by back(), forward(), info(), joyY(), kill(), run(), setPower(), and stop(). |
|
|
Definition at line 38 of file controller.h. Referenced by run(), and setPowerValue(). |
|
|
Definition at line 39 of file controller.h. Referenced by run(). |
|
|
Definition at line 26 of file controller.h. |
|
|
Definition at line 29 of file controller.h. Referenced by Controller(), and speed(). |
|
|
Definition at line 24 of file controller.h. Referenced by Controller(). |
|
|
Definition at line 29 of file controller.h. Referenced by run(), setAngle(), and setAngleValue(). |
|
|
Definition at line 36 of file controller.h. Referenced by run(), setPower(), and setPowerValue(). |
|
|
Definition at line 29 of file controller.h. Referenced by Controller(). |
|
|
Definition at line 24 of file controller.h. Referenced by processMsgs(). |
1.4.4