Rover API Documentation
rover::RoverDriving Class Reference

Contains the member functions to drive the rover using its motors. More...

#include <rover_driving.hpp>

Public Member Functions

 RoverDriving ()
 Constructor for RoverDriving class. More...
 
 ~RoverDriving ()
 Destructor for RoverDriving class. More...
 
void initialize ()
 Initializes RoverDriving features. More...
 
void stopRover ()
 Commands the rover to stop. More...
 
void setSpeed (const int speed_setpoint)
 Sets the speed. 360 -> Lowest speed (RoverDriving::LOWEST_SPEED), 480 -> Highest speed (RoverDriving::HIGHEST_SPEED) More...
 
int getSpeed (void)
 Retrieves the current speed setpoint. More...
 
void differentialDrive (const float angular_speed, const float linear_speed)
 Set the speed of the right and left wheels. More...
 
void goForward ()
 Commands the rover to go forward. More...
 
void goBackward ()
 Commands the rover to go backward. More...
 
void turnRight ()
 Commands the rover to turn right on its spot. More...
 
void turnLeft ()
 Commands the rover to turn left on its spot. More...
 
void turnForwardLeft ()
 Commands the rover to turn forward-left using only one motor. More...
 
void turnForwardRight ()
 Commands the rover to turn forward-right using only one motor. More...
 
void turnBackwardLeft ()
 Commands the rover to turn backward-left using only one motor. More...
 
void turnBackwardRight ()
 Commands the rover to turn backward-right using only one motor. More...
 

Private Attributes

int SPEED
 Speed for the rover movement. 360 -> Lowest speed (RoverDriving::LOWEST_SPEED), 480 -> Highest speed (RoverDriving::HIGHEST_SPEED). More...
 
int ROVERDRIVING_INIT_
 Flag to hold if RoverDriving is initialized. More...
 

Detailed Description

Contains the member functions to drive the rover using its motors.

Constructor & Destructor Documentation

rover::RoverDriving::RoverDriving ( )
explicit

Constructor for RoverDriving class.

rover::RoverDriving::~RoverDriving ( )

Destructor for RoverDriving class.

Member Function Documentation

void rover::RoverDriving::differentialDrive ( const float  angular_speed,
const float  linear_speed 
)

Set the speed of the right and left wheels.

int rover::RoverDriving::getSpeed ( void  )

Retrieves the current speed setpoint.

void rover::RoverDriving::goBackward ( void  )

Commands the rover to go backward.

void rover::RoverDriving::goForward ( void  )

Commands the rover to go forward.

void rover::RoverDriving::initialize ( void  )

Initializes RoverDriving features.

void rover::RoverDriving::setSpeed ( const int  speed_setpoint)

Sets the speed. 360 -> Lowest speed (RoverDriving::LOWEST_SPEED), 480 -> Highest speed (RoverDriving::HIGHEST_SPEED)

void rover::RoverDriving::stopRover ( void  )

Commands the rover to stop.

void rover::RoverDriving::turnBackwardLeft ( void  )

Commands the rover to turn backward-left using only one motor.

void rover::RoverDriving::turnBackwardRight ( void  )

Commands the rover to turn backward-right using only one motor.

void rover::RoverDriving::turnForwardLeft ( void  )

Commands the rover to turn forward-left using only one motor.

void rover::RoverDriving::turnForwardRight ( void  )

Commands the rover to turn forward-right using only one motor.

void rover::RoverDriving::turnLeft ( void  )

Commands the rover to turn left on its spot.

void rover::RoverDriving::turnRight ( void  )

Commands the rover to turn right on its spot.

Member Data Documentation

int rover::RoverDriving::ROVERDRIVING_INIT_
private

Flag to hold if RoverDriving is initialized.

int rover::RoverDriving::SPEED
private

Speed for the rover movement. 360 -> Lowest speed (RoverDriving::LOWEST_SPEED), 480 -> Highest speed (RoverDriving::HIGHEST_SPEED).


The documentation for this class was generated from the following files: