8 #include <argos3/plugins/simulator/physics_engines/dynamics2d/dynamics2d_engine.h>
19 m_cDyn2DEngine(c_engine),
20 m_ptControlBody(NULL),
21 m_ptControlledBody(NULL),
22 m_ptLinearConstraint(NULL),
23 m_ptAngularConstraint(NULL),
24 m_fMaxForce(f_max_force),
25 m_fMaxTorque(f_max_torque) {
30 if(
NodeExists(tNode,
"differential_steering")) {
cpConstraint * m_ptAngularConstraint
CVector2 GetLinearVelocity() const
void AttachTo(cpBody *pt_body)
void GetNodeAttributeOrDefault(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer, const T &t_default)
Returns the value of a node's attribute, or the passed default value.
float Real
Collects all ARGoS code.
Real GetX() const
Returns the x coordinate of this vector.
cpConstraint * m_ptLinearConstraint
cpBody * m_ptControlledBody
TConfigurationNode & GetNode(TConfigurationNode &t_node, const std::string &str_tag)
Given a tree root node, returns the first of its child nodes with the wanted name.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
Real GetY() const
Returns the y coordinate of this vector.
CDynamics2DEngine & m_cDyn2DEngine
bool NodeExists(TConfigurationNode &t_node, const std::string &str_tag)
Given a tree root node, returns true if one of its child nodes has the wanted name.
virtual ~CDynamics2DVelocityControl()
cpSpace * GetPhysicsSpace()
void SetLinearVelocity(const CVector2 &c_velocity)
void SetAngularVelocity(Real f_velocity)
CDynamics2DVelocityControl(CDynamics2DEngine &c_engine, Real f_max_force, Real f_max_torque, TConfigurationNode *t_node=NULL)
The namespace containing all the ARGoS related code.
Real GetAngularVelocity() const