8 #include <argos3/plugins/robots/prototype/simulator/prototype_link_equipped_entity.h>
17 m_pcParentLink(nullptr),
18 m_cParentLinkJointPosition(
CVector3::ZERO),
20 m_pcChildLink(nullptr),
21 m_cChildLinkJointPosition(
CVector3::ZERO),
23 m_bDisableCollision(true),
24 m_eType(
EType::FIXED),
44 std::string strJointType;
46 if(strJointType ==
"fixed") {
49 else if(strJointType ==
"prismatic") {
57 else if(strJointType ==
"revolute") {
68 else if(strJointType ==
"spherical") {
76 std::string strJointParentLink;
78 m_pcParentLink = &(cLinkEquippedEntity.
GetLink(strJointParentLink));
81 m_cParentLinkJointPosition,
82 m_cParentLinkJointPosition);
85 m_cParentLinkJointOrientation,
86 m_cParentLinkJointOrientation);
89 std::string strJointChildLink;
91 m_pcChildLink = &(cLinkEquippedEntity.
GetLink(strJointChildLink));
94 m_cChildLinkJointPosition,
95 m_cChildLinkJointPosition);
98 m_cChildLinkJointOrientation,
99 m_cChildLinkJointOrientation);
CPrototypeLinkEntity & GetLink(UInt32 un_index)
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.
#define THROW_ARGOSEXCEPTION(message)
This macro throws an ARGoS exception with the passed message.
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.
#define THROW_ARGOSEXCEPTION_NESTED(message, nested)
This macro throws an ARGoS exception with the passed message and nesting the passed exception...
It defines the basic type CRadians, used to store an angle value in radians.
CRange< CRadians > Revolute
Basic class for an entity that contains other entities.
bool NodeAttributeExists(TConfigurationNode &t_node, const std::string &str_attribute)
Returns true if the specified attribute of a node exists.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
void GetNodeAttribute(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer)
Returns the value of a node's attribute.
The exception that wraps all errors in ARGoS.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
CRadians ToRadians(const CDegrees &c_degrees)
Converts CDegrees to CRadians.
CComposableEntity & GetParent()
Returns this entity's parent.
REGISTER_STANDARD_SPACE_OPERATIONS_ON_COMPOSABLE(CComposableEntity)
The namespace containing all the ARGoS related code.
CEntity & GetComponent(const std::string &str_component)
Returns the component with the passed string label.
CPrototypeJointEntity(CComposableEntity *pc_parent)