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 c_entity.GetConfigurationNode()),
43 m_fCurrentWheelVelocity(m_cWheeledEntity.GetWheelVelocities()) {
48 cpMomentForCircle(EPUCK_MASS,
50 EPUCK_RADIUS + EPUCK_RADIUS,
53 ptBody->p = cpv(cPosition.
GetX(), cPosition.
GetY());
56 cpBodySetAngle(ptBody, cZAngle.GetValue());
60 cpCircleShapeNew(ptBody,
83 m_cDiffSteering.
Reset();
98 m_cDiffSteering.
Reset();
void AttachTo(cpBody *pt_body)
float Real
Collects all ARGoS code.
Real GetX() const
Returns the x coordinate of this vector.
Real GetY() const
Returns the y coordinate of this vector.
virtual void SetBody(cpBody *pt_body, Real f_height)
Sets the body and registers the default origin anchor method.
CQuaternion Orientation
The orientation of the anchor wrt the global coordinate system.
It defines the basic type CRadians, used to store an angle value in radians.
virtual ~CDynamics2DEPuckModel()
CDynamics2DEngine & GetDynamics2DEngine()
Returns the dynamics 2D engine state.
void ToEulerAngles(CRadians &c_z_angle, CRadians &c_y_angle, CRadians &c_x_angle) const
void SetWheelVelocity(Real f_left_wheel, Real f_right_wheel)
CEmbodiedEntity & GetEmbodiedEntity()
Returns the embodied entity associated to this physics model.
virtual void UpdateFromEntityStatus()
Updates the state of this model from the status of the associated entity.
Base class for object models with a single body.
CVector3 Position
The position of the anchor wrt the global coordinate system.
CDynamics2DEPuckModel(CDynamics2DEngine &c_engine, CEPuckEntity &c_entity)
The namespace containing all the ARGoS related code.
REGISTER_STANDARD_DYNAMICS2D_OPERATIONS_ON_ENTITY(CEPuckEntity, CDynamics2DEPuckModel)
const SAnchor & GetOriginAnchor() const
Returns a const reference to the origin anchor associated to this entity.