Robotis Manipulator  1.0.0
robotis_manipulator::RobotisManipulator Class Reference

The RobotisManipulator class. More...

#include <robotis_manipulator.h>

Collaboration diagram for robotis_manipulator::RobotisManipulator:
Collaboration graph

Public Member Functions

 RobotisManipulator ()
 
virtual ~RobotisManipulator ()
 
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 addKinematics (Kinematics *kinematics)
 addKinematics More...
 
void addJointActuator (Name actuator_name, JointActuator *joint_actuator, std::vector< uint8_t > id_array, const void *arg)
 addJointActuator More...
 
void addToolActuator (Name tool_name, ToolActuator *tool_actuator, uint8_t id, const void *arg)
 addToolActuator More...
 
void addCustomTrajectory (Name trajectory_name, CustomJointTrajectory *custom_trajectory)
 addCustomTrajectory More...
 
void addCustomTrajectory (Name trajectory_name, CustomTaskTrajectory *custom_trajectory)
 addCustomTrajectory More...
 
ManipulatorgetManipulator ()
 getManipulator More...
 
JointValue getJointValue (Name joint_name)
 getJointValue More...
 
JointValue getToolValue (Name tool_name)
 getToolValue More...
 
std::vector< JointValuegetAllActiveJointValue ()
 getAllActiveJointValue More...
 
std::vector< JointValuegetAllJointValue ()
 getAllJointValue More...
 
std::vector< double > getAllToolPosition ()
 getAllToolPosition More...
 
std::vector< JointValuegetAllToolValue ()
 getAllToolValue More...
 
KinematicPose getKinematicPose (Name component_name)
 getKinematicPose More...
 
DynamicPose getDynamicPose (Name component_name)
 getDynamicPose More...
 
Pose getPose (Name component_name)
 getPose More...
 
Eigen::MatrixXd jacobian (Name tool_name)
 jacobian More...
 
void solveForwardKinematics ()
 solveForwardKinematics More...
 
bool solveInverseKinematics (Name tool_name, Pose goal_pose, std::vector< JointValue > *goal_joint_value)
 solveInverseKinematics More...
 
void setKinematicsOption (const void *arg)
 setKinematicsOption More...
 
void setJointActuatorMode (Name actuator_name, std::vector< uint8_t > id_array, const void *arg)
 setJointActuatorMode More...
 
void setToolActuatorMode (Name actuator_name, const void *arg)
 setToolActuatorMode More...
 
std::vector< uint8_t > getJointActuatorId (Name actuator_name)
 getJointActuatorId More...
 
uint8_t getToolActuatorId (Name actuator_name)
 getToolActuatorId More...
 
void enableActuator (Name actuator_name)
 enableActuator More...
 
void disableActuator (Name actuator_name)
 disableActuator More...
 
void enableAllJointActuator ()
 enableAllJointActuator More...
 
void disableAllJointActuator ()
 disableAllJointActuator More...
 
void enableAllToolActuator ()
 enableAllToolActuator More...
 
void disableAllToolActuator ()
 disableAllToolActuator More...
 
void enableAllActuator ()
 enableAllActuator More...
 
void disableAllActuator ()
 disableAllActuator More...
 
bool getActuatorEnabledState (Name actuator_name)
 getActuatorEnabledState More...
 
bool sendJointActuatorValue (Name joint_component_name, JointValue value)
 sendJointActuatorValue More...
 
bool sendMultipleJointActuatorValue (std::vector< Name > joint_component_name, std::vector< JointValue > value_vector)
 sendMultipleJointActuatorValue More...
 
bool sendAllJointActuatorValue (std::vector< JointValue > value_vector)
 sendAllJointActuatorValue More...
 
JointValue receiveJointActuatorValue (Name joint_component_name)
 receiveJointActuatorValue More...
 
std::vector< JointValuereceiveMultipleJointActuatorValue (std::vector< Name > joint_component_name)
 receiveMultipleJointActuatorValue More...
 
std::vector< JointValuereceiveAllJointActuatorValue ()
 receiveAllJointActuatorValue More...
 
bool sendToolActuatorValue (Name tool_component_name, JointValue value)
 sendToolActuatorValue More...
 
bool sendMultipleToolActuatorValue (std::vector< Name > tool_component_name, std::vector< JointValue > value_vector)
 sendMultipleToolActuatorValue More...
 
bool sendAllToolActuatorValue (std::vector< JointValue > value_vector)
 sendAllToolActuatorValue More...
 
JointValue receiveToolActuatorValue (Name tool_component_name)
 receiveToolActuatorValue More...
 
std::vector< JointValuereceiveMultipleToolActuatorValue (std::vector< Name > tool_component_name)
 receiveMultipleToolActuatorValue More...
 
std::vector< JointValuereceiveAllToolActuatorValue ()
 receiveAllToolActuatorValue More...
 
double getTrajectoryMoveTime ()
 getTrajectoryMoveTime More...
 
bool getMovingState ()
 getMovingState More...
 
bool checkJointLimit (Name component_name, double position)
 checkJointLimit More...
 
bool checkJointLimit (Name component_name, JointValue value)
 checkJointLimit More...
 
bool checkJointLimit (std::vector< Name > component_name, std::vector< double > position_vector)
 checkJointLimit More...
 
bool checkJointLimit (std::vector< Name > component_name, std::vector< JointValue > value_vector)
 checkJointLimit More...
 
TrajectorygetTrajectory ()
 getTrajectory More...
 
void makeJointTrajectoryFromPresentPosition (std::vector< double > delta_goal_joint_position, double move_time, std::vector< JointValue > present_joint_value={})
 makeJointTrajectoryFromPresentPosition More...
 
void makeJointTrajectory (std::vector< double > goal_joint_position, double move_time, std::vector< JointValue > present_joint_value={})
 makeJointTrajectory More...
 
void makeJointTrajectory (std::vector< JointValue > goal_joint_value, double move_time, std::vector< JointValue > present_joint_value={})
 makeJointTrajectory More...
 
void makeJointTrajectory (Name tool_name, Eigen::Vector3d goal_position, double move_time, std::vector< JointValue > present_joint_value={})
 makeJointTrajectory More...
 
void makeJointTrajectory (Name tool_name, Eigen::Matrix3d goal_orientation, double move_time, std::vector< JointValue > present_joint_value={})
 makeJointTrajectory More...
 
void makeJointTrajectory (Name tool_name, KinematicPose goal_pose, double move_time, std::vector< JointValue > present_joint_value={})
 makeJointTrajectory More...
 
void makeTaskTrajectoryFromPresentPose (Name tool_name, Eigen::Vector3d position_meter, double move_time, std::vector< JointValue > present_joint_value={})
 makeTaskTrajectoryFromPresentPose More...
 
void makeTaskTrajectoryFromPresentPose (Name tool_name, Eigen::Matrix3d orientation_meter, double move_time, std::vector< JointValue > present_joint_value={})
 makeTaskTrajectoryFromPresentPose More...
 
void makeTaskTrajectoryFromPresentPose (Name tool_name, KinematicPose goal_pose_delta, double move_time, std::vector< JointValue > present_joint_value={})
 makeTaskTrajectoryFromPresentPose More...
 
void makeTaskTrajectory (Name tool_name, Eigen::Vector3d goal_position, double move_time, std::vector< JointValue > present_joint_value={})
 makeTaskTrajectory More...
 
void makeTaskTrajectory (Name tool_name, Eigen::Matrix3d goal_orientation, double move_time, std::vector< JointValue > present_joint_value={})
 makeTaskTrajectory More...
 
void makeTaskTrajectory (Name tool_name, KinematicPose goal_pose, double move_time, std::vector< JointValue > present_joint_value={})
 makeTaskTrajectory More...
 
void setCustomTrajectoryOption (Name trajectory_name, const void *arg)
 setCustomTrajectoryOption More...
 
void makeCustomTrajectory (Name trajectory_name, Name tool_name, const void *arg, double move_time, std::vector< JointValue > present_joint_value={})
 makeCustomTrajectory More...
 
void makeCustomTrajectory (Name trajectory_name, const void *arg, double move_time, std::vector< JointValue > present_joint_value={})
 makeCustomTrajectory More...
 
void sleepTrajectory (double wait_time, std::vector< JointValue > present_joint_value={})
 sleepTrajectory More...
 
void makeToolTrajectory (Name tool_name, double tool_goal_position)
 makeToolTrajectory More...
 
std::vector< JointValuegetJointGoalValueFromTrajectory (double present_time)
 getJointGoalValueFromTrajectory More...
 
std::vector< JointValuegetToolGoalValue ()
 getToolGoalValue More...
 
std::vector< JointValuegetJointGoalValueFromTrajectoryTickTime (double tick_time)
 getJointGoalValueFromTrajectoryTickTime More...
 

Private Member Functions

void startMoving ()
 startMoving More...
 
JointWaypoint getTrajectoryJointValue (double tick_time)
 getTrajectoryJointValue More...
 

Private Attributes

Manipulator manipulator_
 
Trajectory trajectory_
 
Kinematicskinematics_
 
std::map< Name, JointActuator * > joint_actuator_
 
std::map< Name, ToolActuator * > tool_actuator_
 
bool trajectory_initialized_state_
 
bool actuator_added_stete_
 
bool moving_state_
 
bool step_moving_state_
 

Detailed Description

The RobotisManipulator class.

Definition at line 44 of file robotis_manipulator.h.

Constructor & Destructor Documentation

RobotisManipulator::RobotisManipulator ( )
RobotisManipulator::~RobotisManipulator ( )
virtual

Definition at line 41 of file robotis_manipulator.cpp.

41 {}

Member Function Documentation

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

addComponentChild

Parameters
my_name
child_name

Definition at line 76 of file robotis_manipulator.cpp.

77 {
78  manipulator_.addComponentChild(my_name, child_name);
79 }
void addComponentChild(Name my_name, Name child_name)
addComponentChild

Here is the call graph for this function:

void RobotisManipulator::addCustomTrajectory ( Name  trajectory_name,
CustomJointTrajectory custom_trajectory 
)

addCustomTrajectory

Parameters
trajectory_name
custom_trajectory

Definition at line 142 of file robotis_manipulator.cpp.

143 {
144  trajectory_.addCustomTrajectory(trajectory_name, custom_trajectory);
145 }
void addCustomTrajectory(Name trajectory_name, CustomJointTrajectory *custom_trajectory)
addCustomTrajectory

Here is the call graph for this function:

void RobotisManipulator::addCustomTrajectory ( Name  trajectory_name,
CustomTaskTrajectory custom_trajectory 
)

addCustomTrajectory

Parameters
trajectory_name
custom_trajectory

Definition at line 147 of file robotis_manipulator.cpp.

148 {
149  trajectory_.addCustomTrajectory(trajectory_name, custom_trajectory);
150 }
void addCustomTrajectory(Name trajectory_name, CustomJointTrajectory *custom_trajectory)
addCustomTrajectory

Here is the call graph for this function:

void RobotisManipulator::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 56 of file robotis_manipulator.cpp.

69 {
70  manipulator_.addJoint(my_name, parent_name, child_name,
71  relative_position, relative_orientation, axis_of_rotation, joint_actuator_id,
72  max_position_limit, min_position_limit, coefficient, mass,
73  inertia_tensor, center_of_mass);
74 }
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

Here is the call graph for this function:

void RobotisManipulator::addJointActuator ( Name  actuator_name,
JointActuator joint_actuator,
std::vector< uint8_t >  id_array,
const void *  arg 
)

addJointActuator

Parameters
actuator_name
joint_actuator
id_array
arg

Definition at line 109 of file robotis_manipulator.cpp.

110 {
111  joint_actuator_.insert(std::make_pair(actuator_name, joint_actuator));
112  if(joint_actuator_.find(actuator_name) != joint_actuator_.end())
113  {
114  joint_actuator_.at(actuator_name)->init(id_array, arg);
115  }
116  else
117  {
118  //error
119  }
120  for(uint32_t index = 0; index < id_array.size(); index++)
121  {
123  }
124  actuator_added_stete_ = true;
125 }
Name findComponentNameUsingId(int8_t id)
findComponentNameUsingId
void setComponentActuatorName(Name component_name, Name actuator_name)
setComponentActuatorName
std::map< Name, JointActuator * > joint_actuator_

Here is the call graph for this function:

void RobotisManipulator::addKinematics ( Kinematics kinematics)

addKinematics

Parameters
kinematics

Definition at line 104 of file robotis_manipulator.cpp.

105 {
106  kinematics_= kinematics;
107 }
void RobotisManipulator::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 81 of file robotis_manipulator.cpp.

92 {
93  manipulator_.addTool(my_name, parent_name,
94  relative_position, relative_orientation, tool_id,
95  max_position_limit, min_position_limit, coefficient, mass,
96  inertia_tensor, center_of_mass);
97 }
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

Here is the call graph for this function:

void RobotisManipulator::addToolActuator ( Name  tool_name,
ToolActuator tool_actuator,
uint8_t  id,
const void *  arg 
)

addToolActuator

Parameters
tool_name
tool_actuator
id
arg

Definition at line 127 of file robotis_manipulator.cpp.

128 {
129  tool_actuator_.insert(std::make_pair(actuator_name, tool_actuator));
130  if(tool_actuator_.find(actuator_name) != tool_actuator_.end())
131  {
132  tool_actuator_.at(actuator_name)->init(id, arg);
133  }
134  else
135  {
136  //error
137  }
139  actuator_added_stete_ = true;
140 }
Name findComponentNameUsingId(int8_t id)
findComponentNameUsingId
void setComponentActuatorName(Name component_name, Name actuator_name)
setComponentActuatorName
std::map< Name, ToolActuator * > tool_actuator_

Here is the call graph for this function:

void RobotisManipulator::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 48 of file robotis_manipulator.cpp.

52 {
53  manipulator_.addWorld(world_name, child_name, world_position, world_orientation);
54 }
void addWorld(Name world_name, Name child_name, Eigen::Vector3d world_position=Eigen::Vector3d::Zero(), Eigen::Matrix3d world_orientation=Eigen::Matrix3d::Identity())
addWorld

Here is the call graph for this function:

bool RobotisManipulator::checkJointLimit ( Name  component_name,
double  position 
)

checkJointLimit

Parameters
component_name
position
Returns

Definition at line 868 of file robotis_manipulator.cpp.

869 {
870  if(trajectory_.getManipulator()->checkJointLimit(component_name, joint_position))
871  return true;
872  else
873  {
874  log::error("[checkJointLimit] Goal value exceeded limit at " + STRING(component_name) + ".");
875  return false;
876  }
877 }
bool checkJointLimit(Name Component_name, double value)
checkJointLimit
std::string STRING

Here is the call graph for this function:

Here is the caller graph for this function:

bool RobotisManipulator::checkJointLimit ( Name  component_name,
JointValue  value 
)

checkJointLimit

Parameters
component_name
value
Returns

Definition at line 879 of file robotis_manipulator.cpp.

880 {
881  if(trajectory_.getManipulator()->checkJointLimit(component_name, value.position))
882  return true;
883  else
884  {
885  log::error("[checkJointLimit] Goal value exceeded limit at " + STRING(component_name) + ".");
886  return false;
887  }
888 }
bool checkJointLimit(Name Component_name, double value)
checkJointLimit
std::string STRING

Here is the call graph for this function:

bool RobotisManipulator::checkJointLimit ( std::vector< Name component_name,
std::vector< double >  position_vector 
)

checkJointLimit

Parameters
component_name
position_vector
Returns

Definition at line 890 of file robotis_manipulator.cpp.

891 {
892  for(uint32_t index = 0; index < component_name.size(); index++)
893  {
894  if(!trajectory_.getManipulator()->checkJointLimit(component_name.at(index), position_vector.at(index)))
895  {
896  log::error("[checkJointLimit] Goal value exceeded limit at " + STRING(component_name.at(index)) + ".");
897  return false;
898  }
899  }
900  return true;
901 }
bool checkJointLimit(Name Component_name, double value)
checkJointLimit
std::string STRING

Here is the call graph for this function:

bool RobotisManipulator::checkJointLimit ( std::vector< Name component_name,
std::vector< JointValue value_vector 
)

checkJointLimit

Parameters
component_name
value_vector
Returns

Definition at line 903 of file robotis_manipulator.cpp.

904 {
905  for(uint32_t index = 0; index < component_name.size(); index++)
906  {
907  if(!trajectory_.getManipulator()->checkJointLimit(component_name.at(index), value_vector.at(index).position))
908  {
909  log::error("[checkJointLimit] Goal value exceeded limit at " + STRING(component_name.at(index)) + ".");
910  return false;
911  }
912  }
913  return true;
914 }
bool checkJointLimit(Name Component_name, double value)
checkJointLimit
std::string STRING

Here is the call graph for this function:

void RobotisManipulator::disableActuator ( Name  actuator_name)

disableActuator

Parameters
actuator_name

Definition at line 316 of file robotis_manipulator.cpp.

317 {
319  {
320  if(joint_actuator_.find(actuator_name) != joint_actuator_.end())
321  {
322  joint_actuator_.at(actuator_name)->disable();
323  }
324  else if(tool_actuator_.find(actuator_name) != tool_actuator_.end())
325  {
326  tool_actuator_.at(actuator_name)->disable();
327  }
328  else
329  {
330  //error
331  }
332  }
333 }
std::map< Name, ToolActuator * > tool_actuator_
std::map< Name, JointActuator * > joint_actuator_
void RobotisManipulator::disableAllActuator ( )

disableAllActuator

Definition at line 403 of file robotis_manipulator.cpp.

404 {
406  {
407  std::map<Name, JointActuator *>::iterator it_joint_actuator;
408  for(it_joint_actuator = joint_actuator_.begin(); it_joint_actuator != joint_actuator_.end(); it_joint_actuator++)
409  {
410  joint_actuator_.at(it_joint_actuator->first)->disable();
411  }
412  std::map<Name, ToolActuator *>::iterator it_tool_actuator;
413  for(it_tool_actuator = tool_actuator_.begin(); it_tool_actuator != tool_actuator_.end(); it_tool_actuator++)
414  {
415  tool_actuator_.at(it_tool_actuator->first)->disable();
416  }
417  }
418 }
std::map< Name, ToolActuator * > tool_actuator_
std::map< Name, JointActuator * > joint_actuator_
void RobotisManipulator::disableAllJointActuator ( )

disableAllJointActuator

Definition at line 348 of file robotis_manipulator.cpp.

349 {
351  {
352  std::map<Name, JointActuator *>::iterator it_joint_actuator;
353  for(it_joint_actuator = joint_actuator_.begin(); it_joint_actuator != joint_actuator_.end(); it_joint_actuator++)
354  {
355  joint_actuator_.at(it_joint_actuator->first)->disable();
356  }
357  }
358 }
std::map< Name, JointActuator * > joint_actuator_
void RobotisManipulator::disableAllToolActuator ( )

disableAllToolActuator

Definition at line 373 of file robotis_manipulator.cpp.

374 {
376  {
377  std::map<Name, ToolActuator *>::iterator it_tool_actuator;
378  for(it_tool_actuator = tool_actuator_.begin(); it_tool_actuator != tool_actuator_.end(); it_tool_actuator++)
379  {
380  tool_actuator_.at(it_tool_actuator->first)->disable();
381  }
382  }
383 }
std::map< Name, ToolActuator * > tool_actuator_
void RobotisManipulator::enableActuator ( Name  actuator_name)

enableActuator

Parameters
actuator_name

Definition at line 296 of file robotis_manipulator.cpp.

297 {
299  {
300  if(joint_actuator_.find(actuator_name) != joint_actuator_.end())
301  {
302  joint_actuator_.at(actuator_name)->enable();
303  }
304  else if(tool_actuator_.find(actuator_name) != tool_actuator_.end())
305  {
306  tool_actuator_.at(actuator_name)->enable();
307  }
308  else
309  {
310  //error
311  }
312  }
314 }
std::map< Name, ToolActuator * > tool_actuator_
std::map< Name, JointActuator * > joint_actuator_
void RobotisManipulator::enableAllActuator ( )

enableAllActuator

Definition at line 385 of file robotis_manipulator.cpp.

386 {
388  {
389  std::map<Name, JointActuator *>::iterator it_joint_actuator;
390  for(it_joint_actuator = joint_actuator_.begin(); it_joint_actuator != joint_actuator_.end(); it_joint_actuator++)
391  {
392  joint_actuator_.at(it_joint_actuator->first)->enable();
393  }
394  std::map<Name, ToolActuator *>::iterator it_tool_actuator;
395  for(it_tool_actuator = tool_actuator_.begin(); it_tool_actuator != tool_actuator_.end(); it_tool_actuator++)
396  {
397  tool_actuator_.at(it_tool_actuator->first)->enable();
398  }
399  }
401 }
std::map< Name, ToolActuator * > tool_actuator_
std::map< Name, JointActuator * > joint_actuator_
void RobotisManipulator::enableAllJointActuator ( )

enableAllJointActuator

Definition at line 335 of file robotis_manipulator.cpp.

336 {
338  {
339  std::map<Name, JointActuator *>::iterator it_joint_actuator;
340  for(it_joint_actuator = joint_actuator_.begin(); it_joint_actuator != joint_actuator_.end(); it_joint_actuator++)
341  {
342  joint_actuator_.at(it_joint_actuator->first)->enable();
343  }
344  }
346 }
std::map< Name, JointActuator * > joint_actuator_
void RobotisManipulator::enableAllToolActuator ( )

enableAllToolActuator

Definition at line 360 of file robotis_manipulator.cpp.

361 {
363  {
364  std::map<Name, ToolActuator *>::iterator it_tool_actuator;
365  for(it_tool_actuator = tool_actuator_.begin(); it_tool_actuator != tool_actuator_.end(); it_tool_actuator++)
366  {
367  tool_actuator_.at(it_tool_actuator->first)->enable();
368  }
369  }
371 }
std::map< Name, ToolActuator * > tool_actuator_
bool RobotisManipulator::getActuatorEnabledState ( Name  actuator_name)

getActuatorEnabledState

Parameters
actuator_name
Returns

Definition at line 420 of file robotis_manipulator.cpp.

421 {
423  {
424  if(joint_actuator_.find(actuator_name) != joint_actuator_.end())
425  {
426  return joint_actuator_.at(actuator_name)->getEnabledState();
427  }
428  else if(tool_actuator_.find(actuator_name) != tool_actuator_.end())
429  {
430  return tool_actuator_.at(actuator_name)->getEnabledState();
431  }
432  else
433  {
434  return {};
435  }
436  }
437  return {};
438 }
std::map< Name, ToolActuator * > tool_actuator_
std::map< Name, JointActuator * > joint_actuator_
std::vector< JointValue > RobotisManipulator::getAllActiveJointValue ( )

getAllActiveJointValue

Returns

Definition at line 171 of file robotis_manipulator.cpp.

172 {
174 }
std::vector< JointValue > getAllActiveJointValue()
getAllActiveJointValue

Here is the call graph for this function:

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

getAllJointValue

Returns

Definition at line 176 of file robotis_manipulator.cpp.

177 {
179 }
std::vector< JointValue > getAllJointValue()
getAllJointValue

Here is the call graph for this function:

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

getAllToolPosition

Returns

Definition at line 181 of file robotis_manipulator.cpp.

182 {
184 }
std::vector< double > getAllToolPosition()
getAllToolPosition

Here is the call graph for this function:

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

getAllToolValue

Returns

Definition at line 186 of file robotis_manipulator.cpp.

187 {
188  return manipulator_.getAllToolValue();
189 }
std::vector< JointValue > getAllToolValue()
getAllToolValue

Here is the call graph for this function:

DynamicPose RobotisManipulator::getDynamicPose ( Name  component_name)

getDynamicPose

Parameters
component_name
Returns

Definition at line 196 of file robotis_manipulator.cpp.

197 {
198  return manipulator_.getComponentDynamicPoseFromWorld(component_name);
199 }
DynamicPose getComponentDynamicPoseFromWorld(Name component_name)
getComponentDynamicPoseFromWorld

Here is the call graph for this function:

std::vector< uint8_t > RobotisManipulator::getJointActuatorId ( Name  actuator_name)

getJointActuatorId

Parameters
actuator_name
Returns

Definition at line 264 of file robotis_manipulator.cpp.

265 {
267  {
268  if(joint_actuator_.find(actuator_name) != joint_actuator_.end())
269  {
270  return joint_actuator_.at(actuator_name)->getId();
271  }
272  else
273  {
274  //error
275  }
276  }
277  return {};
278 }
std::map< Name, JointActuator * > joint_actuator_
std::vector< JointValue > RobotisManipulator::getJointGoalValueFromTrajectory ( double  present_time)

getJointGoalValueFromTrajectory

Parameters
present_time
Returns

Definition at line 1334 of file robotis_manipulator.cpp.

1335 {
1336  trajectory_.setPresentTime(present_time);
1337 
1339  {
1342  }
1343 
1344  if(moving_state_)
1345  {
1346  step_moving_state_ = false;
1347  JointWaypoint joint_goal_way_point;
1348  double tick_time = trajectory_.getTickTime();
1349 
1350  if(tick_time < trajectory_.getMoveTime())
1351  {
1352  moving_state_ = true;
1353  joint_goal_way_point = getTrajectoryJointValue(tick_time);
1354  }
1355  else
1356  {
1357  moving_state_ = false;
1358  joint_goal_way_point = getTrajectoryJointValue(trajectory_.getMoveTime());
1359  }
1360  step_moving_state_ = true;
1361  return joint_goal_way_point;
1362  }
1363  return {};
1364 }
std::vector< JointValue > JointWaypoint
void initTrajectoryWaypoint(Manipulator actual_manipulator, Kinematics *kinematics)
initTrajectoryWaypoint
JointWaypoint getTrajectoryJointValue(double tick_time)
getTrajectoryJointValue
void setPresentTime(double present_time)
setPresentTime

Here is the call graph for this function:

std::vector< JointValue > RobotisManipulator::getJointGoalValueFromTrajectoryTickTime ( double  tick_time)

getJointGoalValueFromTrajectoryTickTime

Parameters
tick_time
Returns

Definition at line 1366 of file robotis_manipulator.cpp.

1367 {
1369  {
1372  }
1373 
1374  if(moving_state_)
1375  {
1376  step_moving_state_ = false;
1377  JointWaypoint joint_goal_way_point ;
1378  if(tick_time < trajectory_.getMoveTime())
1379  {
1380  moving_state_ = true;
1381  joint_goal_way_point = getTrajectoryJointValue(tick_time);
1382  }
1383  else
1384  {
1385  moving_state_ = false;
1386  joint_goal_way_point = getTrajectoryJointValue(trajectory_.getMoveTime());
1387  }
1388  step_moving_state_ = true;
1389  return joint_goal_way_point;
1390  }
1391  return {};
1392 }
std::vector< JointValue > JointWaypoint
void initTrajectoryWaypoint(Manipulator actual_manipulator, Kinematics *kinematics)
initTrajectoryWaypoint
JointWaypoint getTrajectoryJointValue(double tick_time)
getTrajectoryJointValue

Here is the call graph for this function:

JointValue RobotisManipulator::getJointValue ( Name  joint_name)

getJointValue

Parameters
joint_name
Returns

Definition at line 161 of file robotis_manipulator.cpp.

162 {
163  return manipulator_.getJointValue(joint_name);
164 }
JointValue getJointValue(Name component_name)
getJointValue

Here is the call graph for this function:

KinematicPose RobotisManipulator::getKinematicPose ( Name  component_name)

getKinematicPose

Parameters
component_name
Returns

Definition at line 191 of file robotis_manipulator.cpp.

192 {
193  return manipulator_.getComponentKinematicPoseFromWorld(component_name);
194 }
KinematicPose getComponentKinematicPoseFromWorld(Name component_name)
getComponentKinematicPoseFromWorld

Here is the call graph for this function:

Manipulator * RobotisManipulator::getManipulator ( )

getManipulator

Returns

Definition at line 156 of file robotis_manipulator.cpp.

157 {
158  return &manipulator_;
159 }
bool RobotisManipulator::getMovingState ( )

getMovingState

Returns

Definition at line 859 of file robotis_manipulator.cpp.

Here is the caller graph for this function:

Pose RobotisManipulator::getPose ( Name  component_name)

getPose

Parameters
component_name
Returns

Definition at line 201 of file robotis_manipulator.cpp.

202 {
203  return manipulator_.getComponentPoseFromWorld(component_name);
204 }
Pose getComponentPoseFromWorld(Name component_name)
getComponentPoseFromWorld

Here is the call graph for this function:

uint8_t RobotisManipulator::getToolActuatorId ( Name  actuator_name)

getToolActuatorId

Parameters
actuator_name
Returns

Definition at line 280 of file robotis_manipulator.cpp.

281 {
283  {
284  if(tool_actuator_.find(actuator_name) != tool_actuator_.end())
285  {
286  return tool_actuator_.at(actuator_name)->getId();
287  }
288  else
289  {
290  //error
291  }
292  }
293  return {};
294 }
std::map< Name, ToolActuator * > tool_actuator_
std::vector< JointValue > RobotisManipulator::getToolGoalValue ( )

getToolGoalValue

Returns

Definition at line 1394 of file robotis_manipulator.cpp.

1395 {
1396  std::vector<JointValue> result_vector;
1397  std::vector<Name> tool_component_name = trajectory_.getManipulator()->getAllToolComponentName();
1398  for(uint32_t index =0; index<tool_component_name.size(); index++)
1399  {
1400  result_vector.push_back(trajectory_.getToolGoalValue(tool_component_name.at(index)));
1401  }
1402  return result_vector;
1403 }
JointValue getToolGoalValue(Name tool_name)
getToolGoalValue
std::vector< Name > getAllToolComponentName()
getAllToolComponentName

Here is the call graph for this function:

JointValue RobotisManipulator::getToolValue ( Name  tool_name)

getToolValue

Parameters
tool_name
Returns

Definition at line 166 of file robotis_manipulator.cpp.

167 {
168  return manipulator_.getJointValue(tool_name);
169 }
JointValue getJointValue(Name component_name)
getJointValue

Here is the call graph for this function:

Trajectory * RobotisManipulator::getTrajectory ( )

getTrajectory

Returns

Definition at line 920 of file robotis_manipulator.cpp.

921 {
922  return &trajectory_;
923 }
JointWaypoint RobotisManipulator::getTrajectoryJointValue ( double  tick_time)
private

getTrajectoryJointValue

Parameters
tick_time
Returns

//////////////////////Task Trajectory/////////////////////////

///////////////////Custom Trajectory/////////////////////////

Definition at line 1251 of file robotis_manipulator.cpp.

1252 {
1253  JointWaypoint joint_way_point_value;
1254 
1257  {
1258  joint_way_point_value = trajectory_.getJointTrajectory().getJointWaypoint(tick_time);
1259 
1261  {
1263  moving_state_ = false;
1264  }
1265  }
1270  {
1271  TaskWaypoint task_way_point;
1272  task_way_point = trajectory_.getTaskTrajectory().getTaskWaypoint(tick_time);
1273 
1274  if(kinematics_->solveInverseKinematics(trajectory_.getManipulator(), trajectory_.getPresentControlToolName(), task_way_point, &joint_way_point_value))
1275  {
1277  {
1279  moving_state_ = false;
1280  }
1281  }
1282  else
1283  {
1285  log::error("[TASK_TRAJECTORY] fail to solve IK");
1286  moving_state_ = false;
1287  }
1288  }
1293  {
1294  joint_way_point_value = trajectory_.getCustomJointTrajectory(trajectory_.getPresentCustomTrajectoryName())->getJointWaypoint(tick_time);
1295 
1297  {
1299  moving_state_ = false;
1300  }
1301  }
1303  {
1304  TaskWaypoint task_way_point;
1305  task_way_point = trajectory_.getCustomTaskTrajectory(trajectory_.getPresentCustomTrajectoryName())->getTaskWaypoint(tick_time);
1306 
1307  if(kinematics_->solveInverseKinematics(trajectory_.getManipulator(), trajectory_.getPresentControlToolName(), task_way_point, &joint_way_point_value))
1308  {
1310  {
1312  moving_state_ = false;
1313  }
1314  }
1315  else
1316  {
1318  log::error("[CUSTOM_TASK_TRAJECTORY] fail to solve IK");
1319  moving_state_ = false;
1320  }
1321  }
1323  //set present joint task value to trajectory manipulator
1324  trajectory_.setPresentJointWaypoint(joint_way_point_value);
1326 
1327 // Eigen::Vector3d print_temp = trajectory_.getManipulator()->getComponentDynamicPoseFromWorld("gripper").angular.velocity;
1328 // log::PRINT("ang vel");
1329 // log::PRINT_VECTOR(print_temp);
1330 
1331  return joint_way_point_value;
1332 }
CustomTaskTrajectory * getCustomTaskTrajectory(Name name)
getCustomTaskTrajectory
TaskWaypoint getTaskWaypoint(double tick)
getTaskWaypoint
std::vector< Name > getAllActiveJointComponentName()
getAllActiveJointComponentName
virtual bool solveInverseKinematics(Manipulator *manipulator, Name tool_name, Pose target_pose, std::vector< JointValue > *goal_joint_position)=0
solveInverseKinematics
std::vector< JointValue > JointWaypoint
JointWaypoint getPresentJointWaypoint()
getPresentJointWaypoint
void setPresentJointWaypoint(JointWaypoint joint_value_vector)
setPresentJointWaypoint
void updatePresentWaypoint(Kinematics *kinematics)
updatePresentWaypoint
bool checkJointLimit(Name component_name, double position)
checkJointLimit
bool checkTrajectoryType(TrajectoryType trajectory_type)
checkTrajectoryType
JointWaypoint getJointWaypoint(double tick)
getJointWaypoint
JointWaypoint removeWaypointDynamicData(JointWaypoint value)
removeWaypointDynamicData
JointTrajectory getJointTrajectory()
getJointTrajectory
Name getPresentCustomTrajectoryName()
getPresentCustomTrajectoryName
CustomJointTrajectory * getCustomJointTrajectory(Name name)
getCustomJointTrajectory

Here is the call graph for this function:

Here is the caller graph for this function:

double RobotisManipulator::getTrajectoryMoveTime ( )

getTrajectoryMoveTime

Returns

Definition at line 854 of file robotis_manipulator.cpp.

Here is the call graph for this function:

Eigen::MatrixXd RobotisManipulator::jacobian ( Name  tool_name)

jacobian

Parameters
tool_name
Returns

Definition at line 210 of file robotis_manipulator.cpp.

211 {
212  return kinematics_->jacobian(&manipulator_, tool_name);
213 }
virtual Eigen::MatrixXd jacobian(Manipulator *manipulator, Name tool_name)=0
jacobian

Here is the call graph for this function:

void RobotisManipulator::makeCustomTrajectory ( Name  trajectory_name,
Name  tool_name,
const void *  arg,
double  move_time,
std::vector< JointValue present_joint_value = {} 
)

makeCustomTrajectory

Parameters
trajectory_name
tool_name
arg
move_time
present_joint_value

Definition at line 1166 of file robotis_manipulator.cpp.

1167 {
1170  trajectory_.setMoveTime(move_time);
1171 
1172  if(present_joint_value.size() != 0)
1173  {
1174  trajectory_.setPresentJointWaypoint(present_joint_value);
1176  }
1177 
1178  TaskWaypoint present_task_way_point = trajectory_.getPresentTaskWaypoint(tool_name);
1179 
1180  if(getMovingState())
1181  {
1182  moving_state_=false;
1183  while(!step_moving_state_) ;
1184  }
1185  trajectory_.makeCustomTrajectory(trajectory_name, present_task_way_point, arg);
1186  startMoving();
1187 }
void setPresentControlToolName(Name present_control_tool_name)
setPresentControlToolName
TaskWaypoint getPresentTaskWaypoint(Name tool_name)
getPresentTaskWaypoint
void makeCustomTrajectory(Name trajectory_name, JointWaypoint start_way_point, const void *arg)
makeCustomTrajectory
void setPresentJointWaypoint(JointWaypoint joint_value_vector)
setPresentJointWaypoint
void updatePresentWaypoint(Kinematics *kinematics)
updatePresentWaypoint
void setTrajectoryType(TrajectoryType trajectory_type)
setTrajectoryType

Here is the call graph for this function:

void RobotisManipulator::makeCustomTrajectory ( Name  trajectory_name,
const void *  arg,
double  move_time,
std::vector< JointValue present_joint_value = {} 
)

makeCustomTrajectory

Parameters
trajectory_name
arg
move_time
present_joint_value

Definition at line 1189 of file robotis_manipulator.cpp.

1190 {
1192  trajectory_.setMoveTime(move_time);
1193 
1194  if(present_joint_value.size() != 0)
1195  {
1196  trajectory_.setPresentJointWaypoint(present_joint_value);
1198  }
1199 
1200  JointWaypoint present_joint_way_point = trajectory_.getPresentJointWaypoint();
1201 
1202  if(getMovingState())
1203  {
1204  moving_state_=false;
1205  while(!step_moving_state_) ;
1206  }
1207  trajectory_.makeCustomTrajectory(trajectory_name, present_joint_way_point, arg);
1208  startMoving();
1209 }
void makeCustomTrajectory(Name trajectory_name, JointWaypoint start_way_point, const void *arg)
makeCustomTrajectory
std::vector< JointValue > JointWaypoint
JointWaypoint getPresentJointWaypoint()
getPresentJointWaypoint
void setPresentJointWaypoint(JointWaypoint joint_value_vector)
setPresentJointWaypoint
void updatePresentWaypoint(Kinematics *kinematics)
updatePresentWaypoint
void setTrajectoryType(TrajectoryType trajectory_type)
setTrajectoryType

Here is the call graph for this function:

void RobotisManipulator::makeJointTrajectory ( std::vector< double >  goal_joint_position,
double  move_time,
std::vector< JointValue present_joint_value = {} 
)

makeJointTrajectory

Parameters
goal_joint_position
move_time
present_joint_value

Definition at line 941 of file robotis_manipulator.cpp.

942 {
944  trajectory_.setMoveTime(move_time);
945 
946  if(present_joint_value.size() != 0)
947  {
948  trajectory_.setPresentJointWaypoint(present_joint_value);
950  }
951 
952  JointWaypoint present_way_point = trajectory_.getPresentJointWaypoint();
953 
954  JointValue goal_way_point_temp;
955  JointWaypoint goal_way_point;
956  for (uint8_t index = 0; index < trajectory_.getManipulator()->getDOF(); index++)
957  {
958  goal_way_point_temp.position = goal_joint_position.at(index);
959  goal_way_point_temp.velocity = 0.0;
960  goal_way_point_temp.acceleration = 0.0;
961  goal_way_point_temp.effort = 0.0;
962 
963  goal_way_point.push_back(goal_way_point_temp);
964  }
965 
966  if(getMovingState())
967  {
968  moving_state_=false;
969  while(!step_moving_state_);
970  }
971  trajectory_.makeJointTrajectory(present_way_point, goal_way_point);
972  startMoving();
973 }
std::vector< JointValue > JointWaypoint
JointWaypoint getPresentJointWaypoint()
getPresentJointWaypoint
void setPresentJointWaypoint(JointWaypoint joint_value_vector)
setPresentJointWaypoint
void updatePresentWaypoint(Kinematics *kinematics)
updatePresentWaypoint
void makeJointTrajectory(JointWaypoint start_way_point, JointWaypoint goal_way_point)
makeJointTrajectory
void setTrajectoryType(TrajectoryType trajectory_type)
setTrajectoryType

Here is the call graph for this function:

Here is the caller graph for this function:

void RobotisManipulator::makeJointTrajectory ( std::vector< JointValue goal_joint_value,
double  move_time,
std::vector< JointValue present_joint_value = {} 
)

makeJointTrajectory

Parameters
goal_joint_value
move_time
present_joint_value

Definition at line 975 of file robotis_manipulator.cpp.

976 {
978  trajectory_.setMoveTime(move_time);
979 
980  if(present_joint_value.size() != 0)
981  {
982  trajectory_.setPresentJointWaypoint(present_joint_value);
984  }
985 
986  JointWaypoint present_way_point = trajectory_.getPresentJointWaypoint();
987 
988  if(getMovingState())
989  {
990  moving_state_=false;
991  while(!step_moving_state_);
992  }
993  trajectory_.makeJointTrajectory(present_way_point, goal_joint_value);
994  startMoving();
995 }
std::vector< JointValue > JointWaypoint
JointWaypoint getPresentJointWaypoint()
getPresentJointWaypoint
void setPresentJointWaypoint(JointWaypoint joint_value_vector)
setPresentJointWaypoint
void updatePresentWaypoint(Kinematics *kinematics)
updatePresentWaypoint
void makeJointTrajectory(JointWaypoint start_way_point, JointWaypoint goal_way_point)
makeJointTrajectory
void setTrajectoryType(TrajectoryType trajectory_type)
setTrajectoryType

Here is the call graph for this function:

void RobotisManipulator::makeJointTrajectory ( Name  tool_name,
Eigen::Vector3d  goal_position,
double  move_time,
std::vector< JointValue present_joint_value = {} 
)

makeJointTrajectory

Parameters
tool_name
goal_position
move_time
present_joint_value

Definition at line 997 of file robotis_manipulator.cpp.

998 {
999  if(present_joint_value.size() != 0)
1000  {
1001  trajectory_.setPresentJointWaypoint(present_joint_value);
1003  }
1004 
1005  KinematicPose goal_pose;
1006 
1007  goal_pose.position = goal_position;
1009  makeJointTrajectory(tool_name, goal_pose, move_time);
1010 }
void makeJointTrajectory(std::vector< double > goal_joint_position, double move_time, std::vector< JointValue > present_joint_value={})
makeJointTrajectory
void setPresentJointWaypoint(JointWaypoint joint_value_vector)
setPresentJointWaypoint
void updatePresentWaypoint(Kinematics *kinematics)
updatePresentWaypoint
Eigen::Matrix3d getComponentOrientationFromWorld(Name component_name)
getComponentOrientationFromWorld

Here is the call graph for this function:

void RobotisManipulator::makeJointTrajectory ( Name  tool_name,
Eigen::Matrix3d  goal_orientation,
double  move_time,
std::vector< JointValue present_joint_value = {} 
)

makeJointTrajectory

Parameters
tool_name
goal_orientation
move_time
present_joint_value

Definition at line 1012 of file robotis_manipulator.cpp.

1013 {
1014  if(present_joint_value.size() != 0)
1015  {
1016  trajectory_.setPresentJointWaypoint(present_joint_value);
1018  }
1019 
1020  KinematicPose goal_pose;
1021 
1023  goal_pose.orientation = goal_orientation;
1024  makeJointTrajectory(tool_name, goal_pose, move_time);
1025 }
void makeJointTrajectory(std::vector< double > goal_joint_position, double move_time, std::vector< JointValue > present_joint_value={})
makeJointTrajectory
void setPresentJointWaypoint(JointWaypoint joint_value_vector)
setPresentJointWaypoint
void updatePresentWaypoint(Kinematics *kinematics)
updatePresentWaypoint
Eigen::Vector3d getComponentPositionFromWorld(Name component_name)
getComponentPositionFromWorld

Here is the call graph for this function:

void RobotisManipulator::makeJointTrajectory ( Name  tool_name,
KinematicPose  goal_pose,
double  move_time,
std::vector< JointValue present_joint_value = {} 
)

makeJointTrajectory

Parameters
tool_name
goal_pose
move_time
present_joint_value

Definition at line 1027 of file robotis_manipulator.cpp.

1028 {
1029  if(present_joint_value.size() != 0)
1030  {
1031  trajectory_.setPresentJointWaypoint(present_joint_value);
1033  }
1034 
1036  trajectory_.setMoveTime(move_time);
1037 
1038  JointWaypoint present_way_point = trajectory_.getPresentJointWaypoint();
1039 
1040  Pose temp_goal_pose;
1041  temp_goal_pose.kinematic = goal_pose;
1042  temp_goal_pose = trajectory_.removeWaypointDynamicData(temp_goal_pose);
1043  std::vector<JointValue> goal_joint_angle;
1044  if(kinematics_->solveInverseKinematics(trajectory_.getManipulator(), tool_name, temp_goal_pose, &goal_joint_angle))
1045  {
1046  if(getMovingState())
1047  {
1048  moving_state_=false;
1049  while(!step_moving_state_) ;
1050  }
1051  trajectory_.makeJointTrajectory(present_way_point, goal_joint_angle);
1052  startMoving();
1053  }
1054  else
1055  log::error("[JOINT_TRAJECTORY] Fail to solve IK");
1056 }
virtual bool solveInverseKinematics(Manipulator *manipulator, Name tool_name, Pose target_pose, std::vector< JointValue > *goal_joint_position)=0
solveInverseKinematics
std::vector< JointValue > JointWaypoint
JointWaypoint getPresentJointWaypoint()
getPresentJointWaypoint
void setPresentJointWaypoint(JointWaypoint joint_value_vector)
setPresentJointWaypoint
void updatePresentWaypoint(Kinematics *kinematics)
updatePresentWaypoint
JointWaypoint removeWaypointDynamicData(JointWaypoint value)
removeWaypointDynamicData
void makeJointTrajectory(JointWaypoint start_way_point, JointWaypoint goal_way_point)
makeJointTrajectory
void setTrajectoryType(TrajectoryType trajectory_type)
setTrajectoryType

Here is the call graph for this function:

void RobotisManipulator::makeJointTrajectoryFromPresentPosition ( std::vector< double >  delta_goal_joint_position,
double  move_time,
std::vector< JointValue present_joint_value = {} 
)

makeJointTrajectoryFromPresentPosition

Parameters
delta_goal_joint_position
move_time
present_joint_value

Definition at line 925 of file robotis_manipulator.cpp.

926 {
927  if(present_joint_value.size() != 0)
928  {
929  trajectory_.setPresentJointWaypoint(present_joint_value);
931  }
932 
933  JointWaypoint present_way_point = trajectory_.getPresentJointWaypoint();
934  std::vector<double> goal_joint_position;
935  for(int i = 0; i < trajectory_.getManipulator()->getDOF(); i ++)
936  goal_joint_position.push_back(present_way_point.at(i).position + delta_goal_joint_position.at(i));
937 
938  makeJointTrajectory(goal_joint_position, move_time);
939 }
std::vector< JointValue > JointWaypoint
JointWaypoint getPresentJointWaypoint()
getPresentJointWaypoint
void makeJointTrajectory(std::vector< double > goal_joint_position, double move_time, std::vector< JointValue > present_joint_value={})
makeJointTrajectory
void setPresentJointWaypoint(JointWaypoint joint_value_vector)
setPresentJointWaypoint
void updatePresentWaypoint(Kinematics *kinematics)
updatePresentWaypoint

Here is the call graph for this function:

void RobotisManipulator::makeTaskTrajectory ( Name  tool_name,
Eigen::Vector3d  goal_position,
double  move_time,
std::vector< JointValue present_joint_value = {} 
)

makeTaskTrajectory

Parameters
tool_name
goal_position
move_time
present_joint_value

Definition at line 1104 of file robotis_manipulator.cpp.

1105 {
1106  if(present_joint_value.size() != 0)
1107  {
1108  trajectory_.setPresentJointWaypoint(present_joint_value);
1110  }
1111 
1112  KinematicPose goal_pose;
1113 
1114  goal_pose.position = goal_position;
1116  makeTaskTrajectory(tool_name, goal_pose, move_time);
1117 }
void setPresentJointWaypoint(JointWaypoint joint_value_vector)
setPresentJointWaypoint
void updatePresentWaypoint(Kinematics *kinematics)
updatePresentWaypoint
Eigen::Matrix3d getComponentOrientationFromWorld(Name component_name)
getComponentOrientationFromWorld
void makeTaskTrajectory(Name tool_name, Eigen::Vector3d goal_position, double move_time, std::vector< JointValue > present_joint_value={})
makeTaskTrajectory

Here is the call graph for this function:

Here is the caller graph for this function:

void RobotisManipulator::makeTaskTrajectory ( Name  tool_name,
Eigen::Matrix3d  goal_orientation,
double  move_time,
std::vector< JointValue present_joint_value = {} 
)

makeTaskTrajectory

Parameters
tool_name
goal_orientation
move_time
present_joint_value

Definition at line 1119 of file robotis_manipulator.cpp.

1120 {
1121  if(present_joint_value.size() != 0)
1122  {
1123  trajectory_.setPresentJointWaypoint(present_joint_value);
1125  }
1126 
1127  KinematicPose goal_pose;
1128 
1130  goal_pose.orientation = goal_orientation;
1131  makeTaskTrajectory(tool_name, goal_pose, move_time);
1132 }
void setPresentJointWaypoint(JointWaypoint joint_value_vector)
setPresentJointWaypoint
void updatePresentWaypoint(Kinematics *kinematics)
updatePresentWaypoint
Eigen::Vector3d getComponentPositionFromWorld(Name component_name)
getComponentPositionFromWorld
void makeTaskTrajectory(Name tool_name, Eigen::Vector3d goal_position, double move_time, std::vector< JointValue > present_joint_value={})
makeTaskTrajectory

Here is the call graph for this function:

void RobotisManipulator::makeTaskTrajectory ( Name  tool_name,
KinematicPose  goal_pose,
double  move_time,
std::vector< JointValue present_joint_value = {} 
)

makeTaskTrajectory

Parameters
tool_name
goal_pose
move_time
present_joint_value

Definition at line 1134 of file robotis_manipulator.cpp.

1135 {
1138  trajectory_.setMoveTime(move_time);
1139 
1140  if(present_joint_value.size() != 0)
1141  {
1142  trajectory_.setPresentJointWaypoint(present_joint_value);
1144  }
1145 
1146  TaskWaypoint present_task_way_point = trajectory_.getPresentTaskWaypoint(tool_name);
1147 
1148  TaskWaypoint goal_task_way_point; //data conversion
1149  goal_task_way_point.kinematic = goal_pose;
1150  goal_task_way_point = trajectory_.removeWaypointDynamicData(goal_task_way_point);
1151 
1152  if(getMovingState())
1153  {
1154  moving_state_=false;
1155  while(!step_moving_state_) ;
1156  }
1157  trajectory_.makeTaskTrajectory(present_task_way_point, goal_task_way_point);
1158  startMoving();
1159 }
void setPresentControlToolName(Name present_control_tool_name)
setPresentControlToolName
TaskWaypoint getPresentTaskWaypoint(Name tool_name)
getPresentTaskWaypoint
void setPresentJointWaypoint(JointWaypoint joint_value_vector)
setPresentJointWaypoint
void updatePresentWaypoint(Kinematics *kinematics)
updatePresentWaypoint
JointWaypoint removeWaypointDynamicData(JointWaypoint value)
removeWaypointDynamicData
void makeTaskTrajectory(TaskWaypoint start_way_point, TaskWaypoint goal_way_point)
makeTaskTrajectory
void setTrajectoryType(TrajectoryType trajectory_type)
setTrajectoryType

Here is the call graph for this function:

void RobotisManipulator::makeTaskTrajectoryFromPresentPose ( Name  tool_name,
Eigen::Vector3d  position_meter,
double  move_time,
std::vector< JointValue present_joint_value = {} 
)

makeTaskTrajectoryFromPresentPose

Parameters
tool_name
position_meter
move_time
present_joint_value

Definition at line 1058 of file robotis_manipulator.cpp.

1059 {
1060  if(present_joint_value.size() != 0)
1061  {
1062  trajectory_.setPresentJointWaypoint(present_joint_value);
1064  }
1065 
1066  KinematicPose goal_pose;
1067 
1068  goal_pose.position = trajectory_.getManipulator()->getComponentPositionFromWorld(tool_name) + position_meter;
1070  makeTaskTrajectory(tool_name, goal_pose, move_time);
1071 }
void setPresentJointWaypoint(JointWaypoint joint_value_vector)
setPresentJointWaypoint
void updatePresentWaypoint(Kinematics *kinematics)
updatePresentWaypoint
Eigen::Vector3d getComponentPositionFromWorld(Name component_name)
getComponentPositionFromWorld
Eigen::Matrix3d getComponentOrientationFromWorld(Name component_name)
getComponentOrientationFromWorld
void makeTaskTrajectory(Name tool_name, Eigen::Vector3d goal_position, double move_time, std::vector< JointValue > present_joint_value={})
makeTaskTrajectory

Here is the call graph for this function:

void RobotisManipulator::makeTaskTrajectoryFromPresentPose ( Name  tool_name,
Eigen::Matrix3d  orientation_meter,
double  move_time,
std::vector< JointValue present_joint_value = {} 
)

makeTaskTrajectoryFromPresentPose

Parameters
tool_name
orientation_meter
move_time
present_joint_value

Definition at line 1073 of file robotis_manipulator.cpp.

1074 {
1075  if(present_joint_value.size() != 0)
1076  {
1077  trajectory_.setPresentJointWaypoint(present_joint_value);
1079  }
1080 
1081  KinematicPose goal_pose;
1082 
1084  goal_pose.orientation = orientation_meter * trajectory_.getManipulator()->getComponentOrientationFromWorld(tool_name);
1085  makeTaskTrajectory(tool_name, goal_pose, move_time);
1086 }
void setPresentJointWaypoint(JointWaypoint joint_value_vector)
setPresentJointWaypoint
void updatePresentWaypoint(Kinematics *kinematics)
updatePresentWaypoint
Eigen::Vector3d getComponentPositionFromWorld(Name component_name)
getComponentPositionFromWorld
Eigen::Matrix3d getComponentOrientationFromWorld(Name component_name)
getComponentOrientationFromWorld
void makeTaskTrajectory(Name tool_name, Eigen::Vector3d goal_position, double move_time, std::vector< JointValue > present_joint_value={})
makeTaskTrajectory

Here is the call graph for this function:

void RobotisManipulator::makeTaskTrajectoryFromPresentPose ( Name  tool_name,
KinematicPose  goal_pose_delta,
double  move_time,
std::vector< JointValue present_joint_value = {} 
)

makeTaskTrajectoryFromPresentPose

Parameters
tool_name
goal_pose_delta
move_time
present_joint_value

Definition at line 1088 of file robotis_manipulator.cpp.

1089 {
1090  if(present_joint_value.size() != 0)
1091  {
1092  trajectory_.setPresentJointWaypoint(present_joint_value);
1094  }
1095 
1096  KinematicPose goal_pose;
1097 
1098  goal_pose.position = trajectory_.getManipulator()->getComponentPositionFromWorld(tool_name) + goal_pose_delta.position;
1099  goal_pose.orientation = goal_pose_delta.orientation * trajectory_.getManipulator()->getComponentOrientationFromWorld(tool_name);
1100  makeTaskTrajectory(tool_name, goal_pose, move_time);
1101 }
void setPresentJointWaypoint(JointWaypoint joint_value_vector)
setPresentJointWaypoint
void updatePresentWaypoint(Kinematics *kinematics)
updatePresentWaypoint
Eigen::Vector3d getComponentPositionFromWorld(Name component_name)
getComponentPositionFromWorld
Eigen::Matrix3d getComponentOrientationFromWorld(Name component_name)
getComponentOrientationFromWorld
void makeTaskTrajectory(Name tool_name, Eigen::Vector3d goal_position, double move_time, std::vector< JointValue > present_joint_value={})
makeTaskTrajectory

Here is the call graph for this function:

void RobotisManipulator::makeToolTrajectory ( Name  tool_name,
double  tool_goal_position 
)

makeToolTrajectory

Parameters
tool_name
tool_goal_position

Definition at line 1235 of file robotis_manipulator.cpp.

1236 {
1237  JointValue tool_value;
1238  tool_value.position = tool_goal_position;
1239  tool_value.velocity = 0.0;
1240  tool_value.acceleration = 0.0;
1241  tool_value.effort =0.0;
1242 
1243  if(checkJointLimit(tool_name, tool_value))
1244  {
1245  trajectory_.setToolGoalValue(tool_name, tool_value);
1246  }
1247 }
void setToolGoalValue(Name tool_name, JointValue tool_goal_value)
setToolGoalValue
bool checkJointLimit(Name component_name, double position)
checkJointLimit

Here is the call graph for this function:

void RobotisManipulator::printManipulatorSetting ( )

printManipulatorSetting

Definition at line 99 of file robotis_manipulator.cpp.

Here is the call graph for this function:

std::vector< JointValue > RobotisManipulator::receiveAllJointActuatorValue ( )

receiveAllJointActuatorValue

Returns

Definition at line 645 of file robotis_manipulator.cpp.

646 {
648  {
649  std::vector<JointValue> get_value_vector;
650  std::vector<uint8_t> get_actuator_id;
651 
652  std::vector<JointValue> single_value_vector;
653  std::vector<uint8_t> single_actuator_id;
654  std::map<Name, JointActuator *>::iterator it_joint_actuator;
655  for(it_joint_actuator = joint_actuator_.begin(); it_joint_actuator != joint_actuator_.end(); it_joint_actuator++)
656  {
657  single_actuator_id = joint_actuator_.at(it_joint_actuator->first)->getId();
658  single_value_vector = joint_actuator_.at(it_joint_actuator->first)->receiveJointActuatorValue(single_actuator_id);
659  for(uint32_t index=0; index < single_actuator_id.size(); index++)
660  {
661  get_actuator_id.push_back(single_actuator_id.at(index));
662  get_value_vector.push_back(single_value_vector.at(index));
663  }
664  }
665 
666  std::map<Name, Component>::iterator it;
667  std::vector<JointValue> result_vector;
668  JointValue result;
669 
670  for (it = manipulator_.getIteratorBegin(); it != manipulator_.getIteratorEnd(); it++)
671  {
672  for(uint32_t index2 = 0; index2 < get_actuator_id.size(); index2++)
673  {
674  if(manipulator_.checkComponentType(it->first,ACTIVE_JOINT_COMPONENT) && manipulator_.getId(it->first) == get_actuator_id.at(index2))
675  {
676  double coefficient = manipulator_.getCoefficient(it->first);
677  result.position = get_value_vector.at(index2).position * coefficient;
678  result.velocity = get_value_vector.at(index2).velocity * coefficient;
679  result.acceleration = get_value_vector.at(index2).acceleration * coefficient;
680  result.effort = get_value_vector.at(index2).effort;
681  manipulator_.setJointValue(it->first, result);
682  result_vector.push_back(result);
683  }
684  }
685  }
686 
687  return result_vector;
688  }
689  return {};
690 }
int8_t getId(Name component_name)
getId
double getCoefficient(Name component_name)
getCoefficient
std::map< Name, Component >::iterator getIteratorEnd()
getIteratorEnd
std::map< Name, Component >::iterator getIteratorBegin()
getIteratorBegin
bool checkComponentType(Name component_name, ComponentType component_type)
checkComponentType
std::map< Name, JointActuator * > joint_actuator_
void setJointValue(Name name, JointValue joint_value)
setJointValue

Here is the call graph for this function:

std::vector< JointValue > RobotisManipulator::receiveAllToolActuatorValue ( )

receiveAllToolActuatorValue

Returns

Definition at line 818 of file robotis_manipulator.cpp.

819 {
821  {
822  std::vector<Name> tool_component_name;
823  tool_component_name = manipulator_.getAllToolComponentName();
824  std::vector<JointValue> result_vector;
825  ActuatorValue result;
826  for (uint32_t index = 0; index < tool_component_name.size(); index++)
827  {
828  result = tool_actuator_.at(manipulator_.getComponentActuatorName(tool_component_name.at(index)))->receiveToolActuatorValue();
829 
830  double coefficient = manipulator_.getCoefficient(tool_component_name.at(index));
831  result.position = result.position * coefficient;
832  result.velocity = result.velocity * coefficient;
833  result.acceleration = result.acceleration * coefficient;
834 
835  manipulator_.setJointValue(tool_component_name.at(index), result);
836  result_vector.push_back(result);
837  }
838  return result_vector;
839  }
840  return {};
841 }
double getCoefficient(Name component_name)
getCoefficient
Name getComponentActuatorName(Name component_name)
getComponentActuatorName
std::map< Name, ToolActuator * > tool_actuator_
std::vector< Name > getAllToolComponentName()
getAllToolComponentName
void setJointValue(Name name, JointValue joint_value)
setJointValue

Here is the call graph for this function:

JointValue RobotisManipulator::receiveJointActuatorValue ( Name  joint_component_name)

receiveJointActuatorValue

Parameters
joint_component_name
Returns

Definition at line 576 of file robotis_manipulator.cpp.

577 {
579  {
580  std::vector<uint8_t> actuator_id;
581  std::vector<JointValue> result;
582 
583  actuator_id.push_back(manipulator_.getId(joint_component_name));
584 
585  result = joint_actuator_.at(manipulator_.getComponentActuatorName(joint_component_name))->receiveJointActuatorValue(actuator_id);
586 
587  double coefficient = manipulator_.getCoefficient(joint_component_name);
588  result.at(0).position = result.at(0).position * coefficient;
589  result.at(0).velocity = result.at(0).velocity * coefficient;
590  result.at(0).acceleration = result.at(0).acceleration * coefficient;
591  result.at(0).effort = result.at(0).effort;
592 
593  manipulator_.setJointValue(joint_component_name, result.at(0));
594  return result.at(0);
595  }
596  return {};
597 }
int8_t getId(Name component_name)
getId
double getCoefficient(Name component_name)
getCoefficient
Name getComponentActuatorName(Name component_name)
getComponentActuatorName
std::map< Name, JointActuator * > joint_actuator_
void setJointValue(Name name, JointValue joint_value)
setJointValue
JointValue receiveJointActuatorValue(Name joint_component_name)
receiveJointActuatorValue

Here is the call graph for this function:

std::vector< JointValue > RobotisManipulator::receiveMultipleJointActuatorValue ( std::vector< Name joint_component_name)

receiveMultipleJointActuatorValue

Parameters
joint_component_name
Returns

Definition at line 599 of file robotis_manipulator.cpp.

600 {
602  {
603  std::vector<JointValue> get_value_vector;
604  std::vector<uint8_t> get_actuator_id;
605 
606  std::vector<JointValue> single_value_vector;
607  std::vector<uint8_t> single_actuator_id;
608  std::map<Name, JointActuator *>::iterator it_joint_actuator;
609  for(it_joint_actuator = joint_actuator_.begin(); it_joint_actuator != joint_actuator_.end(); it_joint_actuator++)
610  {
611  single_actuator_id = joint_actuator_.at(it_joint_actuator->first)->getId();
612  single_value_vector = joint_actuator_.at(it_joint_actuator->first)->receiveJointActuatorValue(single_actuator_id);
613  for(uint32_t index=0; index < single_actuator_id.size(); index++)
614  {
615  get_actuator_id.push_back(single_actuator_id.at(index));
616  get_value_vector.push_back(single_value_vector.at(index));
617  }
618  }
619 
620  std::vector<JointValue> result_vector;
621  JointValue result;
622 
623  for(uint32_t index = 0; index < joint_component_name.size(); index++)
624  {
625  for(uint32_t index2 = 0; index2 < get_actuator_id.size(); index2++)
626  {
627  if(manipulator_.getId(joint_component_name.at(index)) == get_actuator_id.at(index2))
628  {
629  double coefficient = manipulator_.getCoefficient(joint_component_name.at(index));
630  result.position = get_value_vector.at(index2).position * coefficient;
631  result.velocity = get_value_vector.at(index2).velocity * coefficient;
632  result.acceleration = get_value_vector.at(index2).acceleration * coefficient;
633  result.effort = get_value_vector.at(index2).effort;
634  manipulator_.setJointValue(joint_component_name.at(index), result);
635  result_vector.push_back(result);
636  }
637  }
638  }
639 
640  return result_vector;
641  }
642  return {};
643 }
int8_t getId(Name component_name)
getId
double getCoefficient(Name component_name)
getCoefficient
std::map< Name, JointActuator * > joint_actuator_
void setJointValue(Name name, JointValue joint_value)
setJointValue

Here is the call graph for this function:

std::vector< JointValue > RobotisManipulator::receiveMultipleToolActuatorValue ( std::vector< Name tool_component_name)

receiveMultipleToolActuatorValue

Parameters
tool_component_name
Returns

Definition at line 795 of file robotis_manipulator.cpp.

796 {
798  {
799  std::vector<JointValue> result_vector;
800  ActuatorValue result;
801  for (uint32_t index = 0; index < tool_component_name.size(); index++)
802  {
803  result = tool_actuator_.at(manipulator_.getComponentActuatorName(tool_component_name.at(index)))->receiveToolActuatorValue();
804 
805  double coefficient = manipulator_.getCoefficient(tool_component_name.at(index));
806  result.position = result.position * coefficient;
807  result.velocity = result.velocity * coefficient;
808  result.acceleration = result.acceleration * coefficient;
809 
810  manipulator_.setJointValue(tool_component_name.at(index), result);
811  result_vector.push_back(result);
812  }
813  return result_vector;
814  }
815  return {};
816 }
double getCoefficient(Name component_name)
getCoefficient
Name getComponentActuatorName(Name component_name)
getComponentActuatorName
std::map< Name, ToolActuator * > tool_actuator_
void setJointValue(Name name, JointValue joint_value)
setJointValue

Here is the call graph for this function:

JointValue RobotisManipulator::receiveToolActuatorValue ( Name  tool_component_name)

receiveToolActuatorValue

Parameters
tool_component_name
Returns

Definition at line 777 of file robotis_manipulator.cpp.

778 {
780  {
781  JointValue result;
783 
784  double coefficient = manipulator_.getCoefficient(tool_component_name);
785  result.position = result.position * coefficient;
786  result.velocity = result.velocity * coefficient;
787  result.acceleration = result.acceleration * coefficient;
788 
789  manipulator_.setJointValue(tool_component_name, result);
790  return result;
791  }
792  return {};
793 }
double getCoefficient(Name component_name)
getCoefficient
JointValue receiveToolActuatorValue(Name tool_component_name)
receiveToolActuatorValue
Name getComponentActuatorName(Name component_name)
getComponentActuatorName
std::map< Name, ToolActuator * > tool_actuator_
void setJointValue(Name name, JointValue joint_value)
setJointValue

Here is the call graph for this function:

bool RobotisManipulator::sendAllJointActuatorValue ( std::vector< JointValue value_vector)

sendAllJointActuatorValue

Parameters
value_vector
Returns

Definition at line 523 of file robotis_manipulator.cpp.

524 {
525  // trajectory manipulator set
526  // trajectory_.setPresentJointWayPoint(value_vector);
527  // trajectory_.updatePresentWayPoint(kinematics_dynamics_);
528 
530  {
531  std::map<Name, Component>::iterator it;
532  std::vector<int8_t> joint_id;
533  int index = 0;
534  for (it = manipulator_.getIteratorBegin(); it != manipulator_.getIteratorEnd(); it++)
535  {
537  {
538  double coefficient = manipulator_.getCoefficient(it->first);
539  value_vector.at(index).position = value_vector.at(index).position / coefficient;
540  value_vector.at(index).velocity = value_vector.at(index).velocity / coefficient;
541  value_vector.at(index).acceleration = value_vector.at(index).acceleration / coefficient;
542  value_vector.at(index).effort = value_vector.at(index).effort;
543  joint_id.push_back(manipulator_.getId(it->first));
544  index++;
545  }
546  }
547 
548  std::vector<uint8_t> single_actuator_id;
549  std::vector<JointValue> single_value_vector;
550  std::map<Name, JointActuator *>::iterator it_joint_actuator;
551  for(it_joint_actuator = joint_actuator_.begin(); it_joint_actuator != joint_actuator_.end(); it_joint_actuator++)
552  {
553  single_actuator_id = joint_actuator_.at(it_joint_actuator->first)->getId();
554  for(uint32_t index = 0; index < single_actuator_id.size(); index++)
555  {
556  for(uint32_t index2=0; index2 < joint_id.size(); index2++)
557  {
558  if(single_actuator_id.at(index) == joint_id.at(index2))
559  {
560  single_value_vector.push_back(value_vector.at(index2));
561  }
562  }
563  }
564  joint_actuator_.at(it_joint_actuator->first)->sendJointActuatorValue(single_actuator_id, single_value_vector);
565  }
566  return true;
567  }
568  else
569  {
570  //set to manipulator
571  manipulator_.setAllActiveJointValue(value_vector);
572  }
573  return false;
574 }
int8_t getId(Name component_name)
getId
double getCoefficient(Name component_name)
getCoefficient
void setAllActiveJointValue(std::vector< JointValue > joint_value_vector)
setAllActiveJointValue
std::map< Name, Component >::iterator getIteratorEnd()
getIteratorEnd
std::map< Name, Component >::iterator getIteratorBegin()
getIteratorBegin
bool checkComponentType(Name component_name, ComponentType component_type)
checkComponentType
std::map< Name, JointActuator * > joint_actuator_

Here is the call graph for this function:

bool RobotisManipulator::sendAllToolActuatorValue ( std::vector< JointValue value_vector)

sendAllToolActuatorValue

Parameters
value_vector
Returns

Definition at line 748 of file robotis_manipulator.cpp.

749 {
750  // trajectory manipulator set
751  // trajectory_.getManipulator()->setAllToolValue(value_vector);
752 
754  {
755  std::vector<Name> tool_component_name;
756  tool_component_name = manipulator_.getAllToolComponentName();
757  for (uint32_t index = 0; index < tool_component_name.size(); index++)
758  {
759  double coefficient = manipulator_.getCoefficient(tool_component_name.at(index));
760  value_vector.at(index).position = value_vector.at(index).position / coefficient;
761  value_vector.at(index).velocity = value_vector.at(index).velocity / coefficient;
762  value_vector.at(index).acceleration = value_vector.at(index).acceleration / coefficient;
763 
764  if(!tool_actuator_.at(manipulator_.getComponentActuatorName(tool_component_name.at(index)))->sendToolActuatorValue(value_vector.at(index)))
765  return false;
766  }
767  return true;
768  }
769  else
770  {
771  //set to manipualtor
772  manipulator_.setAllToolValue(value_vector);
773  }
774  return false;
775 }
void setAllToolValue(std::vector< JointValue > tool_value_vector)
setAllToolValue
double getCoefficient(Name component_name)
getCoefficient
Name getComponentActuatorName(Name component_name)
getComponentActuatorName
std::map< Name, ToolActuator * > tool_actuator_
std::vector< Name > getAllToolComponentName()
getAllToolComponentName

Here is the call graph for this function:

bool RobotisManipulator::sendJointActuatorValue ( Name  joint_component_name,
JointValue  value 
)

sendJointActuatorValue

Parameters
joint_component_name
value
Returns

Definition at line 440 of file robotis_manipulator.cpp.

441 {
442  // trajectory manipulator set
443  // trajectory_.getManipulator()->setJointValue(joint_component_name,value);
444  // trajectory_.updatePresentWayPoint(kinematics_dynamics_);
445 
447  {
448  double coefficient = manipulator_.getCoefficient(joint_component_name);
449  value.position = value.position / coefficient;
450  value.velocity = value.velocity / coefficient;
451  value.acceleration = value.acceleration / coefficient;
452  value.effort = value.effort;
453 
454  std::vector<uint8_t> id;
455  std::vector<JointValue> value_vector;
456  id.push_back(manipulator_.getId(joint_component_name));
457  value_vector.push_back(value);
458 
459  //send to actuator
460  return joint_actuator_.at(manipulator_.getComponentActuatorName(joint_component_name))->sendJointActuatorValue(id, value_vector);
461  }
462  else
463  {
464  manipulator_.setJointValue(joint_component_name, value);
465  return true;
466  }
467  return false;
468 }
int8_t getId(Name component_name)
getId
double getCoefficient(Name component_name)
getCoefficient
Name getComponentActuatorName(Name component_name)
getComponentActuatorName
std::map< Name, JointActuator * > joint_actuator_
void setJointValue(Name name, JointValue joint_value)
setJointValue
bool sendJointActuatorValue(Name joint_component_name, JointValue value)
sendJointActuatorValue

Here is the call graph for this function:

bool RobotisManipulator::sendMultipleJointActuatorValue ( std::vector< Name joint_component_name,
std::vector< JointValue value_vector 
)

sendMultipleJointActuatorValue

Parameters
joint_component_name
value_vector
Returns

Definition at line 470 of file robotis_manipulator.cpp.

471 {
472  if(joint_component_name.size() != value_vector.size())
473  return false; //error;
474 
475  // trajectory manipulator set
476  // for(uint8_t index = 0; index < joint_component_name.size(); index++)
477  // trajectory_.getManipulator()->setJointValue(joint_component_name.at(index), value_vector.at(index));
478  // trajectory_.updatePresentWayPoint(kinematics_dynamics_);
479 
481  {
482  std::vector<int8_t> joint_id;
483  for(uint32_t index = 0; index < value_vector.size(); index++)
484  {
485  double coefficient = manipulator_.getCoefficient(joint_component_name.at(index));
486  value_vector.at(index).position = value_vector.at(index).position / coefficient;
487  value_vector.at(index).velocity = value_vector.at(index).velocity / coefficient;
488  value_vector.at(index).acceleration = value_vector.at(index).acceleration / coefficient;
489  value_vector.at(index).effort = value_vector.at(index).effort;
490  joint_id.push_back(manipulator_.getId(joint_component_name.at(index)));
491  }
492 
493  std::vector<uint8_t> single_actuator_id;
494  std::vector<JointValue> single_value_vector;
495  std::map<Name, JointActuator *>::iterator it_joint_actuator;
496  for(it_joint_actuator = joint_actuator_.begin(); it_joint_actuator != joint_actuator_.end(); it_joint_actuator++)
497  {
498  single_actuator_id = joint_actuator_.at(it_joint_actuator->first)->getId();
499  for(uint32_t index = 0; index < single_actuator_id.size(); index++)
500  {
501  for(uint32_t index2=0; index2 < joint_id.size(); index2++)
502  {
503  if(single_actuator_id.at(index) == joint_id.at(index2))
504  {
505  single_value_vector.push_back(value_vector.at(index2));
506  }
507  }
508  }
509  joint_actuator_.at(it_joint_actuator->first)->sendJointActuatorValue(single_actuator_id, single_value_vector);
510  }
511  return true;
512  }
513  else
514  {
515  //set to manipulator
516  for(uint8_t index = 0; index < joint_component_name.size(); index++)
517  manipulator_.setJointValue(joint_component_name.at(index), value_vector.at(index));
518  return true;
519  }
520  return false;
521 }
int8_t getId(Name component_name)
getId
double getCoefficient(Name component_name)
getCoefficient
std::map< Name, JointActuator * > joint_actuator_
void setJointValue(Name name, JointValue joint_value)
setJointValue

Here is the call graph for this function:

bool RobotisManipulator::sendMultipleToolActuatorValue ( std::vector< Name tool_component_name,
std::vector< JointValue value_vector 
)

sendMultipleToolActuatorValue

Parameters
tool_component_name
value_vector
Returns

Definition at line 718 of file robotis_manipulator.cpp.

719 {
720  // trajectory manipulator set
721  // for(uint8_t index = 0; index < tool_component_name.size(); index++)
722  // trajectory_.getManipulator()->setJointValue(tool_component_name.at(index), value_vector.at(index));
723 
725  {
726  for (uint32_t index = 0; index < tool_component_name.size(); index++)
727  {
728  double coefficient = manipulator_.getCoefficient(tool_component_name.at(index));
729  value_vector.at(index).position = value_vector.at(index).position / coefficient;
730  value_vector.at(index).velocity = value_vector.at(index).velocity / coefficient;
731  value_vector.at(index).acceleration = value_vector.at(index).acceleration / coefficient;
732 
733  if(!tool_actuator_.at(manipulator_.getComponentActuatorName(tool_component_name.at(index)))->sendToolActuatorValue(value_vector.at(index)))
734  return false;
735  }
736  return true;
737  }
738  else
739  {
740  //set to manipulator
741  for(uint8_t index = 0; index < tool_component_name.size(); index++)
742  manipulator_.setJointValue(tool_component_name.at(index), value_vector.at(index));
743  return true;
744  }
745  return false;
746 }
double getCoefficient(Name component_name)
getCoefficient
Name getComponentActuatorName(Name component_name)
getComponentActuatorName
std::map< Name, ToolActuator * > tool_actuator_
void setJointValue(Name name, JointValue joint_value)
setJointValue

Here is the call graph for this function:

bool RobotisManipulator::sendToolActuatorValue ( Name  tool_component_name,
JointValue  value 
)

sendToolActuatorValue

Parameters
tool_component_name
value
Returns

Definition at line 693 of file robotis_manipulator.cpp.

694 {
695  // trajectory manipulator set
696  // trajectory_.getManipulator()->setJointValue(tool_component_name,value);
697 
699  {
700  double coefficient;
701  coefficient = manipulator_.getCoefficient(tool_component_name);
702  value.position = value.position / coefficient;
703  value.velocity = value.velocity / coefficient;
704  value.acceleration = value.acceleration / coefficient;
705  value.effort = value.effort;
706 
707  return tool_actuator_.at(manipulator_.getComponentActuatorName(tool_component_name))->sendToolActuatorValue(value);
708  }
709  else
710  {
711  //set to manipulator
712  manipulator_.setJointValue(tool_component_name, value);
713  return true;
714  }
715  return false;
716 }
double getCoefficient(Name component_name)
getCoefficient
Name getComponentActuatorName(Name component_name)
getComponentActuatorName
std::map< Name, ToolActuator * > tool_actuator_
bool sendToolActuatorValue(Name tool_component_name, JointValue value)
sendToolActuatorValue
void setJointValue(Name name, JointValue joint_value)
setJointValue

Here is the call graph for this function:

void RobotisManipulator::setCustomTrajectoryOption ( Name  trajectory_name,
const void *  arg 
)

setCustomTrajectoryOption

Parameters
trajectory_name
arg

Definition at line 1161 of file robotis_manipulator.cpp.

1162 {
1163  trajectory_.setCustomTrajectoryOption(trajectory_name, arg);
1164 }
void setCustomTrajectoryOption(Name trajectory_name, const void *arg)
setCustomTrajectoryOption

Here is the call graph for this function:

void RobotisManipulator::setJointActuatorMode ( Name  actuator_name,
std::vector< uint8_t >  id_array,
const void *  arg 
)

setJointActuatorMode

Parameters
actuator_name
id_array
arg

Definition at line 234 of file robotis_manipulator.cpp.

235 {
237  {
238  if(joint_actuator_.find(actuator_name) != joint_actuator_.end())
239  {
240  joint_actuator_.at(actuator_name)->setMode(id_array, arg);
241  }
242  else
243  {
244  robotis_manipulator::log::error("[jointActuatorSetMode] Worng Actuator Name.");
245  }
246  }
247 }
std::map< Name, JointActuator * > joint_actuator_

Here is the call graph for this function:

void RobotisManipulator::setKinematicsOption ( const void *  arg)

setKinematicsOption

Parameters
arg

Definition at line 225 of file robotis_manipulator.cpp.

226 {
227  kinematics_->setOption(arg);
228 }
virtual void setOption(const void *arg)=0
setOption

Here is the call graph for this function:

void RobotisManipulator::setToolActuatorMode ( Name  actuator_name,
const void *  arg 
)

setToolActuatorMode

Parameters
actuator_name
arg

Definition at line 249 of file robotis_manipulator.cpp.

250 {
252  {
253  if(tool_actuator_.find(actuator_name) != tool_actuator_.end())
254  {
255  tool_actuator_.at(actuator_name)->setMode(arg);
256  }
257  else
258  {
259  //error
260  }
261  }
262 }
std::map< Name, ToolActuator * > tool_actuator_
void RobotisManipulator::sleepTrajectory ( double  wait_time,
std::vector< JointValue present_joint_value = {} 
)

sleepTrajectory

Parameters
wait_time
present_joint_value

Definition at line 1211 of file robotis_manipulator.cpp.

1212 {
1214  trajectory_.setMoveTime(wait_time);
1215 
1216  if(present_joint_value.size() != 0)
1217  {
1218  trajectory_.setPresentJointWaypoint(present_joint_value);
1220  }
1221 
1222  JointWaypoint present_joint_way_point = trajectory_.getPresentJointWaypoint();
1223  JointWaypoint goal_way_point_vector = trajectory_.getPresentJointWaypoint();
1224  goal_way_point_vector = trajectory_.removeWaypointDynamicData(goal_way_point_vector);
1225 
1226  if(getMovingState())
1227  {
1228  moving_state_= false;
1229  while(!step_moving_state_) ;
1230  }
1231  trajectory_.makeJointTrajectory(present_joint_way_point, goal_way_point_vector);
1232  startMoving();
1233 }
std::vector< JointValue > JointWaypoint
JointWaypoint getPresentJointWaypoint()
getPresentJointWaypoint
void setPresentJointWaypoint(JointWaypoint joint_value_vector)
setPresentJointWaypoint
void updatePresentWaypoint(Kinematics *kinematics)
updatePresentWaypoint
JointWaypoint removeWaypointDynamicData(JointWaypoint value)
removeWaypointDynamicData
void makeJointTrajectory(JointWaypoint start_way_point, JointWaypoint goal_way_point)
makeJointTrajectory
void setTrajectoryType(TrajectoryType trajectory_type)
setTrajectoryType

Here is the call graph for this function:

void RobotisManipulator::solveForwardKinematics ( )

solveForwardKinematics

Definition at line 215 of file robotis_manipulator.cpp.

216 {
218 }
virtual void solveForwardKinematics(Manipulator *manipulator)=0
solveForwardKinematics

Here is the call graph for this function:

bool RobotisManipulator::solveInverseKinematics ( Name  tool_name,
Pose  goal_pose,
std::vector< JointValue > *  goal_joint_value 
)

solveInverseKinematics

Parameters
tool_name
goal_pose
goal_joint_value
Returns

Definition at line 220 of file robotis_manipulator.cpp.

221 {
222  return kinematics_->solveInverseKinematics(&manipulator_, tool_name, goal_pose, goal_joint_value);
223 }
virtual bool solveInverseKinematics(Manipulator *manipulator, Name tool_name, Pose target_pose, std::vector< JointValue > *goal_joint_position)=0
solveInverseKinematics

Here is the call graph for this function:

void RobotisManipulator::startMoving ( )
private

startMoving

Definition at line 848 of file robotis_manipulator.cpp.

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

bool robotis_manipulator::RobotisManipulator::actuator_added_stete_
private

Definition at line 54 of file robotis_manipulator.h.

std::map<Name, JointActuator *> robotis_manipulator::RobotisManipulator::joint_actuator_
private

Definition at line 50 of file robotis_manipulator.h.

Kinematics* robotis_manipulator::RobotisManipulator::kinematics_
private

Definition at line 49 of file robotis_manipulator.h.

Manipulator robotis_manipulator::RobotisManipulator::manipulator_
private

Definition at line 47 of file robotis_manipulator.h.

bool robotis_manipulator::RobotisManipulator::moving_state_
private

Definition at line 55 of file robotis_manipulator.h.

bool robotis_manipulator::RobotisManipulator::step_moving_state_
private

Definition at line 56 of file robotis_manipulator.h.

std::map<Name, ToolActuator *> robotis_manipulator::RobotisManipulator::tool_actuator_
private

Definition at line 51 of file robotis_manipulator.h.

Trajectory robotis_manipulator::RobotisManipulator::trajectory_
private

Definition at line 48 of file robotis_manipulator.h.

bool robotis_manipulator::RobotisManipulator::trajectory_initialized_state_
private

Definition at line 53 of file robotis_manipulator.h.


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