MipResources::WebotsDiffDrive Class Reference
[Motion module]

Represents a Webots differential drive. More...

#include <WebotsDiffDrive.h>

Inheritance diagram for MipResources::WebotsDiffDrive:

MipResources::DiffDrive MipResources::Unicycle MipResources::MotionModule MipResources::Resource MIPObject MipResources::WebotsKoremot

List of all members.

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


Detailed Description

Represents a Webots differential drive.

Author:
Antonio Franchi

Constructor & Destructor Documentation

MipResources::WebotsDiffDrive::WebotsDiffDrive ( int  argc,
const char *  argv[] 
)

Default constructor.

Parameters:
argc Argc.
argv Argv.

MipResources::WebotsDiffDrive::~WebotsDiffDrive (  ) 

Destructor.


Member Function Documentation

void MipResources::WebotsDiffDrive::setWheelCommands ( Decimal  leftAngVel,
Decimal  rightAngVel 
) [virtual]

Sets the angular velocities of the left and right wheels.

Parameters:
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.

Returns:
DiffDriveEncoderReading.

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.

Parameters:
num number of scan to perform, (0 means unbounded)

void MipResources::WebotsDiffDrive::_stopSimu (  )  [inline]

Stops the simulation.

void MipResources::WebotsDiffDrive::initWebotsDiffDrive (  ) 

Todo:
Understand the real meaning of the parameter of enableEncoders.


Member Data Documentation

Parameters, implemented class.

Variables, implemented class.

Manages the simulation steps.

pthread_mutex_t MipResources::WebotsDiffDrive::_simuStepMutex [protected]


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

Generated on Mon Feb 20 07:01:13 2017 for MIP by  doxygen 1.5.6