#include <WebotsDiffDrive.h>
Public Member Functions | |
WebotsDiffDrive (int argc, const char *argv[]) | |
Default constructor. | |
~WebotsDiffDrive () | |
Destructor. | |
void | setWheelCommands (Decimal leftAngVel, Decimal rightAngVel) |
Sets the angular velocities of the left and right wheels. | |
DiffDriveEncoderReading | getEncoders () |
Gets the DiffDriveEncoderReading of the encoders of the left and right wheels. | |
void | resetEncoders () |
Sets to 0 the encoders of the left and right wheels. | |
int | simulStep (int) |
Performs a simulation step. | |
void | _startSimu (unsigned int num) |
Starts the simulation. | |
void | _stopSimu () |
Stops the simulation. | |
void | initWebotsDiffDrive () |
Protected Attributes | |
WebotsDiffDrivePar * | _weboPar |
WebotsDiffDriveVar * | _weboVar |
WebotsKoremotPar * | _weKmPar |
Thread | _simuStepThread |
Manages the simulation steps. | |
pthread_mutex_t | _simuStepMutex |
MipResources::WebotsDiffDrive::WebotsDiffDrive | ( | int | argc, | |
const char * | argv[] | |||
) |
Default constructor.
argc | Argc. | |
argv | Argv. |
MipResources::WebotsDiffDrive::~WebotsDiffDrive | ( | ) |
Destructor.
void MipResources::WebotsDiffDrive::setWheelCommands | ( | Decimal | leftAngVel, | |
Decimal | rightAngVel | |||
) | [virtual] |
Sets the angular velocities of the left and right wheels.
leftAngVel | Angular velocity to drive the left wheel. | |
rightAngVel | Angular velocity to drive the right wheel. |
Implements MipResources::DiffDrive.
DiffDriveEncoderReading MipResources::WebotsDiffDrive::getEncoders | ( | ) | [virtual] |
Gets the DiffDriveEncoderReading of the encoders of the left and right wheels.
Implements MipResources::DiffDrive.
void MipResources::WebotsDiffDrive::resetEncoders | ( | ) |
Sets to 0 the encoders of the left and right wheels.
int MipResources::WebotsDiffDrive::simulStep | ( | int | stepTime | ) |
Performs a simulation step.
void MipResources::WebotsDiffDrive::_startSimu | ( | unsigned int | num | ) | [inline] |
Starts the simulation.
num | number of scan to perform, (0 means unbounded) |
void MipResources::WebotsDiffDrive::_stopSimu | ( | ) | [inline] |
Stops the simulation.
void MipResources::WebotsDiffDrive::initWebotsDiffDrive | ( | ) |
Parameters, implemented class.
Variables, implemented class.
WebotsKoremotPar* MipResources::WebotsDiffDrive::_weKmPar [protected] |
Thread MipResources::WebotsDiffDrive::_simuStepThread [protected] |
Manages the simulation steps.
pthread_mutex_t MipResources::WebotsDiffDrive::_simuStepMutex [protected] |