Embed: (wiki syntax)

« Back to documentation index

Controller Class Reference

Controller Class Reference

controller class More...

#include <Controller.h>

Public Member Functions

 Controller (PwmOut &pwm0, PwmOut &pwm1, PwmOut &pwm2, EncoderCounter &counter1, EncoderCounter &counter2, EncoderCounter &counter3, IMU &imu)
 Create and initialize a robot controller object.
virtual ~Controller ()
 Delete the robot controller object and release all allocated resources.
void setY (float y)
 Sets the actual y coordinate of the robots position.
float getX ()
 Gets the actual x coordinate of the robots position.
float getY ()
 Gets the actual y coordinate of the robots position.

Detailed Description

controller class

Definition at line 22 of file Controller.h.


Constructor & Destructor Documentation

Controller ( PwmOut &  pwm0,
PwmOut &  pwm1,
PwmOut &  pwm2,
EncoderCounter counter1,
EncoderCounter counter2,
EncoderCounter counter3,
IMU imu 
)

Create and initialize a robot controller object.

Parameters:
pwm0a pwm output object to set the duty cycle for the first motor.
pwm1a pwm output object to set the duty cycle for the second motor.
pwm2a pwm output object to set the duty cycle for the third motor.
counter1

Definition at line 34 of file Controller.cpp.

~Controller (  ) [virtual]

Delete the robot controller object and release all allocated resources.

Definition at line 84 of file Controller.cpp.


Member Function Documentation

float getX (  )

Gets the actual x coordinate of the robots position.

Returns:
the x coordinate of the position, given in [m].

Definition at line 158 of file Controller.cpp.

float getY (  )

Gets the actual y coordinate of the robots position.

Returns:
the y coordinate of the position, given in [m].

Definition at line 168 of file Controller.cpp.

void setY ( float  y )

Sets the actual y coordinate of the robots position.

Parameters:
ythe y coordinate of the position, given in [m].

Definition at line 134 of file Controller.cpp.