ARGoS  3
A parallel, multi-engine simulator for swarm robotics
dynamics2d_footbot_model.cpp
Go to the documentation of this file.
1 
9 #include <argos3/plugins/simulator/physics_engines/dynamics2d/dynamics2d_gripping.h>
10 #include <argos3/plugins/simulator/physics_engines/dynamics2d/dynamics2d_engine.h>
11 
12 namespace argos {
13 
14  /****************************************/
15  /****************************************/
16 
17  /* P and D constants of the PD controller used for the turret position control. */
18  static const Real PD_P_CONSTANT = 0.4;
19  static const Real PD_D_CONSTANT = 0.2;
20 
21  static const Real FOOTBOT_RADIUS = 0.085036758f;
22  static const Real FOOTBOT_INTERWHEEL_DISTANCE = 0.14f;
23  static const Real FOOTBOT_HEIGHT = 0.146899733f;
24 
25  static const Real FOOTBOT_MAX_FORCE = 15.f;
26  static const Real FOOTBOT_MAX_TORQUE = 150.f;
27 
31  };
32 
33  enum ETurretModes {
38  };
39 
40  /****************************************/
41  /****************************************/
42 
44  CFootBotEntity& c_entity) :
45  CDynamics2DMultiBodyObjectModel(c_engine, c_entity),
46  m_cFootBotEntity(c_entity),
47  m_cWheeledEntity(m_cFootBotEntity.GetWheeledEntity()),
48  m_cGripperEntity(c_entity.GetGripperEquippedEntity()),
49  m_cDiffSteering(c_engine,
50  FOOTBOT_MAX_FORCE,
51  FOOTBOT_MAX_TORQUE,
52  FOOTBOT_INTERWHEEL_DISTANCE),
53  m_pcGripper(NULL),
54  m_pcGrippable(NULL),
55  m_fMass(1.6f),
56  m_fCurrentWheelVelocity(m_cWheeledEntity.GetWheelVelocities()),
57  m_unLastTurretMode(m_cFootBotEntity.GetTurretEntity().GetMode()) {
58  RegisterAnchorMethod<CDynamics2DFootBotModel>(
59  GetEmbodiedEntity().GetOriginAnchor(),
61  RegisterAnchorMethod<CDynamics2DFootBotModel>(
62  GetEmbodiedEntity().GetAnchor("turret"),
64  RegisterAnchorMethod<CDynamics2DFootBotModel>(
65  GetEmbodiedEntity().GetAnchor("perspective_camera"),
67  /* Create the actual body with initial position and orientation */
68  m_ptActualBaseBody =
69  cpSpaceAddBody(GetDynamics2DEngine().GetPhysicsSpace(),
70  cpBodyNew(m_fMass,
71  cpMomentForCircle(m_fMass,
72  0.0f,
73  FOOTBOT_RADIUS + FOOTBOT_RADIUS,
74  cpvzero)));
75  const CVector3& cPosition = GetEmbodiedEntity().GetOriginAnchor().Position;
76  m_ptActualBaseBody->p = cpv(cPosition.GetX(), cPosition.GetY());
77  CRadians cXAngle, cYAngle, cZAngle;
78  GetEmbodiedEntity().GetOriginAnchor().Orientation.ToEulerAngles(cZAngle, cYAngle, cXAngle);
79  cpBodySetAngle(m_ptActualBaseBody, cZAngle.GetValue());
80  /* Create the actual body shape */
81  m_ptBaseShape =
82  cpSpaceAddShape(GetDynamics2DEngine().GetPhysicsSpace(),
83  cpCircleShapeNew(m_ptActualBaseBody,
84  FOOTBOT_RADIUS,
85  cpvzero));
86  m_ptBaseShape->e = 0.0; // No elasticity
87  m_ptBaseShape->u = 0.7; // Lots of friction
88  /* This shape is grippable */
89  m_pcGrippable = new CDynamics2DGrippable(GetEmbodiedEntity(),
90  m_ptBaseShape);
91  /* Constrain the actual base body to follow the diff steering control */
92  m_cDiffSteering.AttachTo(m_ptActualBaseBody);
93  /* Add the body so that the default methods work as expected */
94  AddBody(m_ptActualBaseBody, cpvzero, 0, FOOTBOT_HEIGHT);
95  /* Create the gripper body */
96  m_ptActualGripperBody =
97  cpSpaceAddBody(GetDynamics2DEngine().GetPhysicsSpace(),
98  cpBodyNew(m_fMass / 20.0,
99  cpMomentForCircle(m_fMass,
100  0.0f,
101  FOOTBOT_RADIUS + FOOTBOT_RADIUS,
102  cpvzero)));
103  m_ptActualGripperBody->p = cpv(cPosition.GetX(), cPosition.GetY());
104  cpBodySetAngle(m_ptActualGripperBody,
105  cZAngle.GetValue() +
106  m_cFootBotEntity.GetTurretEntity().GetRotation().GetValue());
107  /* Create the gripper shape */
108  cpShape* ptGripperShape =
109  cpSpaceAddShape(GetDynamics2DEngine().GetPhysicsSpace(),
110  cpCircleShapeNew(m_ptActualGripperBody,
111  0.01f,
112  cpv(FOOTBOT_RADIUS, 0.0f)));
113  m_pcGripper = new CDynamics2DGripper(GetDynamics2DEngine(),
114  m_cGripperEntity,
115  ptGripperShape);
116  /* Constrain the actual gripper body to follow the actual base body */
117  m_ptBaseGripperLinearMotion =
118  cpSpaceAddConstraint(GetDynamics2DEngine().GetPhysicsSpace(),
119  cpPivotJointNew2(m_ptActualBaseBody,
120  m_ptActualGripperBody,
121  cpvzero,
122  cpvzero));
123  m_ptBaseGripperAngularMotion = cpSpaceAddConstraint(GetDynamics2DEngine().GetPhysicsSpace(),
124  cpGearJointNew(m_ptActualBaseBody,
125  m_ptActualGripperBody,
126  0.0f,
127  1.0f));
128  m_ptBaseGripperAngularMotion->maxBias = 0.0f; /* disable joint correction */
129  m_ptBaseGripperAngularMotion->maxForce = FOOTBOT_MAX_TORQUE; /* limit the dragging torque */
130  /* Add the gripper body so that the default methods work as expected */
131  AddBody(m_ptActualGripperBody, cpvzero, 0, FOOTBOT_HEIGHT);
132  /* Switch to active mode if necessary */
133  if(m_unLastTurretMode == MODE_SPEED_CONTROL ||
134  m_unLastTurretMode == MODE_POSITION_CONTROL) {
135  TurretActiveToPassive();
136  }
137  }
138 
139  /****************************************/
140  /****************************************/
141 
143  delete m_pcGripper;
144  delete m_pcGrippable;
145  switch(m_unLastTurretMode) {
146  case MODE_OFF:
147  case MODE_PASSIVE:
148  cpSpaceRemoveConstraint(GetDynamics2DEngine().GetPhysicsSpace(), m_ptBaseGripperLinearMotion);
149  cpSpaceRemoveConstraint(GetDynamics2DEngine().GetPhysicsSpace(), m_ptBaseGripperAngularMotion);
150  cpConstraintFree(m_ptBaseGripperLinearMotion);
151  cpConstraintFree(m_ptBaseGripperAngularMotion);
152  break;
154  case MODE_SPEED_CONTROL:
155  cpSpaceRemoveConstraint(GetDynamics2DEngine().GetPhysicsSpace(), m_ptBaseGripperLinearMotion);
156  cpSpaceRemoveConstraint(GetDynamics2DEngine().GetPhysicsSpace(), m_ptGripperControlAngularMotion);
157  cpConstraintFree(m_ptBaseGripperLinearMotion);
158  cpConstraintFree(m_ptGripperControlAngularMotion);
159  cpBodyFree(m_ptControlGripperBody);
160  break;
161  }
162  m_cDiffSteering.Detach();
163  }
164 
165  /****************************************/
166  /****************************************/
167 
169  const CQuaternion& c_orientation) {
170  /* Release grippers and grippees */
171  m_pcGripper->Release();
172  m_pcGrippable->ReleaseAll();
173  /* Move robot */
175  c_orientation);
176  }
177 
178  /****************************************/
179  /****************************************/
180 
182  /* Zero speed and applied forces of base control body */
183  m_cDiffSteering.Reset();
184  /* Release grippers and gripees */
185  m_pcGripper->Release();
186  m_pcGrippable->ReleaseAll();
187  /* Switch to turret passive mode if needed */
188  if(m_unLastTurretMode == MODE_SPEED_CONTROL ||
189  m_unLastTurretMode == MODE_POSITION_CONTROL) {
190  TurretActiveToPassive();
191  m_unLastTurretMode = MODE_OFF;
192  GetEmbodiedEntity().DisableAnchor("turret");
193  }
194  /* Reset the rest */
196  }
197 
198  /****************************************/
199  /****************************************/
200 
202  GetBoundingBox().MinCorner.SetX(m_ptBaseShape->bb.l);
203  GetBoundingBox().MinCorner.SetY(m_ptBaseShape->bb.b);
204  GetBoundingBox().MinCorner.SetZ(GetDynamics2DEngine().GetElevation());
205  GetBoundingBox().MaxCorner.SetX(m_ptBaseShape->bb.r);
206  GetBoundingBox().MaxCorner.SetY(m_ptBaseShape->bb.t);
207  GetBoundingBox().MaxCorner.SetZ(GetDynamics2DEngine().GetElevation() + FOOTBOT_HEIGHT);
208  }
209 
210  /****************************************/
211  /****************************************/
212 
214  /* Do we want to move? */
215  if((m_fCurrentWheelVelocity[FOOTBOT_LEFT_WHEEL] != 0.0f) ||
216  (m_fCurrentWheelVelocity[FOOTBOT_RIGHT_WHEEL] != 0.0f)) {
217  m_cDiffSteering.SetWheelVelocity(m_fCurrentWheelVelocity[FOOTBOT_LEFT_WHEEL],
218  m_fCurrentWheelVelocity[FOOTBOT_RIGHT_WHEEL]);
219  }
220  else {
221  /* No, we don't want to move - zero all speeds */
222  m_cDiffSteering.Reset();
223  }
224  /* Update turret structures if the state changed state in the last step */
225  if(m_cFootBotEntity.GetTurretEntity().GetMode() != m_unLastTurretMode) {
226  /* Enable or disable the anchor */
227  if(m_cFootBotEntity.GetTurretEntity().GetMode() != MODE_OFF) {
228  GetEmbodiedEntity().EnableAnchor("turret");
229  }
230  else {
231  GetEmbodiedEntity().DisableAnchor("turret");
232  }
233  /* Manage the thing like a state machine */
234  switch(m_unLastTurretMode) {
235  case MODE_OFF:
236  case MODE_PASSIVE:
237  switch(m_cFootBotEntity.GetTurretEntity().GetMode()) {
239  case MODE_SPEED_CONTROL:
240  TurretPassiveToActive();
241  break;
242  case MODE_OFF:
243  case MODE_PASSIVE:
244  break;
245  }
246  break;
247  case MODE_SPEED_CONTROL:
249  switch(m_cFootBotEntity.GetTurretEntity().GetMode()) {
250  case MODE_OFF:
251  case MODE_PASSIVE:
252  TurretActiveToPassive();
253  break;
255  case MODE_SPEED_CONTROL:
256  break;
257  }
258  break;
259  }
260  /* Save the current mode for the next time step */
261  m_unLastTurretMode = m_cFootBotEntity.GetTurretEntity().GetMode();
262  }
263  /* Update the turret data */
264  switch(m_unLastTurretMode) {
265  /* Position control mode is implemented using a PD controller */
266  case MODE_POSITION_CONTROL: {
267  Real fCurRotErr = NormalizedDifference(
268  m_cFootBotEntity.GetTurretEntity().GetDesiredRotation(),
270  CRadians(m_ptActualGripperBody->a),
271  CRadians(m_ptActualBaseBody->a))).GetValue();
272  m_ptControlGripperBody->w =
273  m_cDiffSteering.GetAngularVelocity() +
274  (PD_P_CONSTANT * fCurRotErr +
275  PD_D_CONSTANT * (fCurRotErr - m_fPreviousTurretAngleError) * GetDynamics2DEngine().GetInverseSimulationClockTick());
276  m_fPreviousTurretAngleError = fCurRotErr;
277  break;
278  }
279  case MODE_SPEED_CONTROL:
280  m_ptControlGripperBody->w =
281  m_cDiffSteering.GetAngularVelocity() +
282  m_cFootBotEntity.GetTurretEntity().GetDesiredRotationSpeed();
283  break;
284  case MODE_OFF:
285  case MODE_PASSIVE:
286  if(m_cGripperEntity.IsGripping() &&
287  m_cGripperEntity.IsLocked()) {
288  m_ptBaseGripperAngularMotion->maxForce = 0.0001f; /* limit the dragging torque */
289  }
290  else {
291  m_ptBaseGripperAngularMotion->maxForce = FOOTBOT_MAX_TORQUE; /* limit the dragging torque */
292  }
293  break;
294  }
295  }
296 
297  /****************************************/
298  /****************************************/
299 
300  void CDynamics2DFootBotModel::TurretPassiveToActive() {
301  /* Delete constraints to actual base body */
302  cpSpaceRemoveConstraint(GetDynamics2DEngine().GetPhysicsSpace(), m_ptBaseGripperAngularMotion);
303  cpConstraintFree(m_ptBaseGripperAngularMotion);
304  /* Create gripper control body */
305  m_ptControlGripperBody = cpBodyNew(INFINITY, INFINITY);
306  /* Create angular constraint from gripper control body to gripper actual body */
307  m_ptGripperControlAngularMotion = cpSpaceAddConstraint(GetDynamics2DEngine().GetPhysicsSpace(),
308  cpGearJointNew(m_ptActualGripperBody,
309  m_ptControlGripperBody,
310  0.0f,
311  1.0f));
312  m_ptGripperControlAngularMotion->maxBias = 0.0f; /* disable joint correction */
313  m_ptGripperControlAngularMotion->maxForce = FOOTBOT_MAX_TORQUE; /* limit the dragging torque */
314  }
315 
316  /****************************************/
317  /****************************************/
318 
319  void CDynamics2DFootBotModel::TurretActiveToPassive() {
320  /* Delete constraint from actual gripper body to gripper control body */
321  cpSpaceRemoveConstraint(GetDynamics2DEngine().GetPhysicsSpace(), m_ptGripperControlAngularMotion);
322  cpConstraintFree(m_ptGripperControlAngularMotion);
323  /* Delete control body */
324  cpBodyFree(m_ptControlGripperBody);
325  /* Create constraints from actual gripper body to actual base body */
326  m_ptBaseGripperAngularMotion = cpSpaceAddConstraint(GetDynamics2DEngine().GetPhysicsSpace(),
327  cpGearJointNew(m_ptActualBaseBody,
328  m_ptActualGripperBody,
329  0.0f,
330  1.0f));
331  m_ptBaseGripperAngularMotion->maxBias = 0.0f; /* disable joint correction */
332  m_ptBaseGripperAngularMotion->maxForce = FOOTBOT_MAX_TORQUE; /* limit the dragging torque */
333  }
334 
335  /****************************************/
336  /****************************************/
337 
339  s_anchor.Position.SetX(m_ptActualBaseBody->p.x);
340  s_anchor.Position.SetY(m_ptActualBaseBody->p.y);
341  s_anchor.Orientation.FromAngleAxis(CRadians(m_ptActualBaseBody->a), CVector3::Z);
342  }
343 
344  /****************************************/
345  /****************************************/
346 
348  s_anchor.Position.SetX(m_ptActualGripperBody->p.x);
349  s_anchor.Position.SetY(m_ptActualGripperBody->p.y);
350  s_anchor.Orientation.FromAngleAxis(CRadians(m_ptActualGripperBody->a), CVector3::Z);
353  CRadians(m_ptActualGripperBody->a),
354  CRadians(m_ptActualBaseBody->a)),
355  CVector3::Z);
356  }
357 
358  /****************************************/
359  /****************************************/
360 
362  s_anchor.Position.SetX(m_ptActualBaseBody->p.x + s_anchor.OffsetPosition.GetX());
363  s_anchor.Position.SetY(m_ptActualBaseBody->p.y + s_anchor.OffsetPosition.GetY());
364  s_anchor.Orientation =
365  s_anchor.OffsetOrientation *
366  CQuaternion(CRadians(m_ptActualBaseBody->a), CVector3::Z);
367  }
368 
369  /****************************************/
370  /****************************************/
371 
373 
374  /****************************************/
375  /****************************************/
376 
377 }
argos::CEmbodiedEntity::GetOriginAnchor
const SAnchor & GetOriginAnchor() const
Returns a const reference to the origin anchor associated to this entity.
Definition: embodied_entity.h:119
argos::SAnchor::Orientation
CQuaternion Orientation
The orientation of the anchor wrt the global coordinate system.
Definition: physics_model.h:53
argos::MODE_PASSIVE
@ MODE_PASSIVE
Definition: dynamics2d_footbot_model.cpp:35
argos::MODE_SPEED_CONTROL
@ MODE_SPEED_CONTROL
Definition: dynamics2d_footbot_model.cpp:36
argos::CDynamics2DFootBotModel::UpdateFromEntityStatus
virtual void UpdateFromEntityStatus()
Updates the state of this model from the status of the associated entity.
Definition: dynamics2d_footbot_model.cpp:213
argos::ETurretModes
ETurretModes
Definition: dynamics2d_footbot_model.cpp:33
argos::CDynamics2DMultiBodyObjectModel::Reset
virtual void Reset()
Definition: dynamics2d_multi_body_object_model.cpp:71
argos::CDynamics2DFootBotModel::MoveTo
virtual void MoveTo(const CVector3 &c_position, const CQuaternion &c_orientation)
Definition: dynamics2d_footbot_model.cpp:168
footbot_turret_entity.h
argos::CDynamics2DMultiBodyObjectModel
Base class for object models with multiple bodies.
Definition: dynamics2d_multi_body_object_model.h:44
argos::CVector3::SetX
void SetX(const Real f_x)
Sets the x coordinate of this vector.
Definition: vector3.h:101
argos
The namespace containing all the ARGoS related code.
Definition: ci_actuator.h:12
argos::CVector3
A 3D vector class.
Definition: vector3.h:29
argos::CFootBotEntity::GetTurretEntity
CFootBotTurretEntity & GetTurretEntity()
Definition: footbot_entity.h:66
argos::CDynamics2DGrippable::ReleaseAll
void ReleaseAll()
Definition: dynamics2d_gripping.cpp:134
argos::CDynamics2DModel::GetDynamics2DEngine
CDynamics2DEngine & GetDynamics2DEngine()
Returns the dynamics 2D engine state.
Definition: dynamics2d_model.h:48
argos::CRadians
It defines the basic type CRadians, used to store an angle value in radians.
Definition: angles.h:42
argos::CDynamics2DMultiBodyObjectModel::AddBody
virtual void AddBody(cpBody *pt_body, const cpVect &t_offset_pos, cpFloat t_offset_orient, Real f_height)
Adds a body.
Definition: dynamics2d_multi_body_object_model.cpp:136
argos::CDynamics2DGrippable
Definition: dynamics2d_gripping.h:84
argos::CFootBotTurretEntity::GetRotation
CRadians GetRotation() const
Definition: footbot_turret_entity.cpp:73
argos::CGripperEquippedEntity::IsLocked
bool IsLocked() const
Returns true if the gripper is locked.
Definition: gripper_equipped_entity.h:187
argos::SBoundingBox::MinCorner
CVector3 MinCorner
Definition: physics_model.h:88
argos::SBoundingBox::MaxCorner
CVector3 MaxCorner
Definition: physics_model.h:89
argos::CEmbodiedEntity::EnableAnchor
void EnableAnchor(const std::string &str_id)
Enables an anchor.
Definition: embodied_entity.cpp:150
argos::MODE_OFF
@ MODE_OFF
Definition: dynamics2d_footbot_model.cpp:34
argos::CGripperEquippedEntity::IsGripping
bool IsGripping() const
Returns true if this gripper is gripping something.
Definition: gripper_equipped_entity.h:195
argos::CVector3::Z
static const CVector3 Z
The z axis.
Definition: vector3.h:40
argos::FOOTBOT_LEFT_WHEEL
@ FOOTBOT_LEFT_WHEEL
Definition: dynamics2d_footbot_model.cpp:29
argos::CDynamics2DEngine
Definition: dynamics2d_engine.h:42
argos::CFootBotTurretEntity::GetDesiredRotationSpeed
Real GetDesiredRotationSpeed() const
Definition: footbot_turret_entity.cpp:96
argos::REGISTER_STANDARD_DYNAMICS2D_OPERATIONS_ON_ENTITY
REGISTER_STANDARD_DYNAMICS2D_OPERATIONS_ON_ENTITY(CEPuckEntity, CDynamics2DEPuckModel)
argos::CDynamics2DFootBotModel::UpdatePerspectiveCameraAnchor
void UpdatePerspectiveCameraAnchor(SAnchor &s_anchor)
Definition: dynamics2d_footbot_model.cpp:361
argos::CDynamics2DGripper
Definition: dynamics2d_gripping.h:26
argos::CQuaternion::FromAngleAxis
CQuaternion & FromAngleAxis(const CRadians &c_angle, const CVector3 &c_vector)
Definition: quaternion.h:125
argos::FOOTBOT_WHEELS
FOOTBOT_WHEELS
Definition: dynamics2d_footbot_model.cpp:28
argos::SAnchor::OffsetOrientation
CQuaternion OffsetOrientation
The initial orientation of the anchor wrt the body coordinate system.
Definition: physics_model.h:49
argos::CVector3::GetX
Real GetX() const
Returns the x coordinate of this vector.
Definition: vector3.h:93
argos::CFootBotEntity
Definition: footbot_entity.h:32
argos::CDynamics2DFootBotModel::CDynamics2DFootBotModel
CDynamics2DFootBotModel(CDynamics2DEngine &c_engine, CFootBotEntity &c_entity)
Definition: dynamics2d_footbot_model.cpp:43
argos::CRadians::GetValue
Real GetValue() const
Returns the value in radians.
Definition: angles.h:111
argos::CVector3::SetZ
void SetZ(const Real f_z)
Sets the z coordinate of this vector.
Definition: vector3.h:133
argos::CQuaternion::ToEulerAngles
void ToEulerAngles(CRadians &c_z_angle, CRadians &c_y_angle, CRadians &c_x_angle) const
Definition: quaternion.h:171
argos::CDynamics2DVelocityControl::Reset
void Reset()
Definition: dynamics2d_velocity_control.cpp:84
argos::CQuaternion
Definition: quaternion.h:14
argos::CFootBotTurretEntity::GetMode
UInt32 GetMode() const
Definition: footbot_turret_entity.h:47
argos::CDynamics2DGripper::Release
void Release()
Definition: dynamics2d_gripping.cpp:73
argos::CDynamics2DFootBotModel::UpdateOriginAnchor
void UpdateOriginAnchor(SAnchor &s_anchor)
Definition: dynamics2d_footbot_model.cpp:338
argos::CFootBotTurretEntity::GetDesiredRotation
const CRadians & GetDesiredRotation() const
Definition: footbot_turret_entity.cpp:89
argos::CDynamics2DVelocityControl::Detach
void Detach()
Definition: dynamics2d_velocity_control.cpp:68
argos::CDynamics2DFootBotModel::UpdateTurretAnchor
void UpdateTurretAnchor(SAnchor &s_anchor)
Definition: dynamics2d_footbot_model.cpp:347
argos::SAnchor
An anchor related to the body of an entity.
Definition: physics_model.h:38
argos::CEmbodiedEntity::DisableAnchor
void DisableAnchor(const std::string &str_id)
Disables an anchor.
Definition: embodied_entity.cpp:169
argos::CDynamics2DFootBotModel::CalculateBoundingBox
virtual void CalculateBoundingBox()
Calculates the axis-aligned box that contains the entire physics model.
Definition: dynamics2d_footbot_model.cpp:201
argos::CDynamics2DVelocityControl::GetAngularVelocity
Real GetAngularVelocity() const
Definition: dynamics2d_velocity_control.cpp:109
dynamics2d_footbot_model.h
argos::CDynamics2DFootBotModel::~CDynamics2DFootBotModel
virtual ~CDynamics2DFootBotModel()
Definition: dynamics2d_footbot_model.cpp:142
argos::CPhysicsModel::GetBoundingBox
const SBoundingBox & GetBoundingBox() const
Returns an axis-aligned box that contains the physics model.
Definition: physics_model.h:198
argos::CDynamics2DFootBotModel::Reset
virtual void Reset()
Definition: dynamics2d_footbot_model.cpp:181
argos::CDynamics2DFootBotModel
Definition: dynamics2d_footbot_model.h:22
argos::FOOTBOT_RIGHT_WHEEL
@ FOOTBOT_RIGHT_WHEEL
Definition: dynamics2d_footbot_model.cpp:30
argos::CDynamics2DMultiBodyObjectModel::MoveTo
virtual void MoveTo(const CVector3 &c_position, const CQuaternion &c_orientation)
Definition: dynamics2d_multi_body_object_model.cpp:42
argos::CPhysicsEngine::GetInverseSimulationClockTick
static Real GetInverseSimulationClockTick()
Returns the inverse of GetSimulationClockTick().
Definition: physics_engine.cpp:271
argos::CVector3::GetY
Real GetY() const
Returns the y coordinate of this vector.
Definition: vector3.h:109
argos::SAnchor::Position
CVector3 Position
The position of the anchor wrt the global coordinate system.
Definition: physics_model.h:51
Real
float Real
Collects all ARGoS code.
Definition: datatypes.h:39
argos::NormalizedDifference
CRadians NormalizedDifference(const CRadians &c_angle1, const CRadians &c_angle2)
Calculates the normalized difference between the given angles.
Definition: angles.h:510
argos::CDynamics2DDifferentialSteeringControl::SetWheelVelocity
void SetWheelVelocity(Real f_left_wheel, Real f_right_wheel)
Definition: dynamics2d_differentialsteering_control.cpp:24
argos::MODE_POSITION_CONTROL
@ MODE_POSITION_CONTROL
Definition: dynamics2d_footbot_model.cpp:37
argos::CVector3::SetY
void SetY(const Real f_y)
Sets the y coordinate of this vector.
Definition: vector3.h:117
argos::CPhysicsModel::GetEmbodiedEntity
CEmbodiedEntity & GetEmbodiedEntity()
Returns the embodied entity associated to this physics model.
Definition: physics_model.h:133
argos::SAnchor::OffsetPosition
CVector3 OffsetPosition
The initial position of the anchor wrt the body coordinate system.
Definition: physics_model.h:47
argos::CDynamics2DVelocityControl::AttachTo
void AttachTo(cpBody *pt_body)
Definition: dynamics2d_velocity_control.cpp:38