8 #include <argos3/plugins/simulator/physics_engines/dynamics2d/dynamics2d_engine.h>
19 m_cDyn2DEngine(c_engine),
20 m_ptControlBody(nullptr),
21 m_ptControlledBody(nullptr),
22 m_ptLinearConstraint(nullptr),
23 m_ptAngularConstraint(nullptr),
24 m_fMaxForce(f_max_force),
25 m_fMaxTorque(f_max_torque) {
30 if(
NodeExists(tNode,
"differential_steering")) {
float Real
Collects all ARGoS code.
The namespace containing all the ARGoS related code.
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.
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.
ticpp::Element TConfigurationNode
The ARGoS configuration XML node.
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.
Real GetY() const
Returns the y coordinate of this vector.
Real GetX() const
Returns the x coordinate of this vector.
cpSpace * GetPhysicsSpace()
virtual ~CDynamics2DVelocityControl()
cpBody * m_ptControlledBody
void SetAngularVelocity(Real f_velocity)
cpConstraint * m_ptLinearConstraint
CDynamics2DEngine & m_cDyn2DEngine
Real GetAngularVelocity() const
CDynamics2DVelocityControl(CDynamics2DEngine &c_engine, Real f_max_force, Real f_max_torque, TConfigurationNode *t_node=NULL)
cpConstraint * m_ptAngularConstraint
CVector2 GetLinearVelocity() const
void SetLinearVelocity(const CVector2 &c_velocity)
void AttachTo(cpBody *pt_body)