Robotis Manipulator  1.0.0
robotis_manipulator::Manipulator Class Reference

The Manipulator class. More...

#include <robotis_manipulator_common.h>

Collaboration diagram for robotis_manipulator::Manipulator:
Collaboration graph

Public Member Functions

 Manipulator ()
 
 ~Manipulator ()
 
void addWorld (Name world_name, Name child_name, Eigen::Vector3d world_position=Eigen::Vector3d::Zero(), Eigen::Matrix3d world_orientation=Eigen::Matrix3d::Identity())
 addWorld More...
 
void addJoint (Name my_name, Name parent_name, Name child_name, Eigen::Vector3d relative_position, Eigen::Matrix3d relative_orientation, Eigen::Vector3d axis_of_rotation=Eigen::Vector3d::Zero(), int8_t joint_actuator_id=-1, double max_position_limit=M_PI, double min_position_limit=-M_PI, double coefficient=1.0, double mass=0.0, Eigen::Matrix3d inertia_tensor=Eigen::Matrix3d::Identity(), Eigen::Vector3d center_of_mass=Eigen::Vector3d::Zero())
 addJoint More...
 
void addTool (Name my_name, Name parent_name, Eigen::Vector3d relative_position, Eigen::Matrix3d relative_orientation, int8_t tool_id=-1, double max_position_limit=M_PI, double min_position_limit=-M_PI, double coefficient=1.0, double mass=0.0, Eigen::Matrix3d inertia_tensor=Eigen::Matrix3d::Identity(), Eigen::Vector3d center_of_mass=Eigen::Vector3d::Zero())
 addTool More...
 
void addComponentChild (Name my_name, Name child_name)
 addComponentChild More...
 
void printManipulatorSetting ()
 printManipulatorSetting More...
 
void setWorldPose (Pose world_pose)
 setWorldPose More...
 
void setWorldKinematicPose (KinematicPose world_kinematic_pose)
 setWorldKinematicPose More...
 
void setWorldPosition (Eigen::Vector3d world_position)
 setWorldPosition More...
 
void setWorldOrientation (Eigen::Matrix3d world_orientation)
 setWorldOrientation More...
 
void setWorldDynamicPose (DynamicPose world_dynamic_pose)
 setWorldDynamicPose More...
 
void setWorldLinearVelocity (Eigen::Vector3d world_linear_velocity)
 setWorldLinearVelocity More...
 
void setWorldAngularVelocity (Eigen::Vector3d world_angular_velocity)
 setWorldAngularVelocity More...
 
void setWorldLinearAcceleration (Eigen::Vector3d world_linear_acceleration)
 setWorldLinearAcceleration More...
 
void setWorldAngularAcceleration (Eigen::Vector3d world_angular_acceleration)
 setWorldAngularAcceleration More...
 
void setComponent (Name component_name, Component component)
 setComponent More...
 
void setComponentActuatorName (Name component_name, Name actuator_name)
 setComponentActuatorName More...
 
void setComponentPoseFromWorld (Name component_name, Pose pose_to_world)
 setComponentPoseFromWorld More...
 
void setComponentKinematicPoseFromWorld (Name component_name, KinematicPose pose_to_world)
 setComponentKinematicPoseFromWorld More...
 
void setComponentPositionFromWorld (Name component_name, Eigen::Vector3d position_to_world)
 setComponentPositionFromWorld More...
 
void setComponentOrientationFromWorld (Name component_name, Eigen::Matrix3d orientation_to_wolrd)
 setComponentOrientationFromWorld More...
 
void setComponentDynamicPoseFromWorld (Name component_name, DynamicPose dynamic_pose)
 setComponentDynamicPoseFromWorld More...
 
void setJointPosition (Name name, double position)
 setJointPosition More...
 
void setJointVelocity (Name name, double velocity)
 setJointVelocity More...
 
void setJointAcceleration (Name name, double acceleration)
 setJointAcceleration More...
 
void setJointEffort (Name name, double effort)
 setJointEffort More...
 
void setJointValue (Name name, JointValue joint_value)
 setJointValue More...
 
void setAllActiveJointPosition (std::vector< double > joint_position_vector)
 setAllActiveJointPosition More...
 
void setAllActiveJointValue (std::vector< JointValue > joint_value_vector)
 setAllActiveJointValue More...
 
void setAllJointPosition (std::vector< double > joint_position_vector)
 setAllJointPosition More...
 
void setAllJointValue (std::vector< JointValue > joint_value_vector)
 setAllJointValue More...
 
void setAllToolPosition (std::vector< double > tool_position_vector)
 setAllToolPosition More...
 
void setAllToolValue (std::vector< JointValue > tool_value_vector)
 setAllToolValue More...
 
int8_t getDOF ()
 getDOF More...
 
Name getWorldName ()
 getWorldName More...
 
Name getWorldChildName ()
 getWorldChildName More...
 
Pose getWorldPose ()
 getWorldPose More...
 
KinematicPose getWorldKinematicPose ()
 getWorldKinematicPose More...
 
Eigen::Vector3d getWorldPosition ()
 getWorldPosition More...
 
Eigen::Matrix3d getWorldOrientation ()
 getWorldOrientation More...
 
DynamicPose getWorldDynamicPose ()
 getWorldDynamicPose More...
 
int8_t getComponentSize ()
 getComponentSize More...
 
std::map< Name, ComponentgetAllComponent ()
 getAllComponent More...
 
std::map< Name, Component >::iterator getIteratorBegin ()
 getIteratorBegin More...
 
std::map< Name, Component >::iterator getIteratorEnd ()
 getIteratorEnd More...
 
Component getComponent (Name component_name)
 getComponent More...
 
Name getComponentActuatorName (Name component_name)
 getComponentActuatorName More...
 
Name getComponentParentName (Name component_name)
 getComponentParentName More...
 
std::vector< NamegetComponentChildName (Name component_name)
 getComponentChildName More...
 
Pose getComponentPoseFromWorld (Name component_name)
 getComponentPoseFromWorld More...
 
KinematicPose getComponentKinematicPoseFromWorld (Name component_name)
 getComponentKinematicPoseFromWorld More...
 
Eigen::Vector3d getComponentPositionFromWorld (Name component_name)
 getComponentPositionFromWorld More...
 
Eigen::Matrix3d getComponentOrientationFromWorld (Name component_name)
 getComponentOrientationFromWorld More...
 
DynamicPose getComponentDynamicPoseFromWorld (Name component_name)
 getComponentDynamicPoseFromWorld More...
 
KinematicPose getComponentRelativePoseFromParent (Name component_name)
 getComponentRelativePoseFromParent More...
 
Eigen::Vector3d getComponentRelativePositionFromParent (Name component_name)
 getComponentRelativePositionFromParent More...
 
Eigen::Matrix3d getComponentRelativeOrientationFromParent (Name component_name)
 getComponentRelativeOrientationFromParent More...
 
int8_t getId (Name component_name)
 getId More...
 
double getCoefficient (Name component_name)
 getCoefficient More...
 
Eigen::Vector3d getAxis (Name component_name)
 getAxis More...
 
double getJointPosition (Name component_name)
 getJointPosition More...
 
double getJointVelocity (Name component_name)
 getJointVelocity More...
 
double getJointAcceleration (Name component_name)
 getJointAcceleration More...
 
double getJointEffort (Name component_name)
 getJointEffort More...
 
JointValue getJointValue (Name component_name)
 getJointValue More...
 
double getComponentMass (Name component_name)
 getComponentMass More...
 
Eigen::Matrix3d getComponentInertiaTensor (Name component_name)
 getComponentInertiaTensor More...
 
Eigen::Vector3d getComponentCenterOfMass (Name component_name)
 getComponentCenterOfMass More...
 
std::vector< double > getAllJointPosition ()
 getAllJointPosition More...
 
std::vector< JointValuegetAllJointValue ()
 getAllJointValue More...
 
std::vector< double > getAllActiveJointPosition ()
 getAllActiveJointPosition More...
 
std::vector< JointValuegetAllActiveJointValue ()
 getAllActiveJointValue More...
 
std::vector< double > getAllToolPosition ()
 getAllToolPosition More...
 
std::vector< JointValuegetAllToolValue ()
 getAllToolValue More...
 
std::vector< uint8_t > getAllJointID ()
 getAllJointID More...
 
std::vector< uint8_t > getAllActiveJointID ()
 getAllActiveJointID More...
 
std::vector< NamegetAllToolComponentName ()
 getAllToolComponentName More...
 
std::vector< NamegetAllActiveJointComponentName ()
 getAllActiveJointComponentName More...
 
bool checkJointLimit (Name Component_name, double value)
 checkJointLimit More...
 
bool checkComponentType (Name component_name, ComponentType component_type)
 checkComponentType More...
 
Name findComponentNameUsingId (int8_t id)
 findComponentNameUsingId More...
 

Private Attributes

int8_t dof_
 
World world_
 
std::map< Name, Componentcomponent_
 

Detailed Description

The Manipulator class.

Definition at line 183 of file robotis_manipulator_common.h.

Constructor & Destructor Documentation

Manipulator::Manipulator ( )
robotis_manipulator::Manipulator::~Manipulator ( )
inline

Definition at line 192 of file robotis_manipulator_common.h.

192 {}

Member Function Documentation

void Manipulator::addComponentChild ( Name  my_name,
Name  child_name 
)

addComponentChild

Parameters
my_name
child_name

Definition at line 144 of file robotis_manipulator_common.cpp.

145 {
146  component_.at(my_name).name.child.push_back(child_name);
147 }

Here is the caller graph for this function:

void Manipulator::addJoint ( Name  my_name,
Name  parent_name,
Name  child_name,
Eigen::Vector3d  relative_position,
Eigen::Matrix3d  relative_orientation,
Eigen::Vector3d  axis_of_rotation = Eigen::Vector3d::Zero(),
int8_t  joint_actuator_id = -1,
double  max_position_limit = M_PI,
double  min_position_limit = -M_PI,
double  coefficient = 1.0,
double  mass = 0.0,
Eigen::Matrix3d  inertia_tensor = Eigen::Matrix3d::Identity(),
Eigen::Vector3d  center_of_mass = Eigen::Vector3d::Zero() 
)

addJoint

Parameters
my_name
parent_name
child_name
relative_position
relative_orientation
axis_of_rotation
joint_actuator_id
max_position_limit
min_position_limit
coefficient
mass
inertia_tensor
center_of_mass

Definition at line 50 of file robotis_manipulator_common.cpp.

63 {
64  Component temp_component;
65  if (joint_actuator_id != -1)
66  {
67  dof_++;
68  temp_component.component_type = ACTIVE_JOINT_COMPONENT;
69  }
70  else
71  {
72  temp_component.component_type = PASSIVE_JOINT_COMPONENT;
73  }
74 
75  temp_component.name.parent = parent_name;
76  temp_component.name.child.push_back(child_name);
77  temp_component.relative.pose_from_parent.position = relative_position;
78  temp_component.relative.pose_from_parent.orientation = relative_orientation;
79  temp_component.relative.inertia.mass = mass;
80  temp_component.relative.inertia.inertia_tensor = inertia_tensor;
81  temp_component.relative.inertia.center_of_mass = center_of_mass;
82  temp_component.joint_constant.id = joint_actuator_id;
83  temp_component.joint_constant.coefficient = coefficient;
84  temp_component.joint_constant.axis = axis_of_rotation;
85  temp_component.joint_constant.position_limit.maximum = max_position_limit;
86  temp_component.joint_constant.position_limit.minimum = min_position_limit;
87 
88  temp_component.pose_from_world.kinematic.position = Eigen::Vector3d::Zero();
89  temp_component.pose_from_world.kinematic.orientation = Eigen::Matrix3d::Identity();
90  temp_component.pose_from_world.dynamic.linear.velocity = Eigen::Vector3d::Zero();
91  temp_component.pose_from_world.dynamic.linear.acceleration = Eigen::Vector3d::Zero();
92  temp_component.pose_from_world.dynamic.angular.velocity = Eigen::Vector3d::Zero();
93  temp_component.pose_from_world.dynamic.angular.acceleration = Eigen::Vector3d::Zero();
94 
95  temp_component.joint_value.position = 0.0;
96  temp_component.joint_value.velocity = 0.0;
97  temp_component.joint_value.effort = 0.0;
98 
99  component_.insert(std::make_pair(my_name, temp_component));
100 }

Here is the caller graph for this function:

void Manipulator::addTool ( Name  my_name,
Name  parent_name,
Eigen::Vector3d  relative_position,
Eigen::Matrix3d  relative_orientation,
int8_t  tool_id = -1,
double  max_position_limit = M_PI,
double  min_position_limit = -M_PI,
double  coefficient = 1.0,
double  mass = 0.0,
Eigen::Matrix3d  inertia_tensor = Eigen::Matrix3d::Identity(),
Eigen::Vector3d  center_of_mass = Eigen::Vector3d::Zero() 
)

addTool

Parameters
my_name
parent_name
relative_position
relative_orientation
tool_id
max_position_limit
min_position_limit
coefficient
mass
inertia_tensor
center_of_mass

Definition at line 102 of file robotis_manipulator_common.cpp.

113 {
114  Component temp_component;
115 
116  temp_component.name.parent = parent_name;
117  temp_component.name.child.resize(0);
118  temp_component.component_type = TOOL_COMPONENT;
119  temp_component.relative.pose_from_parent.position = relative_position;
120  temp_component.relative.pose_from_parent.orientation = relative_orientation;
121  temp_component.relative.inertia.mass = mass;
122  temp_component.relative.inertia.inertia_tensor = inertia_tensor;
123  temp_component.relative.inertia.center_of_mass = center_of_mass;
124  temp_component.joint_constant.id = tool_id;
125  temp_component.joint_constant.coefficient = coefficient;
126  temp_component.joint_constant.axis = Eigen::Vector3d::Zero();
127  temp_component.joint_constant.position_limit.maximum = max_position_limit;
128  temp_component.joint_constant.position_limit.minimum = min_position_limit;
129 
130  temp_component.pose_from_world.kinematic.position = Eigen::Vector3d::Zero();
131  temp_component.pose_from_world.kinematic.orientation = Eigen::Matrix3d::Identity();
132  temp_component.pose_from_world.dynamic.linear.velocity = Eigen::Vector3d::Zero();
133  temp_component.pose_from_world.dynamic.linear.acceleration = Eigen::Vector3d::Zero();
134  temp_component.pose_from_world.dynamic.angular.velocity = Eigen::Vector3d::Zero();
135  temp_component.pose_from_world.dynamic.angular.acceleration = Eigen::Vector3d::Zero();
136 
137  temp_component.joint_value.position = 0.0;
138  temp_component.joint_value.velocity = 0.0;
139  temp_component.joint_value.effort = 0.0;
140 
141  component_.insert(std::make_pair(my_name, temp_component));
142 }

Here is the caller graph for this function:

void Manipulator::addWorld ( Name  world_name,
Name  child_name,
Eigen::Vector3d  world_position = Eigen::Vector3d::Zero(),
Eigen::Matrix3d  world_orientation = Eigen::Matrix3d::Identity() 
)

addWorld

Parameters
world_name
child_name
world_position
world_orientation

Definition at line 35 of file robotis_manipulator_common.cpp.

39 {
40  world_.name = world_name;
41  world_.child = child_name;
42  world_.pose.kinematic.position = world_position;
43  world_.pose.kinematic.orientation = world_orientation;
44  world_.pose.dynamic.linear.velocity = Eigen::Vector3d::Zero();
45  world_.pose.dynamic.linear.acceleration = Eigen::Vector3d::Zero();
46  world_.pose.dynamic.angular.velocity = Eigen::Vector3d::Zero();
47  world_.pose.dynamic.angular.acceleration = Eigen::Vector3d::Zero();
48 }

Here is the caller graph for this function:

bool Manipulator::checkComponentType ( Name  component_name,
ComponentType  component_type 
)

checkComponentType

Parameters
component_name
component_type
Returns

Definition at line 825 of file robotis_manipulator_common.cpp.

826 {
827  if(component_.at(component_name).component_type == component_type)
828  return true;
829  else
830  return false;
831 }

Here is the caller graph for this function:

bool Manipulator::checkJointLimit ( Name  Component_name,
double  value 
)

checkJointLimit

Parameters
Component_name
value
Returns

Definition at line 815 of file robotis_manipulator_common.cpp.

816 {
817  if(component_.at(component_name).joint_constant.position_limit.maximum < value)
818  return false;
819  else if(component_.at(component_name).joint_constant.position_limit.minimum > value)
820  return false;
821  else
822  return true;
823 }

Here is the caller graph for this function:

Name Manipulator::findComponentNameUsingId ( int8_t  id)

findComponentNameUsingId

Parameters
id
Returns

Definition at line 837 of file robotis_manipulator_common.cpp.

838 {
839  std::map<Name, Component>::iterator it_component;
840 
841  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
842  {
843  if (component_.at(it_component->first).joint_constant.id == id)
844  {
845  return it_component->first;
846  }
847  }
848  return {};
849 }

Here is the caller graph for this function:

std::vector< Name > Manipulator::getAllActiveJointComponentName ( )

getAllActiveJointComponentName

Returns

Definition at line 796 of file robotis_manipulator_common.cpp.

797 {
798  std::vector<Name> active_joint_name;
799  std::map<Name, Component>::iterator it_component;
800 
801  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
802  {
803  if (checkComponentType(it_component->first, ACTIVE_JOINT_COMPONENT))
804  {
805  active_joint_name.push_back(it_component->first);
806  }
807  }
808  return active_joint_name;
809 }
bool checkComponentType(Name component_name, ComponentType component_type)
checkComponentType

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector< uint8_t > Manipulator::getAllActiveJointID ( )

getAllActiveJointID

Returns

Definition at line 765 of file robotis_manipulator_common.cpp.

766 {
767  std::vector<uint8_t> active_joint_id;
768  std::map<Name, Component>::iterator it_component;
769 
770  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
771  {
772  if (checkComponentType(it_component->first, ACTIVE_JOINT_COMPONENT))
773  {
774  active_joint_id.push_back(component_.at(it_component->first).joint_constant.id);
775  }
776  }
777  return active_joint_id;
778 }
bool checkComponentType(Name component_name, ComponentType component_type)
checkComponentType

Here is the call graph for this function:

std::vector< double > Manipulator::getAllActiveJointPosition ( )

getAllActiveJointPosition

Returns

Definition at line 689 of file robotis_manipulator_common.cpp.

690 {
691  std::vector<double> result_vector;
692  std::map<Name, Component>::iterator it_component;
693 
694  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
695  {
696  if (checkComponentType(it_component->first, ACTIVE_JOINT_COMPONENT))
697  {
698  result_vector.push_back(component_.at(it_component->first).joint_value.position);
699  }
700  }
701  return result_vector;
702 }
bool checkComponentType(Name component_name, ComponentType component_type)
checkComponentType

Here is the call graph for this function:

std::vector< JointValue > Manipulator::getAllActiveJointValue ( )

getAllActiveJointValue

Returns

Definition at line 704 of file robotis_manipulator_common.cpp.

705 {
706  std::vector<JointValue> result_vector;
707  std::map<Name, Component>::iterator it_component;
708 
709  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
710  {
711  if (checkComponentType(it_component->first, ACTIVE_JOINT_COMPONENT))
712  {
713  result_vector.push_back(component_.at(it_component->first).joint_value);
714  }
715  }
716  return result_vector;
717 }
bool checkComponentType(Name component_name, ComponentType component_type)
checkComponentType

Here is the call graph for this function:

Here is the caller graph for this function:

std::map< Name, Component > Manipulator::getAllComponent ( )

getAllComponent

Returns

Definition at line 529 of file robotis_manipulator_common.cpp.

530 {
531  return component_;
532 }
std::vector< uint8_t > Manipulator::getAllJointID ( )

getAllJointID

Returns

Definition at line 750 of file robotis_manipulator_common.cpp.

751 {
752  std::vector<uint8_t> joint_id;
753  std::map<Name, Component>::iterator it_component;
754 
755  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
756  {
757  if (checkComponentType(it_component->first, ACTIVE_JOINT_COMPONENT) || checkComponentType(it_component->first, PASSIVE_JOINT_COMPONENT))
758  {
759  joint_id.push_back(component_.at(it_component->first).joint_constant.id);
760  }
761  }
762  return joint_id;
763 }
bool checkComponentType(Name component_name, ComponentType component_type)
checkComponentType

Here is the call graph for this function:

std::vector< double > Manipulator::getAllJointPosition ( )

getAllJointPosition

Returns

Definition at line 659 of file robotis_manipulator_common.cpp.

660 {
661  std::vector<double> result_vector;
662  std::map<Name, Component>::iterator it_component;
663 
664  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
665  {
666  if (checkComponentType(it_component->first, ACTIVE_JOINT_COMPONENT) || checkComponentType(it_component->first, PASSIVE_JOINT_COMPONENT))
667  {
668  result_vector.push_back(component_.at(it_component->first).joint_value.position);
669  }
670  }
671  return result_vector;
672 }
bool checkComponentType(Name component_name, ComponentType component_type)
checkComponentType

Here is the call graph for this function:

std::vector< JointValue > Manipulator::getAllJointValue ( )

getAllJointValue

Returns

Definition at line 674 of file robotis_manipulator_common.cpp.

675 {
676  std::vector<JointValue> result_vector;
677  std::map<Name, Component>::iterator it_component;
678 
679  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
680  {
681  if (checkComponentType(it_component->first, ACTIVE_JOINT_COMPONENT) || checkComponentType(it_component->first, PASSIVE_JOINT_COMPONENT))
682  {
683  result_vector.push_back(component_.at(it_component->first).joint_value);
684  }
685  }
686  return result_vector;
687 }
bool checkComponentType(Name component_name, ComponentType component_type)
checkComponentType

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector< Name > Manipulator::getAllToolComponentName ( )

getAllToolComponentName

Returns

Definition at line 781 of file robotis_manipulator_common.cpp.

782 {
783  std::vector<Name> tool_name;
784  std::map<Name, Component>::iterator it_component;
785 
786  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
787  {
788  if (checkComponentType(it_component->first, TOOL_COMPONENT))
789  {
790  tool_name.push_back(it_component->first);
791  }
792  }
793  return tool_name;
794 }
bool checkComponentType(Name component_name, ComponentType component_type)
checkComponentType

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector< double > Manipulator::getAllToolPosition ( )

getAllToolPosition

Returns

Definition at line 719 of file robotis_manipulator_common.cpp.

720 {
721  std::vector<double> result_vector;
722  std::map<Name, Component>::iterator it_component;
723 
724  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
725  {
726  if (checkComponentType(it_component->first, TOOL_COMPONENT))
727  {
728  result_vector.push_back(component_.at(it_component->first).joint_value.position);
729  }
730  }
731  return result_vector;
732 }
bool checkComponentType(Name component_name, ComponentType component_type)
checkComponentType

Here is the call graph for this function:

Here is the caller graph for this function:

std::vector< JointValue > Manipulator::getAllToolValue ( )

getAllToolValue

Returns

Definition at line 735 of file robotis_manipulator_common.cpp.

736 {
737  std::vector<JointValue> result_vector;
738  std::map<Name, Component>::iterator it_component;
739 
740  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
741  {
742  if (checkComponentType(it_component->first, TOOL_COMPONENT))
743  {
744  result_vector.push_back(component_.at(it_component->first).joint_value);
745  }
746  }
747  return result_vector;
748 }
bool checkComponentType(Name component_name, ComponentType component_type)
checkComponentType

Here is the call graph for this function:

Here is the caller graph for this function:

Eigen::Vector3d Manipulator::getAxis ( Name  component_name)

getAxis

Parameters
component_name
Returns

Definition at line 614 of file robotis_manipulator_common.cpp.

615 {
616  return component_.at(component_name).joint_constant.axis;
617 }
double Manipulator::getCoefficient ( Name  component_name)

getCoefficient

Parameters
component_name
Returns

Definition at line 609 of file robotis_manipulator_common.cpp.

610 {
611  return component_.at(component_name).joint_constant.coefficient;
612 }

Here is the caller graph for this function:

Component Manipulator::getComponent ( Name  component_name)

getComponent

Parameters
component_name
Returns

Definition at line 544 of file robotis_manipulator_common.cpp.

545 {
546  return component_.at(component_name);
547 }
Name Manipulator::getComponentActuatorName ( Name  component_name)

getComponentActuatorName

Parameters
component_name
Returns

Definition at line 549 of file robotis_manipulator_common.cpp.

550 {
551  return component_.at(component_name).actuator_name;
552 }

Here is the caller graph for this function:

Eigen::Vector3d Manipulator::getComponentCenterOfMass ( Name  component_name)

getComponentCenterOfMass

Parameters
component_name
Returns

Definition at line 654 of file robotis_manipulator_common.cpp.

655 {
656  return component_.at(component_name).relative.inertia.center_of_mass;
657 }
std::vector< Name > Manipulator::getComponentChildName ( Name  component_name)

getComponentChildName

Parameters
component_name
Returns

Definition at line 559 of file robotis_manipulator_common.cpp.

560 {
561  return component_.at(component_name).name.child;
562 }
DynamicPose Manipulator::getComponentDynamicPoseFromWorld ( Name  component_name)

getComponentDynamicPoseFromWorld

Parameters
component_name
Returns

Definition at line 584 of file robotis_manipulator_common.cpp.

585 {
586  return component_.at(component_name).pose_from_world.dynamic;
587 }

Here is the caller graph for this function:

Eigen::Matrix3d Manipulator::getComponentInertiaTensor ( Name  component_name)

getComponentInertiaTensor

Parameters
component_name
Returns

Definition at line 649 of file robotis_manipulator_common.cpp.

650 {
651  return component_.at(component_name).relative.inertia.inertia_tensor;
652 }
KinematicPose Manipulator::getComponentKinematicPoseFromWorld ( Name  component_name)

getComponentKinematicPoseFromWorld

Parameters
component_name
Returns

Definition at line 569 of file robotis_manipulator_common.cpp.

570 {
571  return component_.at(component_name).pose_from_world.kinematic;
572 }

Here is the caller graph for this function:

double Manipulator::getComponentMass ( Name  component_name)

getComponentMass

Parameters
component_name
Returns

Definition at line 644 of file robotis_manipulator_common.cpp.

645 {
646  return component_.at(component_name).relative.inertia.mass;
647 }
Eigen::Matrix3d Manipulator::getComponentOrientationFromWorld ( Name  component_name)

getComponentOrientationFromWorld

Parameters
component_name
Returns

Definition at line 579 of file robotis_manipulator_common.cpp.

580 {
581  return component_.at(component_name).pose_from_world.kinematic.orientation;
582 }

Here is the caller graph for this function:

Name Manipulator::getComponentParentName ( Name  component_name)

getComponentParentName

Parameters
component_name
Returns

Definition at line 554 of file robotis_manipulator_common.cpp.

555 {
556  return component_.at(component_name).name.parent;
557 }
Pose Manipulator::getComponentPoseFromWorld ( Name  component_name)

getComponentPoseFromWorld

Parameters
component_name
Returns

Definition at line 564 of file robotis_manipulator_common.cpp.

565 {
566  return component_.at(component_name).pose_from_world;
567 }

Here is the caller graph for this function:

Eigen::Vector3d Manipulator::getComponentPositionFromWorld ( Name  component_name)

getComponentPositionFromWorld

Parameters
component_name
Returns

Definition at line 574 of file robotis_manipulator_common.cpp.

575 {
576  return component_.at(component_name).pose_from_world.kinematic.position;
577 }

Here is the caller graph for this function:

Eigen::Matrix3d Manipulator::getComponentRelativeOrientationFromParent ( Name  component_name)

getComponentRelativeOrientationFromParent

Parameters
component_name
Returns

Definition at line 599 of file robotis_manipulator_common.cpp.

600 {
601  return component_.at(component_name).relative.pose_from_parent.orientation;
602 }
KinematicPose Manipulator::getComponentRelativePoseFromParent ( Name  component_name)

getComponentRelativePoseFromParent

Parameters
component_name
Returns

Definition at line 589 of file robotis_manipulator_common.cpp.

590 {
591  return component_.at(component_name).relative.pose_from_parent;
592 }
Eigen::Vector3d Manipulator::getComponentRelativePositionFromParent ( Name  component_name)

getComponentRelativePositionFromParent

Parameters
component_name
Returns

Definition at line 594 of file robotis_manipulator_common.cpp.

595 {
596  return component_.at(component_name).relative.pose_from_parent.position;
597 }
int8_t Manipulator::getComponentSize ( )

getComponentSize

Returns

Definition at line 524 of file robotis_manipulator_common.cpp.

525 {
526  return component_.size();
527 }
int8_t Manipulator::getDOF ( )

getDOF

Returns

Definition at line 484 of file robotis_manipulator_common.cpp.

485 {
486  return dof_;
487 }

Here is the caller graph for this function:

int8_t Manipulator::getId ( Name  component_name)

getId

Parameters
component_name
Returns

Definition at line 604 of file robotis_manipulator_common.cpp.

605 {
606  return component_.at(component_name).joint_constant.id;
607 }

Here is the caller graph for this function:

std::map< Name, Component >::iterator Manipulator::getIteratorBegin ( )

getIteratorBegin

Returns

Definition at line 534 of file robotis_manipulator_common.cpp.

535 {
536  return component_.begin();
537 }

Here is the caller graph for this function:

std::map< Name, Component >::iterator Manipulator::getIteratorEnd ( )

getIteratorEnd

Returns

Definition at line 539 of file robotis_manipulator_common.cpp.

540 {
541  return component_.end();;
542 }

Here is the caller graph for this function:

double Manipulator::getJointAcceleration ( Name  component_name)

getJointAcceleration

Parameters
component_name
Returns

Definition at line 629 of file robotis_manipulator_common.cpp.

630 {
631  return component_.at(component_name).joint_value.acceleration;
632 }
double Manipulator::getJointEffort ( Name  component_name)

getJointEffort

Parameters
component_name
Returns

Definition at line 634 of file robotis_manipulator_common.cpp.

635 {
636  return component_.at(component_name).joint_value.effort;
637 }
double Manipulator::getJointPosition ( Name  component_name)

getJointPosition

Parameters
component_name
Returns

Definition at line 619 of file robotis_manipulator_common.cpp.

620 {
621  return component_.at(component_name).joint_value.position;
622 }
JointValue Manipulator::getJointValue ( Name  component_name)

getJointValue

Parameters
component_name
Returns

Definition at line 639 of file robotis_manipulator_common.cpp.

640 {
641  return component_.at(component_name).joint_value;
642 }

Here is the caller graph for this function:

double Manipulator::getJointVelocity ( Name  component_name)

getJointVelocity

Parameters
component_name
Returns

Definition at line 624 of file robotis_manipulator_common.cpp.

625 {
626  return component_.at(component_name).joint_value.velocity;
627 }
Name Manipulator::getWorldChildName ( )

getWorldChildName

Returns

Definition at line 494 of file robotis_manipulator_common.cpp.

DynamicPose Manipulator::getWorldDynamicPose ( )

getWorldDynamicPose

Returns

Definition at line 519 of file robotis_manipulator_common.cpp.

KinematicPose Manipulator::getWorldKinematicPose ( )

getWorldKinematicPose

Returns

Definition at line 504 of file robotis_manipulator_common.cpp.

Name Manipulator::getWorldName ( )

getWorldName

Returns

Definition at line 489 of file robotis_manipulator_common.cpp.

Eigen::Matrix3d Manipulator::getWorldOrientation ( )
Pose Manipulator::getWorldPose ( )

getWorldPose

Returns

Definition at line 499 of file robotis_manipulator_common.cpp.

Eigen::Vector3d Manipulator::getWorldPosition ( )
void Manipulator::printManipulatorSetting ( )

printManipulatorSetting

Definition at line 149 of file robotis_manipulator_common.cpp.

150 {
151  log::println("----------<Manipulator Description>----------");
152  log::println("<Degree of Freedom>\n", dof_);
153  log::println("<Number of Components>\n", component_.size());
154  log::println("");
155  log::println("<World Configuration>");
156  log::println(" [Name]");
157  log::print(" -World Name : "); log::println(STRING(world_.name));
158  log::print(" -Child Name : "); log::println(STRING(world_.child));
159  log::println(" [Static Pose]");
160  log::println(" -Position : ");
162  log::println(" -Orientation : ");
164  log::println(" [Dynamic Pose]");
165  log::println(" -Linear Velocity : ");
167  log::println(" -Linear acceleration : ");
169  log::println(" -Angular Velocity : ");
171  log::println(" -Angular acceleration : ");
173 
174  std::vector<double> result_vector;
175  std::map<Name, Component>::iterator it_component;
176 
177  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
178  {
179  log::println("");
180  log::println("<"); log::print(STRING(it_component->first)); log::print("Configuration>");
181  if(component_.at(it_component->first).component_type == ACTIVE_JOINT_COMPONENT)
182  log::println(" [Component Type]\n Active Joint");
183  else if(component_.at(it_component->first).component_type == PASSIVE_JOINT_COMPONENT)
184  log::println(" [Component Type]\n Passive Joint");
185  else if(component_.at(it_component->first).component_type == TOOL_COMPONENT)
186  log::println(" [Component Type]\n Tool");
187  log::println(" [Name]");
188  log::print(" -Parent Name : "); log::println(STRING(component_.at(it_component->first).name.parent));
189  for(uint32_t index = 0; index < component_.at(it_component->first).name.child.size(); index++)
190  {
191  log::print(" -Child Name",index+1,0);
192  log::print(" : ");
193  log::println(STRING(component_.at(it_component->first).name.child.at(index)));
194  }
195  log::println(" [Actuator]");
196  log::print(" -Actuator Name : ");
197  log::println(STRING(component_.at(it_component->first).actuator_name));
198  log::print(" -ID : ");
199  log::println("", component_.at(it_component->first).joint_constant.id,0);
200  log::println(" -Joint Axis : ");
201  log::print_vector(component_.at(it_component->first).joint_constant.axis);
202  log::print(" -Coefficient : ");
203  log::println("", component_.at(it_component->first).joint_constant.coefficient);
204  log::println(" -Position Limit : ");
205  log::print(" Maximum :", component_.at(it_component->first).joint_constant.position_limit.maximum);
206  log::println(", Minimum :", component_.at(it_component->first).joint_constant.position_limit.minimum);
207 
208  log::println(" [Actuator Value]");
209  log::println(" -Position : ", component_.at(it_component->first).joint_value.position);
210  log::println(" -Velocity : ", component_.at(it_component->first).joint_value.velocity);
211  log::println(" -Acceleration : ", component_.at(it_component->first).joint_value.acceleration);
212  log::println(" -Effort : ", component_.at(it_component->first).joint_value.effort);
213 
214  log::println(" [Constant]");
215  log::println(" -Relative Position from parent component : ");
216  log::print_vector(component_.at(it_component->first).relative.pose_from_parent.position);
217  log::println(" -Relative Orientation from parent component : ");
218  log::print_matrix(component_.at(it_component->first).relative.pose_from_parent.orientation);
219  log::print(" -Mass : ");
220  log::println("", component_.at(it_component->first).relative.inertia.mass);
221  log::println(" -Inertia Tensor : ");
222  log::print_matrix(component_.at(it_component->first).relative.inertia.inertia_tensor);
223  log::println(" -Center of Mass : ");
224  log::print_vector(component_.at(it_component->first).relative.inertia.center_of_mass);
225 
226  log::println(" [Variable]");
227  log::println(" -Position : ");
228  log::print_vector(component_.at(it_component->first).pose_from_world.kinematic.position);
229  log::println(" -Orientation : ");
230  log::print_matrix(component_.at(it_component->first).pose_from_world.kinematic.orientation);
231  log::println(" -Linear Velocity : ");
232  log::print_vector(component_.at(it_component->first).pose_from_world.dynamic.linear.velocity);
233  log::println(" -Linear acceleration : ");
234  log::print_vector(component_.at(it_component->first).pose_from_world.dynamic.linear.acceleration);
235  log::println(" -Angular Velocity : ");
236  log::print_vector(component_.at(it_component->first).pose_from_world.dynamic.angular.velocity);
237  log::println(" -Angular acceleration : ");
238  log::print_vector(component_.at(it_component->first).pose_from_world.dynamic.angular.acceleration);
239  }
240  log::println("---------------------------------------------");
241 }
void println(STRING str, STRING color="DEFAULT")
println
void print_vector(std::vector< T > &vec, uint8_t decimal_point=3)
print_vector
void print(STRING str, STRING color="DEFAULT")
print
std::string STRING
void print_matrix(matrix &m, uint8_t decimal_point=3)
print_matrix

Here is the call graph for this function:

Here is the caller graph for this function:

void Manipulator::setAllActiveJointPosition ( std::vector< double >  joint_position_vector)

setAllActiveJointPosition

Parameters
joint_position_vector

Definition at line 387 of file robotis_manipulator_common.cpp.

388 {
389  int8_t index = 0;
390  std::map<Name, Component>::iterator it_component;
391 
392  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
393  {
394  if (component_.at(it_component->first).component_type == ACTIVE_JOINT_COMPONENT)
395  {
396  component_.at(it_component->first).joint_value.position = joint_position_vector.at(index);
397  index++;
398  }
399  }
400 }
void Manipulator::setAllActiveJointValue ( std::vector< JointValue joint_value_vector)

setAllActiveJointValue

Parameters
joint_value_vector

Definition at line 402 of file robotis_manipulator_common.cpp.

403 {
404  int8_t index = 0;
405  std::map<Name, Component>::iterator it_component;
406 
407  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
408  {
409  if (component_.at(it_component->first).component_type == ACTIVE_JOINT_COMPONENT)
410  {
411  component_.at(it_component->first).joint_value.position = joint_value_vector.at(index).position;
412  component_.at(it_component->first).joint_value.velocity = joint_value_vector.at(index).velocity;
413  component_.at(it_component->first).joint_value.acceleration = joint_value_vector.at(index).acceleration;
414  component_.at(it_component->first).joint_value.effort = joint_value_vector.at(index).effort;
415  index++;
416  }
417  }
418 }

Here is the caller graph for this function:

void Manipulator::setAllJointPosition ( std::vector< double >  joint_position_vector)

setAllJointPosition

Parameters
joint_position_vector

Definition at line 420 of file robotis_manipulator_common.cpp.

421 {
422  int8_t index = 0;
423  std::map<Name, Component>::iterator it_component;
424 
425  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
426  {
427  if (component_.at(it_component->first).component_type == ACTIVE_JOINT_COMPONENT || component_.at(it_component->first).component_type == PASSIVE_JOINT_COMPONENT)
428  {
429  component_.at(it_component->first).joint_value.position = joint_position_vector.at(index);
430  index++;
431  }
432  }
433 }
void Manipulator::setAllJointValue ( std::vector< JointValue joint_value_vector)

setAllJointValue

Parameters
joint_value_vector

Definition at line 435 of file robotis_manipulator_common.cpp.

436 {
437  int8_t index = 0;
438  std::map<Name, Component>::iterator it_component;
439 
440  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
441  {
442  if (component_.at(it_component->first).component_type == ACTIVE_JOINT_COMPONENT || component_.at(it_component->first).component_type == PASSIVE_JOINT_COMPONENT)
443  {
444  component_.at(it_component->first).joint_value = joint_value_vector.at(index);
445  index++;
446  }
447  }
448 }
void Manipulator::setAllToolPosition ( std::vector< double >  tool_position_vector)

setAllToolPosition

Parameters
tool_position_vector

Definition at line 450 of file robotis_manipulator_common.cpp.

451 {
452  int8_t index = 0;
453  std::map<Name, Component>::iterator it_component;
454 
455  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
456  {
457  if (component_.at(it_component->first).component_type == TOOL_COMPONENT)
458  {
459  component_.at(it_component->first).joint_value.position = tool_position_vector.at(index);
460  index++;
461  }
462  }
463 }
void Manipulator::setAllToolValue ( std::vector< JointValue tool_value_vector)

setAllToolValue

Parameters
tool_value_vector

Definition at line 465 of file robotis_manipulator_common.cpp.

466 {
467  int8_t index = 0;
468  std::map<Name, Component>::iterator it_component;
469 
470  for (it_component = component_.begin(); it_component != component_.end(); it_component++)
471  {
472  if (component_.at(it_component->first).component_type == TOOL_COMPONENT)
473  {
474  component_.at(it_component->first).joint_value = tool_value_vector.at(index);
475  index++;
476  }
477  }
478 }

Here is the caller graph for this function:

void Manipulator::setComponent ( Name  component_name,
Component  component 
)

setComponent

Parameters
component_name
component

Definition at line 292 of file robotis_manipulator_common.cpp.

293 {
294  component_.at(component_name) = component;
295 }
void Manipulator::setComponentActuatorName ( Name  component_name,
Name  actuator_name 
)

setComponentActuatorName

Parameters
component_name
actuator_name

Definition at line 297 of file robotis_manipulator_common.cpp.

298 {
299  component_.at(component_name).actuator_name = actuator_name;
300 }

Here is the caller graph for this function:

void Manipulator::setComponentDynamicPoseFromWorld ( Name  component_name,
DynamicPose  dynamic_pose 
)

setComponentDynamicPoseFromWorld

Parameters
component_name
dynamic_pose

Definition at line 350 of file robotis_manipulator_common.cpp.

351 {
352  if (component_.find(component_name) != component_.end())
353  {
354  component_.at(component_name).pose_from_world.dynamic = dynamic_pose;
355  }
356  else
357  {
358  log::error("[setComponentDynamicPoseFromWorld] Wrong name.");
359  }
360 }

Here is the call graph for this function:

void Manipulator::setComponentKinematicPoseFromWorld ( Name  component_name,
KinematicPose  pose_to_world 
)

setComponentKinematicPoseFromWorld

Parameters
component_name
pose_to_world

Definition at line 314 of file robotis_manipulator_common.cpp.

315 {
316  if (component_.find(component_name) != component_.end())
317  {
318  component_.at(component_name).pose_from_world.kinematic = pose_to_world;
319  }
320  else
321  {
322  log::error("[setComponentKinematicPoseFromWorld] Wrong name.");
323  }
324 }

Here is the call graph for this function:

void Manipulator::setComponentOrientationFromWorld ( Name  component_name,
Eigen::Matrix3d  orientation_to_wolrd 
)

setComponentOrientationFromWorld

Parameters
component_name
orientation_to_wolrd

Definition at line 338 of file robotis_manipulator_common.cpp.

339 {
340  if (component_.find(component_name) != component_.end())
341  {
342  component_.at(component_name).pose_from_world.kinematic.orientation = orientation_to_wolrd;
343  }
344  else
345  {
346  log::error("[setComponentOrientationFromWorld] Wrong name.");
347  }
348 }

Here is the call graph for this function:

void Manipulator::setComponentPoseFromWorld ( Name  component_name,
Pose  pose_to_world 
)

setComponentPoseFromWorld

Parameters
component_name
pose_to_world

Definition at line 302 of file robotis_manipulator_common.cpp.

303 {
304  if (component_.find(component_name) != component_.end())
305  {
306  component_.at(component_name).pose_from_world = pose_to_world;
307  }
308  else
309  {
310  log::error("[setComponentPoseFromWorld] Wrong name.");
311  }
312 }

Here is the call graph for this function:

void Manipulator::setComponentPositionFromWorld ( Name  component_name,
Eigen::Vector3d  position_to_world 
)

setComponentPositionFromWorld

Parameters
component_name
position_to_world

Definition at line 326 of file robotis_manipulator_common.cpp.

327 {
328  if (component_.find(component_name) != component_.end())
329  {
330  component_.at(component_name).pose_from_world.kinematic.position = position_to_world;
331  }
332  else
333  {
334  log::error("[setComponentPositionFromWorld] Wrong name.");
335  }
336 }

Here is the call graph for this function:

void Manipulator::setJointAcceleration ( Name  name,
double  acceleration 
)

setJointAcceleration

Parameters
name
acceleration

Definition at line 372 of file robotis_manipulator_common.cpp.

373 {
374  component_.at(component_name).joint_value.acceleration = acceleration;
375 }
void Manipulator::setJointEffort ( Name  name,
double  effort 
)

setJointEffort

Parameters
name
effort

Definition at line 377 of file robotis_manipulator_common.cpp.

378 {
379  component_.at(component_name).joint_value.effort = effort;
380 }
void Manipulator::setJointPosition ( Name  name,
double  position 
)

setJointPosition

Parameters
name
position

Definition at line 362 of file robotis_manipulator_common.cpp.

363 {
364  component_.at(component_name).joint_value.position = position;
365 }
void Manipulator::setJointValue ( Name  name,
JointValue  joint_value 
)

setJointValue

Parameters
name
joint_value

Definition at line 382 of file robotis_manipulator_common.cpp.

383 {
384  component_.at(component_name).joint_value = joint_value;
385 }

Here is the caller graph for this function:

void Manipulator::setJointVelocity ( Name  name,
double  velocity 
)

setJointVelocity

Parameters
name
velocity

Definition at line 367 of file robotis_manipulator_common.cpp.

368 {
369  component_.at(component_name).joint_value.velocity = velocity;
370 }
void Manipulator::setWorldAngularAcceleration ( Eigen::Vector3d  world_angular_acceleration)

setWorldAngularAcceleration

Parameters
world_angular_acceleration

Definition at line 287 of file robotis_manipulator_common.cpp.

void Manipulator::setWorldAngularVelocity ( Eigen::Vector3d  world_angular_velocity)

setWorldAngularVelocity

Parameters
world_angular_velocity

Definition at line 277 of file robotis_manipulator_common.cpp.

void Manipulator::setWorldDynamicPose ( DynamicPose  world_dynamic_pose)

setWorldDynamicPose

Parameters
world_dynamic_pose

Definition at line 267 of file robotis_manipulator_common.cpp.

void Manipulator::setWorldKinematicPose ( KinematicPose  world_kinematic_pose)

setWorldKinematicPose

Parameters
world_kinematic_pose

Definition at line 252 of file robotis_manipulator_common.cpp.

void Manipulator::setWorldLinearAcceleration ( Eigen::Vector3d  world_linear_acceleration)

setWorldLinearAcceleration

Parameters
world_linear_acceleration

Definition at line 282 of file robotis_manipulator_common.cpp.

void Manipulator::setWorldLinearVelocity ( Eigen::Vector3d  world_linear_velocity)

setWorldLinearVelocity

Parameters
world_linear_velocity

Definition at line 272 of file robotis_manipulator_common.cpp.

void Manipulator::setWorldOrientation ( Eigen::Matrix3d  world_orientation)

setWorldOrientation

Parameters
world_orientation

Definition at line 262 of file robotis_manipulator_common.cpp.

void Manipulator::setWorldPose ( Pose  world_pose)

setWorldPose

Parameters
world_pose

Definition at line 247 of file robotis_manipulator_common.cpp.

void Manipulator::setWorldPosition ( Eigen::Vector3d  world_position)

setWorldPosition

Parameters
world_position

Definition at line 257 of file robotis_manipulator_common.cpp.

Member Data Documentation

std::map<Name, Component> robotis_manipulator::Manipulator::component_
private

Definition at line 188 of file robotis_manipulator_common.h.

int8_t robotis_manipulator::Manipulator::dof_
private

Definition at line 186 of file robotis_manipulator_common.h.

World robotis_manipulator::Manipulator::world_
private

Definition at line 187 of file robotis_manipulator_common.h.


The documentation for this class was generated from the following files: