-
Notifications
You must be signed in to change notification settings - Fork 987
Description
Description
I don't know how to set the optimization objective for T-RRT in model_based_planning_context.cpp(moveit_planners/ompl/ompl_interface/src/model_based_planning_context.cpp).
My environment
- ROS Distro: [Indigo|Kinetic]
- OS Version: Ubuntu 14.04(indigo-devel), 16.04(kinetic-devel)
- Source build
- The source is latest version
Problem
I want to set the optimization objective for T-RRT.
In indigo-devel, T-RRT crashes, because the evaluation function is not well defined,
In this issue, core dump problem was solved, but it may be not a fundamental solution.
93 void ompl::geometric::TRRT::setup()
94 {
95 Planner::setup();
96 tools::SelfConfig selfConfig(si_, getName());
97
98 if (!pdef_ || !pdef_->hasOptimizationObjective())
99 {
100 OMPL_INFORM("%s: No optimization objective specified. Defaulting to mechanical work minimization.", getName().c_str());
101 opt_.reset(new base::MechanicalWorkOptimizationObjective(si_));
102 }Results of trial with OMPL 1.2.1(kinetic-devel)
I installed OMPL 1.2.1 through sudo apt-get install ros-kinetic-ompl .
[ INFO] [1479125611.408491759]: No optimization objective specified, defaulting to PathLengthOptimizationObjective
[ INFO] [1479125611.408520612]: Planner configuration 'left_arm[TRRTkConfigDefault]' will use planner 'geometric::TRRT'. Additional configuration parameters will be set when the planner is constructed.
[ INFO] [1479125611.408623095]: left_arm[TRRTkConfigDefault]: No optimization objective specified. Defaulting to mechanical work minimization.PathLengthOptimizationObjective is set in the first line.
After PathLengthOptimizationObjective was set, it must be this objective on OMPL.
But it seems that mechanical work minimization is set.
https://github.com/ompl/ompl/blob/master/src/ompl/geometric/planners/rrt/src/TRRT.cpp#L101
I only understand setOptimizationObjective () is the function that sets optimization objective option.
Thank you in advance.