Skip to content

Commit

Permalink
fixes at InsideTrack.h and Stuck.h
Browse files Browse the repository at this point in the history
  • Loading branch information
Crestani committed Jul 2, 2015
1 parent a671740 commit cfab597
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
5 changes: 3 additions & 2 deletions include/FSM/InsideTrack.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,10 @@ class InsideTrack : public DrivingState {
*@return a normalized value
*/
float normalizeSteer(float angle);
/** getSteer obtain steer value checking first if the driven is at the right direction, if not the steer is calculated using angle value, case not using the distance(highest track sensor value)
/** getSteer obtain steer value checking first if the driven is at the right direction, if not the steer is
*calculated using angle value, case not using the distance(highest track sensor value)
*@param angle a data from the car's sensor angle.
*@return a normalized value
*@return a normalized steer value
*/
float getSteer(CarState &cs);
};
Expand Down
15 changes: 10 additions & 5 deletions include/FSM/Stuck.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ class Stuck : public DrivingState {
*
* Call setParameters
*
* @param ss (stuck speed), mrd (minimum distance raced), mst (maximum number of_ticks stuck), msst (maximum number of ticks in slow speed), see description bellow.
* @param ss (stuck speed), mrd (minimum distance raced), mst (maximum number of_ticks stuck),
* msst (maximum number of ticks in slow speed), see description bellow.
*/
Stuck(float ss = 5.0, int mrd = 100, int mst = 300, int msst = 50);

Expand All @@ -47,7 +48,8 @@ class Stuck : public DrivingState {
* @return true if the controller is stuck, false otherwise. */
bool isStuck(CarState &cs);
/** Initialize stuck parameters with ss, mrd, mst and msst
* @param ss (stuck speed), mrd (minimum distance raced), mst (maximum number of_ticks stuck), msst (maximum number of ticks in slow speed), see description bellow.
* @param ss (stuck speed), mrd (minimum distance raced), mst (maximum number of_ticks stuck),
* msst (maximum number of ticks in slow speed), see description bellow.
*/
void setParameters(float ss, int mrd, int mst, int msst);

Expand All @@ -61,7 +63,8 @@ class Stuck : public DrivingState {
/** maximum_number_of_ticks_stuck determine the total time (by ticks) that stuck state can work without change to another state
*/
unsigned int maximum_number_of_ticks_stuck;
/** maximum_number_of_ticks_in_slow_slow_speed is the value of ticks that the pilot can be bellow the stuck_speed to determine if is stuck or not
/** maximum_number_of_ticks_in_slow_speed is the value of ticks that the pilot can be bellow
*the stuck_speed to determine if is stuck or not
*/
unsigned int maximum_number_of_ticks_in_slow_speed;

Expand All @@ -81,11 +84,13 @@ class Stuck : public DrivingState {
*/
bool onRightWay(float trackPos, float angle);
/** Based on the car's speed and stuck_speed this function determine if the car is stuck or not
* @param track_pos is the sensor value that measure the distance of the car to the tracks borders, angle is the sensors value of the angle between the car direction and race direction.
* @param track_pos is the sensor value that measure the distance of the car to the tracks borders, angle
* is the sensors value of the angle between the car direction and race direction.
* @return true if the car is not stuck anymore or false if it is
*/
bool notStuckAnymore(CarState &cs);
/** Since the driver can not be stuck for a long time without goint back the track, a time limit is used, this check if the stuck state surpass that limit
/** Since the driver can not be stuck for a long time without goint back the track, a time limit is used,
*this check if the stuck state surpass that limit
* @param cs the driver's perception of the environment.
* @return true if the driver pass the time limit or false if not
*/
Expand Down

0 comments on commit cfab597

Please sign in to comment.