MarXbot class The marXbot represent an marXbot robot. More...

Inheritance diagram for PhyMarXbot:

Public Member Functions

 PhyMarXbot (World *world, QString name, const wMatrix &tm=wMatrix::identity())
 Create a MarXbot.
 
virtual ~PhyMarXbot ()
 Destroy the MarXbot.
 
void doKinematicSimulation (bool k)
 Changes the robot model from dynamic to kinematic and vice-versa.
 
IRSensorControllergroundAroundIRSensorController ()
 return the ground IR sensors on the base (just above the wheels)
 
IRSensorControllergroundBottomIRSensorController ()
 returns the ground IR sensors below the battery pack
 
bool isKinematic () const
 Returns true if we are using the kinematic model.
 
virtual void postUpdate ()
 postUpdate the robot this method is called at each step of the world just after the physic update
 
virtual void preUpdate ()
 preUpdate the robot this method is called at each step of the world just before the physic update
 
IRSensorControllerproximityIRSensorController ()
 returns the proximity infrared sensors
 
void setGroundAroundIRSensorsGraphicalProperties (bool drawSensor, bool drawRay=false, bool drawRealRay=false)
 Sets whether ground around IR sensors are drawn or not and how.
 
void setGroundBottomIRSensorsGraphicalProperties (bool drawSensor, bool drawRay=false, bool drawRealRay=false)
 Sets whether ground bottom IR sensors are drawn or not and how.
 
void setProximityIRSensorsGraphicalProperties (bool drawSensor, bool drawRay=false, bool drawRealRay=false)
 Sets whether proximity IR sensors are drawn or not and how.
 
TractionSensorControllertractionSensorController ()
 return traction sensor of the robot
 
WheelMotorControllerwheelsController ()
 returns the motor controller for the wheels
 
- Public Member Functions inherited from WObject
 WObject (World *world, QString name="unamed", const wMatrix &tm=wMatrix::identity(), bool addToWorld=true)
 create the object and automatically put this into the world
 
virtual ~WObject ()
 destroy the Object and drop it from the world
 
QColor color () const
 return the color of this object
 
bool isInvisible ()
 return if it is invisible
 
const wMatrixmatrix () const
 return a reference to the transformation matrix
 
QString name () const
 Return the name of this object.
 
void setAlpha (int alpha)
 set the value of alpha channel (the transparency)
 
void setColor (QColor c)
 Set the color to use on rendering.
 
void setInvisible (bool b)
 set invisibility
 
void setMatrix (const wMatrix &newm)
 set a new matrix
 
void setPosition (const wVector &newpos)
 set the position specified in global coordinate frame
 
void setPosition (real x, real y, real z)
 set the position specified in global coordinate frame
 
void setTexture (QString textureName)
 Set the texture to use for this WObject when rendered.
 
void setUseColorTextureOfOwner (bool b)
 set if the object will be rendered with the color and texture of our owner (if we have one)
 
QString texture () const
 Return the texture name.
 
bool useColorTextureOfOwner () const
 if true, we will use color and texture of our owner (if we have one)
 
Worldworld ()
 Return the world.
 
const Worldworld () const
 Return the world (const version)
 
- Public Member Functions inherited from Ownable
 Ownable ()
 Constructor.
 
virtual ~Ownable ()
 Destructor.
 
const QList< Owned > & owned () const
 Returns the list of objects owned by this one.
 
Ownableowner () const
 Returns the owner of this object.
 
void setOwner (Ownable *owner, bool destroy=true)
 Sets the owner of this object.
 

Static Public Attributes

static const real attachringh = 0.0285f
 
static const real attachringm = 0.08f
 
static const real axledistance = 0.104f
 
static const real basem = 0.4f
 
static const real basex = 0.034f
 
static const real basey = 0.143f
 
static const real basez = 0.048f
 
static const real bodyh = 0.0055f
 
static const real bodym = 0.02f
 
static const real bodyr = 0.085f
 
static const real ledsh = 0.010f
 
static const real ledsm = 0.03f
 
static const real ledsradius = 0.080f
 
static const real trackheight = 0.0295f
 
static const real trackm = 0.05f
 
static const real trackradius = 0.022f
 
static const real treaddepth = 0.004f
 
static const real wheelh = 0.0215f
 
static const real wheelm = 0.02f
 
static const real wheelr = 0.027f
 

Protected Slots

void setLeftWheelDesideredVelocity (real velocity)
 Sets the desidered velocity of the left wheel.
 
void setRightWheelDesideredVelocity (real velocity)
 Sets the desidered velocity of the right wheel.
 

Protected Member Functions

virtual void changedMatrix ()
 update the matrix of all sub-objects
 

Additional Inherited Members

- Public Types inherited from Ownable
typedef QList< OwnedOwnedList
 The type for the list of owned objects.
 
- Protected Attributes inherited from WObject
QColor colorv
 Color, it contains also alpha channel.
 
bool invisible
 if TRUE it will not renderized
 
QString namev
 Name of the WObject.
 
QString texturev
 Texture name.
 
wMatrix tm
 Trasformation matrix.
 
bool usecolortextureofowner
 if true, we will use color and texture of our owner (if we have one).
 
Worldworldv
 World.
 

Detailed Description

MarXbot class The marXbot represent an marXbot robot.

See http://mobots.epfl.ch/marxbot.html

Definition at line 333 of file phymarxbot.h.

Constructor & Destructor Documentation

~PhyMarXbot ( )
virtual

Destroy the MarXbot.

Definition at line 778 of file phymarxbot.cpp.

Member Function Documentation

void changedMatrix ( )
protectedvirtual

update the matrix of all sub-objects

Reimplemented from WObject.

Definition at line 891 of file phymarxbot.cpp.

References WObject::matrix(), WObject::setMatrix(), WObject::tm, PhyFixed::updateJointInfo(), and PhyJoint::updateJointInfo().

void doKinematicSimulation ( bool  k)

Changes the robot model from dynamic to kinematic and vice-versa.

Parameters
kif true switches to the kinematic MarXbot model, if false to the dynamic one (at creation the model is always dynamic)

Definition at line 843 of file phymarxbot.cpp.

References PhyJoint::enable(), PhyObject::setKinematic(), and PhyFixed::updateJointInfo().

IRSensorController* groundAroundIRSensorController ( )
inline

return the ground IR sensors on the base (just above the wheels)

Definition at line 393 of file phymarxbot.h.

IRSensorController* groundBottomIRSensorController ( )
inline

returns the ground IR sensors below the battery pack

Definition at line 389 of file phymarxbot.h.

bool isKinematic ( ) const
inline

Returns true if we are using the kinematic model.

Definition at line 428 of file phymarxbot.h.

void postUpdate ( )
virtual

postUpdate the robot this method is called at each step of the world just after the physic update

Reimplemented from WObject.

Definition at line 811 of file phymarxbot.cpp.

References SensorController::isEnabled(), WObject::matrix(), WObject::tm, SimulatedIRProximitySensorController::update(), and SimulatedIRGroundSensorController::update().

void preUpdate ( )
virtual

preUpdate the robot this method is called at each step of the world just before the physic update

Reimplemented from WObject.

Definition at line 794 of file phymarxbot.cpp.

References MotorController::isEnabled(), WObject::matrix(), WObject::setMatrix(), WheelMotorController::update(), and WObject::world().

IRSensorController* proximityIRSensorController ( )
inline

returns the proximity infrared sensors

Definition at line 385 of file phymarxbot.h.

void setGroundAroundIRSensorsGraphicalProperties ( bool  drawSensor,
bool  drawRay = false,
bool  drawRealRay = false 
)

Sets whether ground around IR sensors are drawn or not and how.

Definition at line 838 of file phymarxbot.cpp.

References SimulatedIRGroundSensorController::setGraphicalProperties().

void setGroundBottomIRSensorsGraphicalProperties ( bool  drawSensor,
bool  drawRay = false,
bool  drawRealRay = false 
)

Sets whether ground bottom IR sensors are drawn or not and how.

Definition at line 833 of file phymarxbot.cpp.

References SimulatedIRGroundSensorController::setGraphicalProperties().

void setLeftWheelDesideredVelocity ( real  velocity)
protectedslot

Sets the desidered velocity of the left wheel.

This is used when in kinematic to move the robot. We only use velocity because robots can only move by setting wheel velocities

Parameters
velocitythe desidered velocity (in radiants per second)

Definition at line 881 of file phymarxbot.cpp.

Referenced by PhyMarXbot::PhyMarXbot().

void setProximityIRSensorsGraphicalProperties ( bool  drawSensor,
bool  drawRay = false,
bool  drawRealRay = false 
)

Sets whether proximity IR sensors are drawn or not and how.

Definition at line 828 of file phymarxbot.cpp.

References SimulatedIRProximitySensorController::setGraphicalProperties().

void setRightWheelDesideredVelocity ( real  velocity)
protectedslot

Sets the desidered velocity of the right wheel.

This is used when in kinematic to move the robot. We only use velocity because robots can only move by setting wheel velocities

Parameters
velocitythe desidered velocity (in radiants per second)

Definition at line 886 of file phymarxbot.cpp.

Referenced by PhyMarXbot::PhyMarXbot().

TractionSensorController* tractionSensorController ( )
inline

return traction sensor of the robot

Definition at line 397 of file phymarxbot.h.

WheelMotorController* wheelsController ( )
inline

returns the motor controller for the wheels

Definition at line 381 of file phymarxbot.h.


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