Robotis Manipulator  1.0.0
robotis_manipulator::Trajectory Class Reference

The Trajectory class. More...

#include <robotis_manipulator_trajectory_generator.h>

Collaboration diagram for robotis_manipulator::Trajectory:
Collaboration graph

Public Member Functions

 Trajectory ()
 
 ~Trajectory ()
 
void setMoveTime (double move_time)
 setMoveTime More...
 
void setPresentTime (double present_time)
 setPresentTime More...
 
void setStartTimeToPresentTime ()
 setStartTimeToPresentTime More...
 
void setStartTime (double start_time)
 setStartTime More...
 
double getMoveTime ()
 getMoveTime More...
 
double getTickTime ()
 getTickTime More...
 
void setManipulator (Manipulator manipulator)
 setManipulator More...
 
ManipulatorgetManipulator ()
 getManipulator More...
 
JointTrajectory getJointTrajectory ()
 getJointTrajectory More...
 
TaskTrajectory getTaskTrajectory ()
 getTaskTrajectory More...
 
CustomJointTrajectorygetCustomJointTrajectory (Name name)
 getCustomJointTrajectory More...
 
CustomTaskTrajectorygetCustomTaskTrajectory (Name name)
 getCustomTaskTrajectory More...
 
void addCustomTrajectory (Name trajectory_name, CustomJointTrajectory *custom_trajectory)
 addCustomTrajectory More...
 
void addCustomTrajectory (Name trajectory_name, CustomTaskTrajectory *custom_trajectory)
 addCustomTrajectory More...
 
void setCustomTrajectoryOption (Name trajectory_name, const void *arg)
 setCustomTrajectoryOption More...
 
void setPresentControlToolName (Name present_control_tool_name)
 setPresentControlToolName More...
 
Name getPresentCustomTrajectoryName ()
 getPresentCustomTrajectoryName More...
 
Name getPresentControlToolName ()
 getPresentControlToolName More...
 
void initTrajectoryWaypoint (Manipulator actual_manipulator, Kinematics *kinematics)
 initTrajectoryWaypoint More...
 
void updatePresentWaypoint (Kinematics *kinematics)
 updatePresentWaypoint More...
 
void setPresentJointWaypoint (JointWaypoint joint_value_vector)
 setPresentJointWaypoint More...
 
void setPresentTaskWaypoint (Name tool_name, TaskWaypoint tool_position_value_vector)
 setPresentTaskWaypoint More...
 
JointWaypoint getPresentJointWaypoint ()
 getPresentJointWaypoint More...
 
TaskWaypoint getPresentTaskWaypoint (Name tool_name)
 getPresentTaskWaypoint More...
 
JointWaypoint removeWaypointDynamicData (JointWaypoint value)
 removeWaypointDynamicData More...
 
TaskWaypoint removeWaypointDynamicData (TaskWaypoint value)
 removeWaypointDynamicData More...
 
void setTrajectoryType (TrajectoryType trajectory_type)
 setTrajectoryType More...
 
bool checkTrajectoryType (TrajectoryType trajectory_type)
 checkTrajectoryType More...
 
void makeJointTrajectory (JointWaypoint start_way_point, JointWaypoint goal_way_point)
 makeJointTrajectory More...
 
void makeTaskTrajectory (TaskWaypoint start_way_point, TaskWaypoint goal_way_point)
 makeTaskTrajectory More...
 
void makeCustomTrajectory (Name trajectory_name, JointWaypoint start_way_point, const void *arg)
 makeCustomTrajectory More...
 
void makeCustomTrajectory (Name trajectory_name, TaskWaypoint start_way_point, const void *arg)
 makeCustomTrajectory More...
 
void setToolGoalPosition (Name tool_name, double tool_goal_position)
 setToolGoalPosition More...
 
void setToolGoalValue (Name tool_name, JointValue tool_goal_value)
 setToolGoalValue More...
 
double getToolGoalPosition (Name tool_name)
 getToolGoalPosition More...
 
JointValue getToolGoalValue (Name tool_name)
 getToolGoalValue More...
 

Private Attributes

TrajectoryType trajectory_type_
 
Time trajectory_time_
 
Manipulator manipulator_
 
JointTrajectory joint_
 
TaskTrajectory task_
 
std::map< Name, CustomJointTrajectory * > cus_joint_
 
std::map< Name, CustomTaskTrajectory * > cus_task_
 
Name present_custom_trajectory_name_
 
Name present_control_tool_name_
 

Detailed Description

The Trajectory class.

Definition at line 158 of file robotis_manipulator_trajectory_generator.h.

Constructor & Destructor Documentation

robotis_manipulator::Trajectory::Trajectory ( )
inline

Definition at line 174 of file robotis_manipulator_trajectory_generator.h.

174 {}
robotis_manipulator::Trajectory::~Trajectory ( )
inline

Definition at line 175 of file robotis_manipulator_trajectory_generator.h.

175 {}

Member Function Documentation

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

addCustomTrajectory

Parameters
trajectory_name
custom_trajectory

Definition at line 336 of file robotis_manipulator_trajectory_generator.cpp.

337 {
338  cus_joint_.insert(std::make_pair(trajectory_name, custom_trajectory));
339 }
std::map< Name, CustomJointTrajectory * > cus_joint_

Here is the caller graph for this function:

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

addCustomTrajectory

Parameters
trajectory_name
custom_trajectory

Definition at line 341 of file robotis_manipulator_trajectory_generator.cpp.

342 {
343  cus_task_.insert(std::make_pair(trajectory_name, custom_trajectory));
344 }
std::map< Name, CustomTaskTrajectory * > cus_task_
bool Trajectory::checkTrajectoryType ( TrajectoryType  trajectory_type)

checkTrajectoryType

Parameters
trajectory_type
Returns

Definition at line 432 of file robotis_manipulator_trajectory_generator.cpp.

433 {
434  if(trajectory_type_==trajectory_type)
435  return true;
436  else
437  return false;
438 }

Here is the caller graph for this function:

CustomJointTrajectory * Trajectory::getCustomJointTrajectory ( Name  name)

getCustomJointTrajectory

Parameters
name
Returns

Definition at line 326 of file robotis_manipulator_trajectory_generator.cpp.

327 {
328  return cus_joint_.at(name);
329 }
std::map< Name, CustomJointTrajectory * > cus_joint_

Here is the caller graph for this function:

CustomTaskTrajectory * Trajectory::getCustomTaskTrajectory ( Name  name)

getCustomTaskTrajectory

Parameters
name
Returns

Definition at line 331 of file robotis_manipulator_trajectory_generator.cpp.

332 {
333  return cus_task_.at(name);
334 }
std::map< Name, CustomTaskTrajectory * > cus_task_

Here is the caller graph for this function:

JointTrajectory Trajectory::getJointTrajectory ( )

getJointTrajectory

Returns

Definition at line 316 of file robotis_manipulator_trajectory_generator.cpp.

317 {
318  return joint_;
319 }

Here is the caller graph for this function:

Manipulator * Trajectory::getManipulator ( )

getManipulator

Returns

Definition at line 311 of file robotis_manipulator_trajectory_generator.cpp.

Here is the caller graph for this function:

double Trajectory::getMoveTime ( )

getMoveTime

Returns

Definition at line 296 of file robotis_manipulator_trajectory_generator.cpp.

Here is the caller graph for this function:

Name Trajectory::getPresentControlToolName ( )

getPresentControlToolName

Returns

Definition at line 364 of file robotis_manipulator_trajectory_generator.cpp.

Here is the caller graph for this function:

Name Trajectory::getPresentCustomTrajectoryName ( )

getPresentCustomTrajectoryName

Returns

Definition at line 359 of file robotis_manipulator_trajectory_generator.cpp.

Here is the caller graph for this function:

JointWaypoint Trajectory::getPresentJointWaypoint ( )

getPresentJointWaypoint

Returns

Definition at line 395 of file robotis_manipulator_trajectory_generator.cpp.

396 {
398 }
std::vector< JointValue > getAllActiveJointValue()
getAllActiveJointValue

Here is the caller graph for this function:

TaskWaypoint Trajectory::getPresentTaskWaypoint ( Name  tool_name)

getPresentTaskWaypoint

Parameters
tool_name
Returns

Definition at line 400 of file robotis_manipulator_trajectory_generator.cpp.

401 {
402  return manipulator_.getComponentPoseFromWorld(tool_name);
403 }
Pose getComponentPoseFromWorld(Name component_name)
getComponentPoseFromWorld

Here is the caller graph for this function:

TaskTrajectory Trajectory::getTaskTrajectory ( )

getTaskTrajectory

Returns

Definition at line 321 of file robotis_manipulator_trajectory_generator.cpp.

322 {
323  return task_;
324 }

Here is the caller graph for this function:

double Trajectory::getTickTime ( )

getTickTime

Returns

Definition at line 301 of file robotis_manipulator_trajectory_generator.cpp.

Here is the caller graph for this function:

double Trajectory::getToolGoalPosition ( Name  tool_name)

getToolGoalPosition

Parameters
tool_name
Returns

Definition at line 484 of file robotis_manipulator_trajectory_generator.cpp.

485 {
486  return manipulator_.getJointPosition(tool_name);
487 }
double getJointPosition(Name component_name)
getJointPosition
JointValue Trajectory::getToolGoalValue ( Name  tool_name)

getToolGoalValue

Parameters
tool_name
Returns

Definition at line 489 of file robotis_manipulator_trajectory_generator.cpp.

490 {
491  return manipulator_.getJointValue(tool_name);
492 }
JointValue getJointValue(Name component_name)
getJointValue

Here is the caller graph for this function:

void Trajectory::initTrajectoryWaypoint ( Manipulator  actual_manipulator,
Kinematics kinematics 
)

initTrajectoryWaypoint

Parameters
actual_manipulator
kinematics

Definition at line 369 of file robotis_manipulator_trajectory_generator.cpp.

370 {
371  setManipulator(actual_manipulator);
372  JointWaypoint joint_way_point_vector;
373  joint_way_point_vector = getManipulator()->getAllActiveJointValue();
374 
375  setPresentJointWaypoint(joint_way_point_vector);
376  updatePresentWaypoint(kinematics);
377 }
std::vector< JointValue > getAllActiveJointValue()
getAllActiveJointValue
std::vector< JointValue > JointWaypoint
void setPresentJointWaypoint(JointWaypoint joint_value_vector)
setPresentJointWaypoint
void updatePresentWaypoint(Kinematics *kinematics)
updatePresentWaypoint
void setManipulator(Manipulator manipulator)
setManipulator

Here is the caller graph for this function:

void Trajectory::makeCustomTrajectory ( Name  trajectory_name,
JointWaypoint  start_way_point,
const void *  arg 
)

makeCustomTrajectory

Parameters
trajectory_name
start_way_point
arg

Definition at line 450 of file robotis_manipulator_trajectory_generator.cpp.

451 {
452  if(cus_joint_.find(trajectory_name) != cus_joint_.end())
453  {
454  present_custom_trajectory_name_ = trajectory_name;
455  cus_joint_.at(trajectory_name)->makeJointTrajectory(trajectory_time_.total_move_time, start_way_point, arg);
456  }
457  else
458  log::error("[makeCustomTrajectory] Wrong way point type.");
459 }
std::map< Name, CustomJointTrajectory * > cus_joint_

Here is the call graph for this function:

Here is the caller graph for this function:

void Trajectory::makeCustomTrajectory ( Name  trajectory_name,
TaskWaypoint  start_way_point,
const void *  arg 
)

makeCustomTrajectory

Parameters
trajectory_name
start_way_point
arg

Definition at line 461 of file robotis_manipulator_trajectory_generator.cpp.

462 {
463  if(cus_task_.find(trajectory_name) != cus_task_.end())
464  {
465  present_custom_trajectory_name_ = trajectory_name;
466  cus_task_.at(trajectory_name)->makeTaskTrajectory(trajectory_time_.total_move_time, start_way_point, arg);
467  }
468  else
469  log::error("[makeCustomTrajectory] Wrong way point type.");
470 }
std::map< Name, CustomTaskTrajectory * > cus_task_

Here is the call graph for this function:

void Trajectory::makeJointTrajectory ( JointWaypoint  start_way_point,
JointWaypoint  goal_way_point 
)

makeJointTrajectory

Parameters
start_way_point
goal_way_point

Definition at line 440 of file robotis_manipulator_trajectory_generator.cpp.

441 {
442  joint_.makeJointTrajectory(trajectory_time_.total_move_time, start_way_point, goal_way_point);
443 }
void makeJointTrajectory(double move_time, JointWaypoint start, JointWaypoint goal)
makeJointTrajectory

Here is the caller graph for this function:

void Trajectory::makeTaskTrajectory ( TaskWaypoint  start_way_point,
TaskWaypoint  goal_way_point 
)

makeTaskTrajectory

Parameters
start_way_point
goal_way_point

Definition at line 445 of file robotis_manipulator_trajectory_generator.cpp.

446 {
447  task_.makeTaskTrajectory(trajectory_time_.total_move_time, start_way_point, goal_way_point);
448 }
void makeTaskTrajectory(double move_time, TaskWaypoint start, TaskWaypoint goal)
makeTaskTrajectory

Here is the caller graph for this function:

JointWaypoint Trajectory::removeWaypointDynamicData ( JointWaypoint  value)

removeWaypointDynamicData

Parameters
value
Returns

Definition at line 405 of file robotis_manipulator_trajectory_generator.cpp.

406 {
407  for(uint32_t index =0; index < value.size(); index++)
408  {
409  value.at(index).velocity = 0.0;
410  value.at(index).acceleration = 0.0;
411  value.at(index).effort = 0.0;
412  }
413  return value;
414 }

Here is the caller graph for this function:

TaskWaypoint Trajectory::removeWaypointDynamicData ( TaskWaypoint  value)

removeWaypointDynamicData

Parameters
value
Returns

Definition at line 416 of file robotis_manipulator_trajectory_generator.cpp.

417 {
418  value.dynamic.linear.velocity = Eigen::Vector3d::Zero(3);
419  value.dynamic.linear.acceleration = Eigen::Vector3d::Zero(3);
420  value.dynamic.angular.velocity = Eigen::Vector3d::Zero(3);
421  value.dynamic.angular.acceleration = Eigen::Vector3d::Zero(3);
422  return value;
423 }
void Trajectory::setCustomTrajectoryOption ( Name  trajectory_name,
const void *  arg 
)

setCustomTrajectoryOption

Parameters
trajectory_name
arg

Definition at line 346 of file robotis_manipulator_trajectory_generator.cpp.

347 {
348  if(cus_joint_.find(trajectory_name) != cus_joint_.end())
349  cus_joint_.at(trajectory_name)->setOption(arg);
350  else if(cus_task_.find(trajectory_name) != cus_task_.end())
351  cus_task_.at(trajectory_name)->setOption(arg);
352 }
std::map< Name, CustomJointTrajectory * > cus_joint_
std::map< Name, CustomTaskTrajectory * > cus_task_

Here is the caller graph for this function:

void Trajectory::setManipulator ( Manipulator  manipulator)

setManipulator

Parameters
manipulator

Definition at line 306 of file robotis_manipulator_trajectory_generator.cpp.

307 {
308  manipulator_= manipulator;
309 }
void Trajectory::setMoveTime ( double  move_time)

setMoveTime

Parameters
move_time

Definition at line 276 of file robotis_manipulator_trajectory_generator.cpp.

Here is the caller graph for this function:

void Trajectory::setPresentControlToolName ( Name  present_control_tool_name)

setPresentControlToolName

Parameters
present_control_tool_name

Definition at line 354 of file robotis_manipulator_trajectory_generator.cpp.

355 {
356  present_control_tool_name_ = present_control_tool_name;
357 }

Here is the caller graph for this function:

void Trajectory::setPresentJointWaypoint ( JointWaypoint  joint_value_vector)

setPresentJointWaypoint

Parameters
joint_value_vector

Definition at line 385 of file robotis_manipulator_trajectory_generator.cpp.

386 {
387  manipulator_.setAllActiveJointValue(joint_value_vector);
388 }
void setAllActiveJointValue(std::vector< JointValue > joint_value_vector)
setAllActiveJointValue

Here is the caller graph for this function:

void Trajectory::setPresentTaskWaypoint ( Name  tool_name,
TaskWaypoint  tool_position_value_vector 
)

setPresentTaskWaypoint

Parameters
tool_name
tool_position_value_vector

Definition at line 390 of file robotis_manipulator_trajectory_generator.cpp.

391 {
392  manipulator_.setComponentPoseFromWorld(tool_name, tool_value_vector);
393 }
void setComponentPoseFromWorld(Name component_name, Pose pose_to_world)
setComponentPoseFromWorld
void Trajectory::setPresentTime ( double  present_time)

setPresentTime

Parameters
present_time

Definition at line 281 of file robotis_manipulator_trajectory_generator.cpp.

Here is the caller graph for this function:

void Trajectory::setStartTime ( double  start_time)

setStartTime

Parameters
start_time

Definition at line 291 of file robotis_manipulator_trajectory_generator.cpp.

void Trajectory::setStartTimeToPresentTime ( )

setStartTimeToPresentTime

Definition at line 286 of file robotis_manipulator_trajectory_generator.cpp.

Here is the caller graph for this function:

void Trajectory::setToolGoalPosition ( Name  tool_name,
double  tool_goal_position 
)

setToolGoalPosition

Parameters
tool_name
tool_goal_position

Definition at line 473 of file robotis_manipulator_trajectory_generator.cpp.

474 {
475  manipulator_.setJointPosition(tool_name, tool_goal_position);
476 }
void setJointPosition(Name name, double position)
setJointPosition
void Trajectory::setToolGoalValue ( Name  tool_name,
JointValue  tool_goal_value 
)

setToolGoalValue

Parameters
tool_name
tool_goal_value

Definition at line 479 of file robotis_manipulator_trajectory_generator.cpp.

480 {
481  manipulator_.setJointValue(tool_name, tool_goal_value);
482 }
void setJointValue(Name name, JointValue joint_value)
setJointValue

Here is the caller graph for this function:

void Trajectory::setTrajectoryType ( TrajectoryType  trajectory_type)

setTrajectoryType

Parameters
trajectory_type

Definition at line 427 of file robotis_manipulator_trajectory_generator.cpp.

428 {
429  trajectory_type_ = trajectory_type;
430 }

Here is the caller graph for this function:

void Trajectory::updatePresentWaypoint ( Kinematics kinematics)

updatePresentWaypoint

Parameters
kinematics

Definition at line 379 of file robotis_manipulator_trajectory_generator.cpp.

380 {
381  //kinematics
382  kinematics->solveForwardKinematics(&manipulator_);
383 }
virtual void solveForwardKinematics(Manipulator *manipulator)=0
solveForwardKinematics

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

std::map<Name, CustomJointTrajectory *> robotis_manipulator::Trajectory::cus_joint_
private

Definition at line 167 of file robotis_manipulator_trajectory_generator.h.

std::map<Name, CustomTaskTrajectory *> robotis_manipulator::Trajectory::cus_task_
private

Definition at line 168 of file robotis_manipulator_trajectory_generator.h.

JointTrajectory robotis_manipulator::Trajectory::joint_
private

Definition at line 165 of file robotis_manipulator_trajectory_generator.h.

Manipulator robotis_manipulator::Trajectory::manipulator_
private

Definition at line 163 of file robotis_manipulator_trajectory_generator.h.

Name robotis_manipulator::Trajectory::present_control_tool_name_
private

Definition at line 171 of file robotis_manipulator_trajectory_generator.h.

Name robotis_manipulator::Trajectory::present_custom_trajectory_name_
private

Definition at line 170 of file robotis_manipulator_trajectory_generator.h.

TaskTrajectory robotis_manipulator::Trajectory::task_
private

Definition at line 166 of file robotis_manipulator_trajectory_generator.h.

Time robotis_manipulator::Trajectory::trajectory_time_
private

Definition at line 162 of file robotis_manipulator_trajectory_generator.h.

TrajectoryType robotis_manipulator::Trajectory::trajectory_type_
private

Definition at line 161 of file robotis_manipulator_trajectory_generator.h.


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