MIRA
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | List of all members
GenericRobotModel Class Referenceabstract

A generic robot model that allows to specify a wheel geometry for multi wheel robots with fixed or non-fixed castor wheels. More...

#include <robot/GenericRobotModel.h>

Inheritance diagram for GenericRobotModel:
Inheritance graph
[legend]

Public Types

typedef std::list< LinkPtrLinkList
 
typedef std::map< std::string, JointPtrJointMap
 
typedef std::map< std::string, MaterialPtrMaterialMap
 
typedef std::list< std::pair< GeometryPtr, RigidTransform3f >, Eigen::aligned_allocator< std::pair< GeometryPtr, RigidTransform3f > > > CollisionGeometries
 

Public Member Functions

template<typename Reflector >
void reflect (Reflector &r)
 
Velocity2 computeRobotVelocity (const Eigen::Matrix< float, Eigen::Dynamic, 2 > &castorWheelState)
 Computes the robots overall velocity from the readings of its wheels. More...
 
virtual Pose2 localKinematics (const Velocity2 &v, float dt) const
 Implementation of RobotModel. More...
 
virtual float predictStandstillDistance (const Velocity2 &v) const
 Implementation of RobotModel. More...
 
virtual float predictStandstillRotation (const Velocity2 &v) const
 Calculate the rotation that is needed for braking to stand still, if the robot moves with the specified velocity v. More...
 
virtual PoseVelocityTrajectory generateTrajectory (Velocity2 v, const Velocity2 &targetV, float lookAheadTime, int samples)
 Generates a trajectory by accelerating/decelerating starting at velocity v for lookAheadTime time up to the velocity targetV. More...
 
Pose2 globalKinematics (const Velocity2 &v, float dt, const Pose2 &p0) const
 Computes the movement of the robot if it moves with the specified velocity v for the specified time dt. More...
 
void reflect (XMLDeserializer &r)
 
void clear ()
 
std::string getRootLink () const
 
CollisionGeometries getCollisionGeometries (std::string targetFrame="", const Time &timestamp=Time::now(), const std::string &filter="") const
 
std::list< Box3fgetCollisionBoundingBoxes (std::string targetFrame="", const Time &timestamp=Time::now(), const std::string &filter="") const
 
Footprint getFootprint (std::string targetFrame="", const Time &timestamp=Time::now(), const std::string &filter="") const
 
void resolveAndPublishLinks (const std::string &ns, const Time &timestamp=Time::now())
 
void publishJoint (const std::string &name, float value, const Time &timestamp=Time::now()) const
 
Class const & getClass () const
 

Static Public Member Functions

static PseudoClass const & CLASS ()
 

Public Attributes

std::vector< Pose2wheelGeometry
 The position of each wheel relative to the robots base. More...
 
std::string name
 
LinkList links
 
JointMap joints
 
MaterialMap materials
 

Protected Member Functions

virtual Class const & internalGetClass () const=0
 

Detailed Description

A generic robot model that allows to specify a wheel geometry for multi wheel robots with fixed or non-fixed castor wheels.

For a special optimized implementation for robots with a differential drive please use DifferentialRobotModel.

Member Function Documentation

◆ reflect()

void reflect ( Reflector &  r)
inline

◆ computeRobotVelocity()

Velocity2 computeRobotVelocity ( const Eigen::Matrix< float, Eigen::Dynamic, 2 > &  castorWheelState)

Computes the robots overall velocity from the readings of its wheels.

Each row represents the state of a single wheel. First column contains the velocity of that wheel. Second column contains the orientation of that wheel. For castor wheels orientation will change while driving. For fixed wheels orientation will most likely be fixed.

◆ localKinematics()

virtual Pose2 localKinematics ( const Velocity2 v,
float  dt 
) const
virtual

Implementation of RobotModel.

Implements RobotModel.

◆ predictStandstillDistance()

virtual float predictStandstillDistance ( const Velocity2 v) const
virtual

Implementation of RobotModel.

Implements RobotModel.

◆ predictStandstillRotation()

virtual float predictStandstillRotation ( const Velocity2 v) const
virtual

Calculate the rotation that is needed for braking to stand still, if the robot moves with the specified velocity v.

Parameters
[in]vThe current velocity.
Returns
The estimated stopping rotation.

Implements RobotModel.

◆ generateTrajectory()

virtual PoseVelocityTrajectory generateTrajectory ( Velocity2  v,
const Velocity2 targetV,
float  lookAheadTime,
int  samples 
)
virtual

Generates a trajectory by accelerating/decelerating starting at velocity v for lookAheadTime time up to the velocity targetV.

The resulting trajectory will contain samples+1 trajectory samples starting at position 0,0 with velocity v. It uses the acceleration limits given in the robot model.

Implements RobotModel.

◆ globalKinematics()

Pose2 globalKinematics ( const Velocity2 v,
float  dt,
const Pose2 p0 
) const
inlineinherited

Computes the movement of the robot if it moves with the specified velocity v for the specified time dt.

The movement is returned as pose in relation to the specified pose p0.

Parameters
[in]vThe velocity of the robot.
[in]dtThe delta time.
[in]p0The original pose.
Returns
The movement as a pose in relative to pose p0.

Member Data Documentation

◆ wheelGeometry

std::vector<Pose2> wheelGeometry

The position of each wheel relative to the robots base.


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