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),
36 auto& cLinkEquippedEntity =
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);
#define THROW_ARGOSEXCEPTION_NESTED(message, nested)
This macro throws an ARGoS exception with the passed message and nesting the passed exception.
#define THROW_ARGOSEXCEPTION(message)
This macro throws an ARGoS exception with the passed message.
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.
bool NodeAttributeExists(TConfigurationNode &t_node, const std::string &str_attribute)
Returns true if the specified attribute of a node exists.
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.
CRadians ToRadians(const CDegrees &c_degrees)
Converts CDegrees to CRadians.
REGISTER_STANDARD_SPACE_OPERATIONS_ON_COMPOSABLE(CComposableEntity)
void GetNodeAttribute(TConfigurationNode &t_node, const std::string &str_attribute, T &t_buffer)
Returns the value of a node's attribute.
Basic class for an entity that contains other entities.
CEntity & GetComponent(const std::string &str_component)
Returns the component with the passed string label.
CComposableEntity & GetParent()
Returns this entity's parent.
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
The exception that wraps all errors in ARGoS.
It defines the basic type CRadians, used to store an angle value in radians.
CPrototypeJointEntity(CComposableEntity *pc_parent)
virtual void Init(TConfigurationNode &t_tree)
Initializes the state of the entity from the XML configuration tree.
CRange< CRadians > Revolute