ARGoS
3
A parallel, multi-engine simulator for swarm robotics
|
Go to the documentation of this file.
8 #include <argos3/plugins/simulator/physics_engines/dynamics2d/dynamics2d_gripping.h>
9 #include <argos3/plugins/simulator/physics_engines/dynamics2d/dynamics2d_engine.h>
16 static const Real EPUCK_MASS = 0.4f;
18 static const Real EPUCK_RADIUS = 0.035f;
19 static const Real EPUCK_INTERWHEEL_DISTANCE = 0.053f;
20 static const Real EPUCK_HEIGHT = 0.086f;
22 static const Real EPUCK_MAX_FORCE = 1.5f;
23 static const Real EPUCK_MAX_TORQUE = 1.5f;
36 m_cEPuckEntity(c_entity),
37 m_cWheeledEntity(m_cEPuckEntity.GetWheeledEntity()),
38 m_cDiffSteering(c_engine,
41 EPUCK_INTERWHEEL_DISTANCE),
42 m_fCurrentWheelVelocity(m_cWheeledEntity.GetWheelVelocities()) {
47 cpMomentForCircle(EPUCK_MASS,
49 EPUCK_RADIUS + EPUCK_RADIUS,
52 ptBody->p = cpv(cPosition.
GetX(), cPosition.
GetY());
55 cpBodySetAngle(ptBody, cZAngle.
GetValue());
59 cpCircleShapeNew(ptBody,
82 m_cDiffSteering.
Reset();
97 m_cDiffSteering.
Reset();
const SAnchor & GetOriginAnchor() const
Returns a const reference to the origin anchor associated to this entity.
CQuaternion Orientation
The orientation of the anchor wrt the global coordinate system.
The namespace containing all the ARGoS related code.
CDynamics2DEngine & GetDynamics2DEngine()
Returns the dynamics 2D engine state.
It defines the basic type CRadians, used to store an angle value in radians.
Base class for object models with a single body.
virtual void UpdateFromEntityStatus()
Updates the state of this model from the status of the associated entity.
REGISTER_STANDARD_DYNAMICS2D_OPERATIONS_ON_ENTITY(CEPuckEntity, CDynamics2DEPuckModel)
Real GetX() const
Returns the x coordinate of this vector.
Real GetValue() const
Returns the value in radians.
void ToEulerAngles(CRadians &c_z_angle, CRadians &c_y_angle, CRadians &c_x_angle) const
virtual void SetBody(cpBody *pt_body, Real f_height)
Sets the body and registers the default origin anchor method.
virtual ~CDynamics2DEPuckModel()
CDynamics2DEPuckModel(CDynamics2DEngine &c_engine, CEPuckEntity &c_entity)
Real GetY() const
Returns the y coordinate of this vector.
CVector3 Position
The position of the anchor wrt the global coordinate system.
float Real
Collects all ARGoS code.
void SetWheelVelocity(Real f_left_wheel, Real f_right_wheel)
CEmbodiedEntity & GetEmbodiedEntity()
Returns the embodied entity associated to this physics model.
void AttachTo(cpBody *pt_body)