Robowflex  v0.1
Making MoveIt Easy
robowflex::TrajOptPlanner Class Reference

Robowflex Tesseract TrajOpt Planner. More...

#include <trajopt_planner.h>

+ Inheritance diagram for robowflex::TrajOptPlanner:

Classes

struct  Options
 Options structure with parameter values for TrajOpt planner. More...
 

Public Types

typedef std::pair< bool, bool > PlannerResult
 Planner result: first->converged, second->collision_free. More...
 
- Public Types inherited from robowflex::Planner
using ProgressProperty = std::function< std::string()>
 A function that returns the value of a planner property over the course of a run. More...
 

Public Member Functions

 TrajOptPlanner (const RobotPtr &robot, const std::string &group_name, const std::string &name="trajopt")
 Constructor. More...
 
bool initialize (const std::string &manip)
 Initialize planner. The user must specify a chain group defined in the robot's srdf that contains all the links of the manipulator. More...
 
bool initialize (const std::string &base_link, const std::string &tip_link)
 Initialize planner. All links between base_link and tip_link will be added to the manipulator. More...
 
Set and get TrajOpt parameters
void setInitialTrajectory (const robot_trajectory::RobotTrajectoryPtr &init_trajectory)
 Set initial trajectory for TrajOpt and set init_type to GIVEN_TRAJ. More...
 
void setInitialTrajectory (const trajopt::TrajArray &init_trajectory)
 Set initial trajectory for TrajOpt and set init_type to GIVEN_TRAJ. More...
 
void setInitType (const trajopt::InitInfo::Type &init_type)
 Set type of initialization to use for the trajectory optimization. Current options are: STATIONARY JOINT_INTERPOLATED The user can also provide their own trajectory using setInitialTrajectory(). In such case, there is no need to call setInitType(). More...
 
const robot_trajectory::RobotTrajectoryPtr & getTrajectory () const
 Get the trajectory that resulted in the last call to plan(). More...
 
const trajopt::TrajArray & getTesseractTrajectory () const
 Get the trajectory that resulted in the last call to plan() in Tesseract format. More...
 
const std::vector< std::string > & getEnvironmentLinks () const
 Get the link names in the tesseract KDL environment. More...
 
const std::vector< std::string > & getManipulatorLinks () const
 Get the link names of the env manipulator. More...
 
const std::vector< std::string > & getManipulatorJoints () const
 Get the joint names of the env manipulator. More...
 
double getPlanningTime () const
 Get the time spent by the planner the last time it was called. More...
 
void fixJoints (const std::vector< std::string > &joints)
 Constrain certain joints during optimization to their initial value. More...
 
Planning functions
planning_interface::MotionPlanResponse plan (const SceneConstPtr &scene, const planning_interface::MotionPlanRequest &request) override
 Plan a motion given a request and a scene. More...
 
PlannerResult plan (const SceneConstPtr &scene, const robot_state::RobotStatePtr &start_state, const robot_state::RobotStatePtr &goal_state)
 Plan a motion using a scene from start_state to a goal_state. More...
 
PlannerResult plan (const SceneConstPtr &scene, const robot_state::RobotStatePtr &start_state, const RobotPose &goal_pose, const std::string &link)
 Plan a motion given a start_state, a goal_pose for a link and a scene. More...
 
PlannerResult plan (const SceneConstPtr &scene, const std::unordered_map< std::string, double > &start_state, const RobotPose &goal_pose, const std::string &link)
 Plan a motion given a start_state, a goal_pose for a link and a scene. More...
 
PlannerResult plan (const SceneConstPtr &scene, const RobotPose &start_pose, const std::string &start_link, const RobotPose &goal_pose, const std::string &goal_link)
 Plan a motion given a start_pose for start_link and a goal_pose for goal_link. More...
 
virtual PlannerResult plan (const SceneConstPtr &scene, const robot_state::RobotStatePtr &start_state)
 Plan a motion using custom terms specified by the user. More...
 
std::vector< std::stringgetPlannerConfigs () const override
 Get planner configurations offered by this planner. Any of the configurations returned can be set as the planner for a motion planning query sent to plan(). More...
 
Debugging Options
void setWriteFile (bool file_write_cb, const std::string &file_path="")
 Set whether a report file (for the optimization) should be written or not. More...
 
- Public Member Functions inherited from robowflex::Planner
 Planner (const RobotPtr &robot, const std::string &name="")
 Constructor. Takes in a robot description and an optional namespace name. If name is specified, planner parameters are namespaced under the namespace of robot. More...
 
 Planner (Planner const &)=delete
 
void operator= (Planner const &)=delete
 
virtual std::map< std::string, ProgressPropertygetProgressProperties (const SceneConstPtr &scene, const planning_interface::MotionPlanRequest &request) const
 Retrieve the planner progress property map for this planner given a specific request. More...
 
const RobotPtr getRobot () const
 Return the robot for this planner. More...
 
const std::stringgetName () const
 Get the name of the planner. More...
 
virtual void preRun (const SceneConstPtr &scene, const planning_interface::MotionPlanRequest &request)
 This function is called before benchmarking. More...
 

Public Attributes

struct robowflex::TrajOptPlanner::Options options
 

Protected Member Functions

void problemConstructionInfo (std::shared_ptr< trajopt::ProblemConstructionInfo > pci) const
 Create a TrajOpt problem construction info object with default values. More...
 
void addVelocityCost (std::shared_ptr< trajopt::ProblemConstructionInfo > pci) const
 Add velocity cost to the trajectory optimization. More...
 
void addCollisionAvoidance (std::shared_ptr< trajopt::ProblemConstructionInfo > pci) const
 Add collision avoidance cost to the trajectory optimization for all waypoints. More...
 
void addStartState (const MotionRequestBuilderPtr &request, std::shared_ptr< trajopt::ProblemConstructionInfo > pci)
 Add a (joint) configuration constraint in the first waypoint taken from request. More...
 
void addStartState (const robot_state::RobotStatePtr &start_state, std::shared_ptr< trajopt::ProblemConstructionInfo > pci)
 Add a (joint) configuration constraint start_state in the first waypoint. More...
 
void addStartState (const std::unordered_map< std::string, double > &start_state, std::shared_ptr< trajopt::ProblemConstructionInfo > pci)
 Add a (joint) configuration constraint start_state in the first waypoint. More...
 
void addStartPose (const RobotPose &start_pose, const std::string &link, std::shared_ptr< trajopt::ProblemConstructionInfo > pci) const
 Add a cartesian pose constraint start_pose for link in the first waypoint. More...
 
void addGoalState (const MotionRequestBuilderPtr &request, std::shared_ptr< trajopt::ProblemConstructionInfo > pci) const
 Add a (joint) configuration constraint in the last waypoint taken from request. More...
 
void addGoalState (const robot_state::RobotStatePtr &goal_state, std::shared_ptr< trajopt::ProblemConstructionInfo > pci) const
 Add a (joint) configuration constraint goal_state in the last waypoint. More...
 
void addGoalState (const std::vector< double > goal_state, std::shared_ptr< trajopt::ProblemConstructionInfo > pci) const
 Add a (joint) configuration constraint goal_state in the last waypoint. More...
 
void addGoalPose (const RobotPose &goal_pose, const std::string &link, std::shared_ptr< trajopt::ProblemConstructionInfo > pci) const
 Add a cartesian pose constraint goal_pose for link in the last waypoint. More...
 
PlannerResult solve (const SceneConstPtr &scene, const std::shared_ptr< trajopt::ProblemConstructionInfo > &pci)
 Solve SQP optimization problem. More...
 
sco::BasicTrustRegionSQPParameters getTrustRegionSQPParameters () const
 Get parameters of the SQP. More...
 

Protected Attributes

robot_trajectory::RobotTrajectoryPtr trajectory_
 
trajopt::TrajArray tesseract_trajectory_
 
tesseract::tesseract_ros::KDLEnvPtr env_
 KDL environment. More...
 
std::string group_
 Name of group to plan for. More...
 
std::string manip_
 Name of manipulator chain to check for collisions. More...
 
bool cont_cc_ {true}
 Use continuous collision checking. More...
 
std::shared_ptr< std::ofstreamstream_ptr_
 Debug file stream. More...
 
std::string file_path_
 Path of debug file. More...
 
bool file_write_cb_ {false}
 Whether to write a debug file or not. More...
 
trajopt::InitInfo::Type init_type_ {trajopt::InitInfo::Type::STATIONARY}
 
trajopt::TrajArray initial_trajectory_
 Initial trajectory (if any). More...
 
double time_ {0.0}
 Time taken by the optimizer the last time it was called. More...
 
std::vector< int > fixed_joints_
 
robot_state::RobotStatePtr ref_state_
 Reference state to build moveit trajectory waypoints. More...
 
- Protected Attributes inherited from robowflex::Planner
RobotPtr robot_
 The robot to plan for. More...
 
IO::Handler handler_
 The parameter handler for the planner. More...
 
const std::string name_
 Namespace for the planner. More...
 

Detailed Description

Robowflex Tesseract TrajOpt Planner.

Definition at line 33 of file trajopt_planner.h.

Member Typedef Documentation

◆ PlannerResult

Planner result: first->converged, second->collision_free.

Definition at line 96 of file trajopt_planner.h.

Constructor & Destructor Documentation

◆ TrajOptPlanner()

TrajOptPlanner::TrajOptPlanner ( const RobotPtr robot,
const std::string group_name,
const std::string name = "trajopt" 
)

Constructor.

Parameters
[in]robotRobot to plan for.
[in]group_nameName of the (joint) group to plan for.
[in]nameName of planner.

Definition at line 24 of file trajopt_planner.cpp.

25  : Planner(robot, name), group_(group_name)
26 {
27 }
Planner(const RobotPtr &robot, const std::string &name="")
Constructor. Takes in a robot description and an optional namespace name. If name is specified,...
std::string group_
Name of group to plan for.
Functions for loading and animating robots in Blender.

Member Function Documentation

◆ addCollisionAvoidance()

void TrajOptPlanner::addCollisionAvoidance ( std::shared_ptr< trajopt::ProblemConstructionInfo >  pci) const
protected

Add collision avoidance cost to the trajectory optimization for all waypoints.

Parameters
[out]pciPointer to problem construction info with collision avoidance added.

Definition at line 478 of file trajopt_planner.cpp.

479 {
480  auto collision = std::make_shared<CollisionTermInfo>();
481  collision->name = "collision_cost";
482  collision->term_type = TT_COST;
483  collision->continuous = options.use_cont_col_avoid;
484  collision->first_step = 0;
485  collision->last_step = options.num_waypoints - 1;
486  collision->gap = options.collision_gap;
487  collision->info = createSafetyMarginDataVector(pci->basic_info.n_steps, options.default_safety_margin,
489  pci->cost_infos.push_back(collision);
490 }
struct robowflex::TrajOptPlanner::Options options
bool use_cont_col_avoid
Whether to use continuous collision avoidance or not.
double default_safety_margin
Default safety margin for collision avoidance.
int num_waypoints
Number of waypoints.
double default_safety_margin_coeffs
Coefficients for safety margin.

◆ addGoalPose()

void TrajOptPlanner::addGoalPose ( const RobotPose goal_pose,
const std::string link,
std::shared_ptr< trajopt::ProblemConstructionInfo >  pci 
) const
protected

Add a cartesian pose constraint goal_pose for link in the last waypoint.

Parameters
[in]goal_poseDesired goal cartesian pose of link.
[in]linkLink that will be constrained to be in goal_pose in the last waypoint.
[out]pciPointer to problem construction info with goal pose constraint added.

Definition at line 572 of file trajopt_planner.cpp.

574 {
575  Eigen::Quaterniond rotation(goal_pose.linear());
576  auto pose_constraint = std::make_shared<CartPoseTermInfo>();
577  pose_constraint->term_type = TT_CNT;
578  pose_constraint->link = link;
579  pose_constraint->timestep = options.num_waypoints - 1;
580  pose_constraint->xyz = goal_pose.translation();
581  pose_constraint->wxyz = Eigen::Vector4d(rotation.w(), rotation.x(), rotation.y(), rotation.z());
582  pose_constraint->pos_coeffs = Eigen::Vector3d::Constant(options.pose_cnt_pos_coeffs);
583  pose_constraint->rot_coeffs = Eigen::Vector3d::Constant(options.pose_cnt_rot_coeffs);
584  pose_constraint->name = "goal_pose_cnt_link_" + link;
585  pci->cnt_infos.push_back(pose_constraint);
586 }
double pose_cnt_rot_coeffs
Coefficients for pose constraints (rotation).
double pose_cnt_pos_coeffs
Coefficients for pose constraints (position).

◆ addGoalState() [1/3]

void robowflex::TrajOptPlanner::addGoalState ( const MotionRequestBuilderPtr request,
std::shared_ptr< trajopt::ProblemConstructionInfo >  pci 
) const
protected

Add a (joint) configuration constraint in the last waypoint taken from request.

Parameters
[in]requestRequest motion planning problem.
[out]pciPointer to problem construction info with goal state constraint added.

◆ addGoalState() [2/3]

void robowflex::TrajOptPlanner::addGoalState ( const robot_state::RobotStatePtr &  goal_state,
std::shared_ptr< trajopt::ProblemConstructionInfo >  pci 
) const
protected

Add a (joint) configuration constraint goal_state in the last waypoint.

Parameters
[in]goal_stateDesired robot's goal state.
[out]pciPointer to problem construction info with goal state constraint added.

◆ addGoalState() [3/3]

void robowflex::TrajOptPlanner::addGoalState ( const std::vector< double >  goal_state,
std::shared_ptr< trajopt::ProblemConstructionInfo >  pci 
) const
protected

Add a (joint) configuration constraint goal_state in the last waypoint.

Parameters
[in]goal_stateDesired goal manipulator's joint values.
[out]pciPointer to problem construction info with goal state constraint added.

◆ addStartPose()

void TrajOptPlanner::addStartPose ( const RobotPose start_pose,
const std::string link,
std::shared_ptr< trajopt::ProblemConstructionInfo >  pci 
) const
protected

Add a cartesian pose constraint start_pose for link in the first waypoint.

Parameters
[in]start_poseDesired start cartesian pose of link.
[in]linkLink that will be constrained to be in start_pose in the first waypoint.
[out]pciPointer to problem construction info with start pose constraint added.

Definition at line 519 of file trajopt_planner.cpp.

521 {
522  Eigen::Quaterniond rotation(start_pose.linear());
523  auto pose_constraint = std::make_shared<CartPoseTermInfo>();
524  pose_constraint->term_type = TT_CNT;
525  pose_constraint->link = link;
526  pose_constraint->timestep = 0;
527  pose_constraint->xyz = start_pose.translation();
528  pose_constraint->wxyz = Eigen::Vector4d(rotation.w(), rotation.x(), rotation.y(), rotation.z());
529  pose_constraint->pos_coeffs = Eigen::Vector3d::Constant(options.pose_cnt_pos_coeffs);
530  pose_constraint->rot_coeffs = Eigen::Vector3d::Constant(options.pose_cnt_rot_coeffs);
531  pose_constraint->name = "start_pose_cnt_link_" + link;
532  pci->cnt_infos.push_back(pose_constraint);
533 }

◆ addStartState() [1/3]

void robowflex::TrajOptPlanner::addStartState ( const MotionRequestBuilderPtr request,
std::shared_ptr< trajopt::ProblemConstructionInfo >  pci 
)
protected

Add a (joint) configuration constraint in the first waypoint taken from request.

Parameters
[in]requestRequest motion planning problem.
[out]pciPointer to problem construction info with start state constraint added.

◆ addStartState() [2/3]

void robowflex::TrajOptPlanner::addStartState ( const robot_state::RobotStatePtr &  start_state,
std::shared_ptr< trajopt::ProblemConstructionInfo >  pci 
)
protected

Add a (joint) configuration constraint start_state in the first waypoint.

Parameters
[in]start_stateDesired robot's start state.
[out]pciPointer to problem construction info with start state constraint added.

◆ addStartState() [3/3]

void robowflex::TrajOptPlanner::addStartState ( const std::unordered_map< std::string, double > &  start_state,
std::shared_ptr< trajopt::ProblemConstructionInfo >  pci 
)
protected

Add a (joint) configuration constraint start_state in the first waypoint.

Parameters
[in]start_stateDesired start manipulator's joint names/values.
[out]pciPointer to problem construction info with start state constraint added.

◆ addVelocityCost()

void TrajOptPlanner::addVelocityCost ( std::shared_ptr< trajopt::ProblemConstructionInfo >  pci) const
protected

Add velocity cost to the trajectory optimization.

Parameters
[out]pciPointer to problem construction info with velocity cost added.

Definition at line 465 of file trajopt_planner.cpp.

466 {
467  // Add joint velocity cost (without time) to penalize longer paths.
468  auto jv = std::make_shared<JointVelTermInfo>();
469  jv->targets = std::vector<double>(pci->kin->numJoints(), 0.0);
470  jv->coeffs = std::vector<double>(pci->kin->numJoints(), options.joint_vel_coeffs);
471  jv->term_type = TT_COST;
472  jv->first_step = 0;
473  jv->last_step = options.num_waypoints - 1;
474  jv->name = "joint_velocity_cost";
475  pci->cost_infos.push_back(jv);
476 }
double joint_vel_coeffs
Coefficients for joint_vel costs.

◆ fixJoints()

void TrajOptPlanner::fixJoints ( const std::vector< std::string > &  joints)

Constrain certain joints during optimization to their initial value.

Parameters
[in]jointsVector of joints to freeze.

Definition at line 173 of file trajopt_planner.cpp.

174 {
175  if (!env_->hasManipulator(manip_))
176  throw Exception(1, "There is no loaded manipulator!");
177  else
178  {
179  const auto &joint_names = env_->getManipulator(manip_)->getJointNames();
180  for (const auto &name : joints)
181  {
182  auto it = std::find(joint_names.begin(), joint_names.end(), name);
183  if (it == joint_names.end())
184  throw Exception(1, "One of the joints to be fixed does not exist");
185  else
186  {
187  int index = std::distance(joint_names.begin(), it);
188  fixed_joints_.push_back(index);
189  }
190  }
191  }
192 }
Exception that contains a message and an error code.
Definition: util.h:15
std::string manip_
Name of manipulator chain to check for collisions.
std::vector< int > fixed_joints_
tesseract::tesseract_ros::KDLEnvPtr env_
KDL environment.
T distance(T... args)
T find(T... args)
T push_back(T... args)

◆ getEnvironmentLinks()

const std::vector< std::string > & TrajOptPlanner::getEnvironmentLinks ( ) const

Get the link names in the tesseract KDL environment.

Returns
Name of links in the KDL environment.

Definition at line 144 of file trajopt_planner.cpp.

145 {
146  if (env_->checkInitialized())
147  return env_->getLinkNames();
148  else
149  throw Exception(1, "KDL environment not initialized with robot links!");
150 }

◆ getManipulatorJoints()

const std::vector< std::string > & TrajOptPlanner::getManipulatorJoints ( ) const

Get the joint names of the env manipulator.

Returns
Name of joints in the manipulator.

Definition at line 160 of file trajopt_planner.cpp.

161 {
162  if (env_->hasManipulator(manip_))
163  return env_->getManipulator(manip_)->getJointNames();
164  else
165  throw Exception(1, "There is no loaded manipulator!");
166 }

◆ getManipulatorLinks()

const std::vector< std::string > & TrajOptPlanner::getManipulatorLinks ( ) const

Get the link names of the env manipulator.

Returns
Name of links in the manipulator.

Definition at line 152 of file trajopt_planner.cpp.

153 {
154  if (env_->hasManipulator(manip_))
155  return env_->getManipulator(manip_)->getLinkNames();
156  else
157  throw Exception(1, "There is no loaded manipulator!");
158 }

◆ getPlannerConfigs()

std::vector< std::string > TrajOptPlanner::getPlannerConfigs ( ) const
overridevirtual

Get planner configurations offered by this planner. Any of the configurations returned can be set as the planner for a motion planning query sent to plan().

Returns
A vector of strings of planner configuration names.

Implements robowflex::Planner.

Definition at line 427 of file trajopt_planner.cpp.

428 {
430  config.push_back("trajopt");
431  return config;
432 }

◆ getPlanningTime()

double TrajOptPlanner::getPlanningTime ( ) const

Get the time spent by the planner the last time it was called.

Returns
Planning time.

Definition at line 168 of file trajopt_planner.cpp.

169 {
170  return time_;
171 }
double time_
Time taken by the optimizer the last time it was called.

◆ getTesseractTrajectory()

const trajopt::TrajArray & TrajOptPlanner::getTesseractTrajectory ( ) const

Get the trajectory that resulted in the last call to plan() in Tesseract format.

Returns
Last trajectory computed using plan().

Definition at line 139 of file trajopt_planner.cpp.

140 {
141  return tesseract_trajectory_;
142 }
trajopt::TrajArray tesseract_trajectory_

◆ getTrajectory()

const robot_trajectory::RobotTrajectoryPtr & TrajOptPlanner::getTrajectory ( ) const

Get the trajectory that resulted in the last call to plan().

Returns
Last trajectory computed using plan().

Definition at line 134 of file trajopt_planner.cpp.

135 {
136  return trajectory_;
137 }
robot_trajectory::RobotTrajectoryPtr trajectory_

◆ getTrustRegionSQPParameters()

sco::BasicTrustRegionSQPParameters TrajOptPlanner::getTrustRegionSQPParameters ( ) const
protected

Get parameters of the SQP.

Returns
SQP parameters.

Definition at line 701 of file trajopt_planner.cpp.

702 {
703  sco::BasicTrustRegionSQPParameters params;
704 
705  params.improve_ratio_threshold = options.improve_ratio_threshold;
706  params.min_trust_box_size = options.min_trust_box_size;
707  params.min_approx_improve = options.min_approx_improve;
708  params.min_approx_improve_frac = options.min_approx_improve_frac;
709  params.max_iter = options.max_iter;
710  params.trust_shrink_ratio = options.trust_shrink_ratio;
711  params.trust_expand_ratio = options.trust_expand_ratio;
712  params.cnt_tolerance = options.cnt_tolerance;
713  params.max_merit_coeff_increases = options.max_merit_coeff_increases;
714  params.merit_coeff_increase_ratio = options.merit_coeff_increase_ratio;
715  params.merit_error_coeff = options.merit_error_coeff;
716  params.trust_box_size = options.trust_box_size;
717 
718  return params;
719 }
double merit_coeff_increase_ratio
Ratio that we increate coeff each time.
double max_merit_coeff_increases
Number of times that we jack up penalty coefficient.
double merit_error_coeff
Initial penalty coefficient.
double trust_box_size
Current size of trust region (component-wise).
double max_iter
The max number of iterations.

◆ initialize() [1/2]

bool TrajOptPlanner::initialize ( const std::string base_link,
const std::string tip_link 
)

Initialize planner. All links between base_link and tip_link will be added to the manipulator.

Parameters
[in]base_linkBase link of the manip.
[in]tip_linkTip link of the manip.
Returns
True if initialization succeded.

Definition at line 56 of file trajopt_planner.cpp.

57 {
58  // Save manipulator name.
59  manip_ = "manipulator";
60 
61  // Start KDL environment with the robot information.
62  env_ = std::make_shared<tesseract::tesseract_ros::KDLEnv>();
63 
64  if (!robot_->getModelConst()->hasLinkModel(base_link))
65  {
66  RBX_ERROR("%s does not exist in robot description", base_link);
67  return false;
68  }
69 
70  if (!robot_->getModelConst()->hasLinkModel(tip_link))
71  {
72  RBX_ERROR("%s does not exist in robot description", tip_link);
73  return false;
74  }
75 
76  if (options.verbose)
77  RBX_INFO("Adding manipulator %s from %s to %s", manip_, base_link, tip_link);
78 
79  TiXmlDocument srdf_doc;
80  srdf_doc.Parse(robot_->getSRDFString().c_str());
81 
82  auto *group_element = new TiXmlElement("group");
83  group_element->SetAttribute("name", manip_.c_str());
84  srdf_doc.FirstChildElement("robot")->LinkEndChild(group_element);
85 
86  auto *chain_element = new TiXmlElement("chain");
87  chain_element->SetAttribute("base_link", base_link.c_str());
88  chain_element->SetAttribute("tip_link", tip_link.c_str());
89  group_element->LinkEndChild(chain_element);
90 
91  srdf::ModelSharedPtr srdf;
92  srdf.reset(new srdf::Model());
93  srdf->initXml(*(robot_->getURDF()), &srdf_doc);
94 
95  if (!env_->init(robot_->getURDF(), srdf))
96  {
97  RBX_ERROR("Error loading robot %s", robot_->getName());
98  return false;
99  }
100 
101  // Check if manipulator was correctly loaded.
102  if (!env_->hasManipulator(manip_))
103  {
104  RBX_ERROR("No manipulator found in KDL environment");
105  return false;
106  }
107 
108  // Initialize trajectory.
109  trajectory_ = std::make_shared<robot_trajectory::RobotTrajectory>(robot_->getModelConst(), group_);
110 
111  return true;
112 }
T c_str(T... args)
#define RBX_ERROR(fmt,...)
Output a error logging message.
Definition: log.h:102
#define RBX_INFO(fmt,...)
Output a info logging message.
Definition: log.h:118

◆ initialize() [2/2]

bool TrajOptPlanner::initialize ( const std::string manip)

Initialize planner. The user must specify a chain group defined in the robot's srdf that contains all the links of the manipulator.

Parameters
[in]manipName of chain group with all the links of the manipulator.
Returns
True if initialization succeded.

Definition at line 29 of file trajopt_planner.cpp.

30 {
31  // Save manipulator name.
32  manip_ = manip;
33 
34  // Start KDL environment with the robot information.
35  env_ = std::make_shared<tesseract::tesseract_ros::KDLEnv>();
36 
37  if (!env_->init(robot_->getURDF(), robot_->getSRDF()))
38  {
39  RBX_ERROR("Error loading robot %s", robot_->getName());
40  return false;
41  }
42 
43  // Check if manipulator was correctly loaded.
44  if (!env_->hasManipulator(manip_))
45  {
46  RBX_ERROR("No manipulator found in KDL environment");
47  return false;
48  }
49 
50  // Initialize trajectory.
51  trajectory_ = std::make_shared<robot_trajectory::RobotTrajectory>(robot_->getModelConst(), group_);
52 
53  return true;
54 }

◆ plan() [1/6]

planning_interface::MotionPlanResponse TrajOptPlanner::plan ( const SceneConstPtr scene,
const planning_interface::MotionPlanRequest request 
)
overridevirtual

Plan a motion given a request and a scene.

Parameters
[in]sceneA planning scene to compute the plan in.
[in]requestThe motion planning request to solve.
Returns
The motion planning response generated by the planner.

Implements robowflex::Planner.

Definition at line 195 of file trajopt_planner.cpp.

196 {
198 
199  // Extract start state.
200  auto start_state = robot_->allocState();
201  moveit::core::robotStateMsgToRobotState(request.start_state, *start_state);
202  start_state->update(true);
203 
204  // Use the start state as reference state to build trajectory_.
205  ref_state_ = std::make_shared<robot_state::RobotState>(*start_state);
206 
207  // Extract goal state.
208  auto goal_state = robot_->allocState();
209  if (request.goal_constraints.size() != 1)
210  {
211  RBX_ERROR("Ambiguous goal, %lu goal goal_constraints exist, returning default goal",
212  request.goal_constraints.size());
213  res.error_code_.val = moveit_msgs::MoveItErrorCodes::INVALID_GOAL_CONSTRAINTS;
214  return res;
215  }
216  if (request.goal_constraints[0].joint_constraints.empty())
217  {
218  RBX_ERROR("No joint constraints specified, returning default goal");
219  res.error_code_.val = moveit_msgs::MoveItErrorCodes::INVALID_GOAL_CONSTRAINTS;
220  return res;
221  }
222 
223  std::map<std::string, double> variable_map;
224  for (const auto &joint : request.goal_constraints[0].joint_constraints)
225  variable_map[joint.joint_name] = joint.position;
226 
227  // Start state includes attached objects and values for the non-group links.
228  moveit::core::robotStateMsgToRobotState(request.start_state, *goal_state);
229  goal_state->setVariablePositions(variable_map);
230  goal_state->update(true);
231 
232  // If planner runs until timeout, use the allowed_planning_time from the request.
234  options.max_planning_time = request.allowed_planning_time;
235 
236  // Plan.
237  auto result = plan(scene, start_state, goal_state);
238  res.error_code_.val = moveit_msgs::MoveItErrorCodes::FAILURE;
239  if (result.first and result.second)
240  {
241  res.planning_time_ = time_;
242  res.trajectory_ = trajectory_;
243  res.error_code_.val = moveit_msgs::MoveItErrorCodes::SUCCESS;
244  }
245 
246  return res;
247 }
robot_state::RobotStatePtr ref_state_
Reference state to build moveit trajectory waypoints.
planning_interface::MotionPlanResponse plan(const SceneConstPtr &scene, const planning_interface::MotionPlanRequest &request) override
Plan a motion given a request and a scene.
bool robotStateMsgToRobotState(const Transforms &tf, const moveit_msgs::RobotState &robot_state, RobotState &state, bool copy_attached_bodies=true)
Functions for loading and animating scenes in Blender.
moveit_msgs::MoveItErrorCodes error_code_
robot_trajectory::RobotTrajectoryPtr trajectory_

◆ plan() [2/6]

TrajOptPlanner::PlannerResult TrajOptPlanner::plan ( const SceneConstPtr scene,
const robot_state::RobotStatePtr &  start_state 
)
virtual

Plan a motion using custom terms specified by the user.

Parameters
[in]sceneA planning scene to compute the plan in.
[in]start_stateStart state for the robot.
Returns
Planner result with convergence and collision status.

Reimplemented in CustomTrajOptPlanner.

Definition at line 421 of file trajopt_planner.cpp.

423 {
424  throw Exception(1, "You need to implement virtual method TrajOptPlanner::plan() in your derived class");
425 }

◆ plan() [3/6]

TrajOptPlanner::PlannerResult TrajOptPlanner::plan ( const SceneConstPtr scene,
const robot_state::RobotStatePtr &  start_state,
const robot_state::RobotStatePtr &  goal_state 
)

Plan a motion using a scene from start_state to a goal_state.

Parameters
[in]sceneScene to plan for.
[in]start_stateStart state for the robot.
[in]goal_stateGoal state for the robot.
Returns
Planner result with convergence and collision status.

Definition at line 249 of file trajopt_planner.cpp.

252 {
253  // Create the tesseract environment from the scene.
255  {
256  // Attach bodies to KDL env.
258 
259  // Fill in the problem construction info and initialization.
260  auto pci = std::make_shared<ProblemConstructionInfo>(env_);
262 
263  // Add velocity cost.
264  addVelocityCost(pci);
265 
266  // Add start state.
267  addStartState(start_state, pci);
268 
269  // Add collision costs to all waypoints in the trajectory.
272 
273  // Add goal state.
274  addGoalState(goal_state, pci);
275 
276  return solve(scene, pci);
277  }
278 
279  return PlannerResult(false, false);
280 }
void addGoalState(const MotionRequestBuilderPtr &request, std::shared_ptr< trajopt::ProblemConstructionInfo > pci) const
Add a (joint) configuration constraint in the last waypoint taken from request.
void addCollisionAvoidance(std::shared_ptr< trajopt::ProblemConstructionInfo > pci) const
Add collision avoidance cost to the trajectory optimization for all waypoints.
void addVelocityCost(std::shared_ptr< trajopt::ProblemConstructionInfo > pci) const
Add velocity cost to the trajectory optimization.
void problemConstructionInfo(std::shared_ptr< trajopt::ProblemConstructionInfo > pci) const
Create a TrajOpt problem construction info object with default values.
std::pair< bool, bool > PlannerResult
Planner result: first->converged, second->collision_free.
PlannerResult solve(const SceneConstPtr &scene, const std::shared_ptr< trajopt::ProblemConstructionInfo > &pci)
Solve SQP optimization problem.
void addStartState(const MotionRequestBuilderPtr &request, std::shared_ptr< trajopt::ProblemConstructionInfo > pci)
Add a (joint) configuration constraint in the first waypoint taken from request.
bool sceneToTesseractEnv(const robowflex::SceneConstPtr &scene, tesseract::tesseract_ros::KDLEnvPtr env)
Add scene collision objects to a (previously initialized) KDL environment.
Definition: conversions.cpp:17
bool addAttachedBodiesToTesseractEnv(const robot_state::RobotStatePtr &state, tesseract::tesseract_ros::KDLEnvPtr env)
Add bodies attached to the robot scratch state to the KDL environment.

◆ plan() [4/6]

TrajOptPlanner::PlannerResult TrajOptPlanner::plan ( const SceneConstPtr scene,
const robot_state::RobotStatePtr &  start_state,
const RobotPose goal_pose,
const std::string link 
)

Plan a motion given a start_state, a goal_pose for a link and a scene.

Parameters
[in]sceneA planning scene for the same robot to compute the plan in.
[in]start_stateStart state for the robot.
[in]goal_poseCartesian goal pose for link.
[in]linkLink to find pose for.
Returns
Planner result with convergence and collision status.

Definition at line 282 of file trajopt_planner.cpp.

285 {
286  if (init_type_ == InitInfo::Type::JOINT_INTERPOLATED)
287  {
288  RBX_ERROR("Straight line interpolation can not be done with a goal_pose.");
289  return PlannerResult(false, false);
290  }
291 
292  auto begin_it = env_->getManipulator(manip_)->getLinkNames().begin();
293  auto end_it = env_->getManipulator(manip_)->getLinkNames().end();
294  auto link_it = std::find(begin_it, end_it, link);
295  if (link_it == end_it)
296  {
297  RBX_ERROR("Link %s is not part of robot manipulator", link);
298  return PlannerResult(false, false);
299  }
300 
301  // Use the start state as reference state to build trajectory_.
302  ref_state_ = std::make_shared<robot_state::RobotState>(*start_state);
303 
304  // Create the tesseract environment from the scene.
306  {
307  // Attach bodies to KDL env.
309 
310  // Fill in the problem construction info and initialization.
311  auto pci = std::make_shared<ProblemConstructionInfo>(env_);
313 
314  // Add velocity cost.
315  addVelocityCost(pci);
316 
317  // Add start state
318  addStartState(start_state, pci);
319 
320  // Add collision costs to all waypoints in the trajectory.
322 
323  // Add goal pose for link.
324  addGoalPose(goal_pose, link, pci);
325 
326  return solve(scene, pci);
327  }
328 
329  return PlannerResult(false, false);
330 }
void addGoalPose(const RobotPose &goal_pose, const std::string &link, std::shared_ptr< trajopt::ProblemConstructionInfo > pci) const
Add a cartesian pose constraint goal_pose for link in the last waypoint.
trajopt::InitInfo::Type init_type_

◆ plan() [5/6]

TrajOptPlanner::PlannerResult TrajOptPlanner::plan ( const SceneConstPtr scene,
const RobotPose start_pose,
const std::string start_link,
const RobotPose goal_pose,
const std::string goal_link 
)

Plan a motion given a start_pose for start_link and a goal_pose for goal_link.

Parameters
[in]sceneA planning scene to compute the plan in.
[in]start_poseCartesian start pose for start_link.
[in]start_linkRobot's link with start_pose.
[in]goal_poseCartesian goal pose for goal_link.
[in]goal_linkRobot's link with goal_pose.
Returns
Planner result with convergence and collision status.

Definition at line 376 of file trajopt_planner.cpp.

379 {
380  if (init_type_ == InitInfo::Type::JOINT_INTERPOLATED)
381  {
382  RBX_ERROR("Straight line interpolation can not be done with a start_pose or a goal_pose");
383  return PlannerResult(false, false);
384  }
385 
386  auto begin_it = env_->getManipulator(manip_)->getLinkNames().begin();
387  auto end_it = env_->getManipulator(manip_)->getLinkNames().end();
388  auto start_it = std::find(begin_it, end_it, start_link);
389  auto goal_it = std::find(begin_it, end_it, goal_link);
390  if ((start_it == end_it) or (goal_it == end_it))
391  {
392  RBX_ERROR("Given links %s or %s are not part of robot manipulator", start_link, goal_link);
393  return PlannerResult(false, false);
394  }
395 
396  // Create the tesseract environment from the scene.
398  {
399  // Fill in the problem construction info and initialization
400  auto pci = std::make_shared<ProblemConstructionInfo>(env_);
402 
403  // Add velocity cost.
404  addVelocityCost(pci);
405 
406  // Add start_pose for start_link.
407  addStartPose(start_pose, start_link, pci);
408 
409  // Add collision costs to all waypoints in the trajectory.
411 
412  // Add goal_pose for goal_link.
413  addGoalPose(goal_pose, goal_link, pci);
414 
415  return solve(scene, pci);
416  }
417 
418  return PlannerResult(false, false);
419 }
void addStartPose(const RobotPose &start_pose, const std::string &link, std::shared_ptr< trajopt::ProblemConstructionInfo > pci) const
Add a cartesian pose constraint start_pose for link in the first waypoint.

◆ plan() [6/6]

TrajOptPlanner::PlannerResult TrajOptPlanner::plan ( const SceneConstPtr scene,
const std::unordered_map< std::string, double > &  start_state,
const RobotPose goal_pose,
const std::string link 
)

Plan a motion given a start_state, a goal_pose for a link and a scene.

Parameters
[in]sceneA planning scene for the same robot to compute the plan in.
[in]start_stateStart state for the robot.
[in]goal_poseCartesian goal pose for link.
[in]linkLink to find pose for.
Returns
Planner result with convergence and collision status.

Definition at line 332 of file trajopt_planner.cpp.

335 {
336  if (init_type_ == InitInfo::Type::JOINT_INTERPOLATED)
337  {
338  RBX_ERROR("Straight line interpolation can not be done with a goal_pose.");
339  return PlannerResult(false, false);
340  }
341 
342  auto begin_it = env_->getManipulator(manip_)->getLinkNames().begin();
343  auto end_it = env_->getManipulator(manip_)->getLinkNames().end();
344  auto link_it = std::find(begin_it, end_it, link);
345  if (link_it == end_it)
346  {
347  RBX_ERROR("Link %s is not part of robot manipulator", link);
348  return PlannerResult(false, false);
349  }
350 
351  // Create the tesseract environment from the scene.
353  {
354  // Fill in the problem construction info and initialization.
355  auto pci = std::make_shared<ProblemConstructionInfo>(env_);
357 
358  // Add velocity cost.
359  addVelocityCost(pci);
360 
361  // Add start state
362  addStartState(start_state, pci);
363 
364  // Add collision costs to all waypoints in the trajectory.
366 
367  // Add goal pose for link.
368  addGoalPose(goal_pose, link, pci);
369 
370  return solve(scene, pci);
371  }
372 
373  return PlannerResult(false, false);
374 }

◆ problemConstructionInfo()

void TrajOptPlanner::problemConstructionInfo ( std::shared_ptr< trajopt::ProblemConstructionInfo >  pci) const
protected

Create a TrajOpt problem construction info object with default values.

Parameters
[out]pciPointer to problem construction info initialized.

Definition at line 445 of file trajopt_planner.cpp.

446 {
447  pci->basic_info.convex_solver = options.backend_optimizer;
448  pci->kin = env_->getManipulator(manip_);
449  pci->basic_info.n_steps = options.num_waypoints;
450  pci->basic_info.manip = manip_;
451  pci->basic_info.dt_lower_lim = options.dt_lower_lim;
452  pci->basic_info.dt_upper_lim = options.dt_upper_lim;
453  pci->basic_info.start_fixed = options.start_fixed;
454  pci->basic_info.dofs_fixed = fixed_joints_;
455  pci->basic_info.use_time = options.use_time;
456  pci->init_info.type = init_type_;
457  pci->init_info.dt = options.init_info_dt;
458  if (init_type_ == InitInfo::Type::GIVEN_TRAJ)
459  pci->init_info.data = initial_trajectory_;
460 
461  if (options.verbose)
462  RBX_INFO("TrajOpt initialization: %d", init_type_);
463 }
trajopt::TrajArray initial_trajectory_
Initial trajectory (if any).
bool use_time
Whether any cost/cnt use time.
sco::ModelType backend_optimizer
Optimizer to use.
double init_info_dt
Value of dt in init_info.
bool start_fixed
Whether to use the current env state as a fixed initial state.

◆ setInitialTrajectory() [1/2]

void TrajOptPlanner::setInitialTrajectory ( const robot_trajectory::RobotTrajectoryPtr &  init_trajectory)

Set initial trajectory for TrajOpt and set init_type to GIVEN_TRAJ.

Parameters
[in]init_trajectoryTrajectory to initialize TrajOpt.

Definition at line 114 of file trajopt_planner.cpp.

115 {
117  init_type_ = InitInfo::Type::GIVEN_TRAJ;
118 }
void robotTrajToManipTesseractTraj(const robot_trajectory::RobotTrajectoryPtr &robot_traj, const std::string &manip, const tesseract::tesseract_ros::KDLEnvPtr &env, tesseract::TrajArray &trajectory)
Transform a robot_trajectory to a tesseract manipulator trajectory.

◆ setInitialTrajectory() [2/2]

void robowflex::TrajOptPlanner::setInitialTrajectory ( const trajopt::TrajArray &  init_trajectory)

Set initial trajectory for TrajOpt and set init_type to GIVEN_TRAJ.

Parameters
[in]init_trajectoryTrajectory to initialize TrajOpt.

◆ setInitType()

void TrajOptPlanner::setInitType ( const trajopt::InitInfo::Type init_type)

Set type of initialization to use for the trajectory optimization. Current options are: STATIONARY JOINT_INTERPOLATED The user can also provide their own trajectory using setInitialTrajectory(). In such case, there is no need to call setInitType().

Parameters
[in]init_typeType of initial trajectory to be used.

Definition at line 126 of file trajopt_planner.cpp.

127 {
128  if (init_type != InitInfo::Type::GIVEN_TRAJ)
129  init_type_ = init_type;
130  else
131  RBX_ERROR("init type can only be set to GIVEN_TRAJ calling the setInitialTrajectory() function");
132 }

◆ setWriteFile()

void TrajOptPlanner::setWriteFile ( bool  file_write_cb,
const std::string file_path = "" 
)

Set whether a report file (for the optimization) should be written or not.

Parameters
[in]file_write_cbWhether to write the file or not.
[in]file_pathFile path

Definition at line 434 of file trajopt_planner.cpp.

435 {
436  file_write_cb_ = file_write_cb;
437  stream_ptr_ = std::make_shared<std::ofstream>();
438  boost::filesystem::path path(file_path);
439  path /= "file_output.csv";
440  file_path_ = path.string();
441  if (file_write_cb_)
442  stream_ptr_->open(file_path_, std::ofstream::out | std::ofstream::trunc);
443 }
T string(T... args)
std::shared_ptr< std::ofstream > stream_ptr_
Debug file stream.
bool file_write_cb_
Whether to write a debug file or not.
std::string file_path_
Path of debug file.

◆ solve()

TrajOptPlanner::PlannerResult TrajOptPlanner::solve ( const SceneConstPtr scene,
const std::shared_ptr< trajopt::ProblemConstructionInfo > &  pci 
)
protected

Solve SQP optimization problem.

Parameters
[in]sceneScene to plan for.
[in]pciPointer to problem construction info initialized.
Returns
Planner result with convergence and collision status.

Definition at line 588 of file trajopt_planner.cpp.

590 {
591  PlannerResult planner_result(false, false);
592 
593  // Create optimizer and populate parameters.
594  TrajOptProbPtr prob = ConstructProblem(*pci);
595  sco::BasicTrustRegionSQP opt(prob);
596  opt.setParameters(getTrustRegionSQPParameters());
597 
598  // Add write file callback.
599  if (file_write_cb_)
600  {
601  if (!stream_ptr_->is_open())
602  stream_ptr_->open(file_path_, std::ofstream::out | std::ofstream::trunc);
603 
604  opt.addCallback(WriteCallback(stream_ptr_, prob));
605  }
606 
607  // If the planner needs to run more than once, add noise to the initial trajectory.
609  options.perturb_init_traj = true;
610 
611  // Initialize.
612  double total_time = 0.0;
613  double best_cost = std::numeric_limits<double>::infinity();
614 
615  while (true)
616  {
617  // Perturb initial trajectory if needed.
618  auto init_trajectory = prob->GetInitTraj();
620  {
621  // Perturb all waypoints but start and goal.
622  int rows = options.num_waypoints - 2;
623  int cols = pci->kin->numJoints();
624  double noise = options.noise_init_traj;
625 
626  init_trajectory.block(1, 0, rows, cols) += (Eigen::MatrixXd::Constant(rows, cols, -noise) +
627  2 * noise *
628  (Eigen::MatrixXd::Random(rows, cols) * 0.5 +
629  Eigen::MatrixXd::Constant(rows, cols, 0.5)));
630  }
631 
632  opt.initialize(trajToDblVec(init_trajectory));
633 
634  // Optimize.
635  ros::Time tStart = ros::Time::now();
636  opt.optimize();
637 
638  // Measure and print time.
639  double time = (ros::Time::now() - tStart).toSec();
640  total_time += time;
641  time_ = total_time;
642 
643  if (opt.results().status == sco::OptStatus::OPT_CONVERGED)
644  {
645  // Optimization problem converged.
646  planner_result.first = true;
647 
648  // Check for collisions.
649  auto tss_current_traj = getTraj(opt.x(), prob->GetVars());
650  auto current_traj =
651  std::make_shared<robot_trajectory::RobotTrajectory>(robot_->getModelConst(), group_);
653  current_traj);
654  auto const &ct = std::make_shared<Trajectory>(current_traj);
655  bool is_ct_collision_free = ct->isCollisionFree(scene);
656 
657  // If trajectory is better than current, update the trajectory and cost.
658  if ((opt.results().total_cost < best_cost) and is_ct_collision_free)
659  {
660  // Update best cost.
661  best_cost = opt.results().total_cost;
662 
663  // Clear current trajectory.
664  trajectory_->clear();
665 
666  // Update trajectory.
667  tesseract_trajectory_ = tss_current_traj;
668  trajectory_ = current_traj;
669 
670  // Solution is collision-free.
671  planner_result.second = true;
672  }
673  }
674 
676  (options.return_after_timeout and (total_time >= options.max_planning_time)) or
678  (planner_result.second or (total_time >= options.max_planning_time))))
679  break;
680  }
681 
682  // Print status
683  if (options.verbose)
684  {
685  RBX_INFO("OPTIMIZATION STATUS: %s", sco::statusToString(opt.results().status));
686  RBX_INFO("TOTAL PLANNING TIME: %.3f", time_);
687  RBX_INFO("COST: %.3f", best_cost);
688  RBX_INFO("COLLISION STATUS: %s", (planner_result.second) ? "COLLISION FREE" : "IN COLLISION");
689 
690  if (planner_result.first)
692  }
693 
694  // Write optimization results in file.
695  if (file_write_cb_)
696  stream_ptr_->close();
697 
698  return planner_result;
699 }
sco::BasicTrustRegionSQPParameters getTrustRegionSQPParameters() const
Get parameters of the SQP.
T infinity(T... args)
void manipTesseractTrajToRobotTraj(const tesseract::TrajArray &tesseract_traj, const robot_state::RobotStatePtr &ref_state, const std::string &manip, const tesseract::tesseract_ros::KDLEnvPtr &env, robot_trajectory::RobotTrajectoryPtr trajectory)
Transform a tesseract trajectory to a robot trajectory.
T time(T... args)

Member Data Documentation

◆ cont_cc_

bool robowflex::TrajOptPlanner::cont_cc_ {true}
protected

Use continuous collision checking.

Definition at line 358 of file trajopt_planner.h.

◆ env_

tesseract::tesseract_ros::KDLEnvPtr robowflex::TrajOptPlanner::env_
protected

KDL environment.

Definition at line 355 of file trajopt_planner.h.

◆ file_path_

std::string robowflex::TrajOptPlanner::file_path_
protected

Path of debug file.

Definition at line 360 of file trajopt_planner.h.

◆ file_write_cb_

bool robowflex::TrajOptPlanner::file_write_cb_ {false}
protected

Whether to write a debug file or not.

Definition at line 361 of file trajopt_planner.h.

◆ fixed_joints_

std::vector<int> robowflex::TrajOptPlanner::fixed_joints_
protected

List of joints that need to be fixed, indexed in the order they appear in the manipulator.

Definition at line 366 of file trajopt_planner.h.

◆ group_

std::string robowflex::TrajOptPlanner::group_
protected

Name of group to plan for.

Definition at line 356 of file trajopt_planner.h.

◆ init_type_

trajopt::InitInfo::Type robowflex::TrajOptPlanner::init_type_ {trajopt::InitInfo::Type::STATIONARY}
protected

Type of initial trajectory.

Definition at line 362 of file trajopt_planner.h.

◆ initial_trajectory_

trajopt::TrajArray robowflex::TrajOptPlanner::initial_trajectory_
protected

Initial trajectory (if any).

Definition at line 364 of file trajopt_planner.h.

◆ manip_

std::string robowflex::TrajOptPlanner::manip_
protected

Name of manipulator chain to check for collisions.

Definition at line 357 of file trajopt_planner.h.

◆ options

struct robowflex::TrajOptPlanner::Options robowflex::TrajOptPlanner::options

◆ ref_state_

robot_state::RobotStatePtr robowflex::TrajOptPlanner::ref_state_
protected

Reference state to build moveit trajectory waypoints.

Definition at line 368 of file trajopt_planner.h.

◆ stream_ptr_

std::shared_ptr<std::ofstream> robowflex::TrajOptPlanner::stream_ptr_
protected

Debug file stream.

Definition at line 359 of file trajopt_planner.h.

◆ tesseract_trajectory_

trajopt::TrajArray robowflex::TrajOptPlanner::tesseract_trajectory_
protected

Last successful trajectory generated by the planner in Tesseract format.

Definition at line 353 of file trajopt_planner.h.

◆ time_

double robowflex::TrajOptPlanner::time_ {0.0}
protected

Time taken by the optimizer the last time it was called.

Definition at line 365 of file trajopt_planner.h.

◆ trajectory_

robot_trajectory::RobotTrajectoryPtr robowflex::TrajOptPlanner::trajectory_
protected

Last successful trajectory generated by the planner.

Definition at line 351 of file trajopt_planner.h.


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