39 #include <moveit/version.h> 42 #include <boost/regex.hpp> 43 #include <boost/progress.hpp> 44 #include <boost/math/constants/constants.hpp> 45 #include <boost/filesystem.hpp> 46 #include <boost/date_time/posix_time/posix_time.hpp> 53 static const int BUF_SIZE = 1024;
54 char buffer[BUF_SIZE];
55 int err = gethostname(buffer,
sizeof(buffer));
60 buffer[BUF_SIZE - 1] =
'\0';
61 return std::string(buffer);
79 "moveit_core",
"planning_interface::PlannerManager"));
83 ROS_FATAL_STREAM(
"Exception while creating planning plugin loader " << ex.what());
109 for (std::size_t i = 0; i < plugin_classes.size(); ++i)
111 std::vector<std::string>::const_iterator it = std::find(classes.begin(), classes.end(), plugin_classes[i]);
112 if (it == classes.end())
114 ROS_ERROR(
"Failed to find plugin_class %s", plugin_classes[i].c_str());
120 planning_interface::PlannerManagerPtr p =
planner_plugin_loader_->createUniqueInstance(plugin_classes[i]);
123 p->getPlannerConfigurations();
128 ROS_ERROR_STREAM(
"Exception while loading planner '" << plugin_classes[i] <<
"': " << ex.what());
134 ROS_ERROR(
"No planning plugins have been loaded. Nothing to do for the benchmarking service.");
137 std::stringstream ss;
138 for (std::map<std::string, planning_interface::PlannerManagerPtr>::const_iterator it =
planner_interfaces_.begin();
140 ss << it->first <<
" ";
141 ROS_INFO(
"Available planner instances: %s", ss.str().c_str());
216 ROS_ERROR(
"No planning interfaces configured. Did you call BenchmarkExecutor::initialize?");
220 std::vector<BenchmarkRequest> queries;
221 moveit_msgs::PlanningScene scene_msg;
228 for (std::size_t i = 0; i < queries.size(); ++i)
231 if (scene_msg.robot_model_name !=
planning_scene_->getRobotModel()->getName())
247 ROS_INFO(
"Benchmarking query '%s' (%lu of %lu)", queries[i].name.c_str(), i + 1, queries.size());
255 writeOutput(queries[i], boost::posix_time::to_iso_extended_string(start_time.toBoost()), duration);
264 const std::map<std::string, std::vector<std::string>>& planners)
267 for (std::map<std::string, planning_interface::PlannerManagerPtr>::const_iterator it =
planner_interfaces_.begin();
270 for (std::size_t i = 0; i < requests.size(); ++i)
272 if (!it->second->canServiceRequest(requests[i].request))
274 ROS_ERROR(
"Interface '%s' cannot service the benchmark request '%s'", it->first.c_str(),
275 requests[i].name.c_str());
285 std::vector<BenchmarkRequest>& requests)
308 catch (std::exception& e)
310 ROS_ERROR(
"Failed to initialize benchmark server: '%s'", e.what());
314 std::vector<StartState> start_states;
315 std::vector<PathConstraints> path_constraints;
316 std::vector<PathConstraints> goal_constraints;
317 std::vector<TrajectoryConstraints> traj_constraints;
318 std::vector<BenchmarkRequest> queries;
328 ROS_ERROR(
"Failed to load benchmark stuff");
332 ROS_INFO(
"Benchmark loaded %lu starts, %lu goals, %lu path constraints, %lu trajectory constraints, and %lu queries",
333 start_states.size(), goal_constraints.size(), path_constraints.size(), traj_constraints.size(),
338 if (workspace_parameters.min_corner.x == workspace_parameters.max_corner.x &&
339 workspace_parameters.min_corner.x == 0.0 &&
340 workspace_parameters.min_corner.y == workspace_parameters.max_corner.y &&
341 workspace_parameters.min_corner.y == 0.0 &&
342 workspace_parameters.min_corner.z == workspace_parameters.max_corner.z &&
343 workspace_parameters.min_corner.z == 0.0)
345 workspace_parameters.min_corner.x = workspace_parameters.min_corner.y = workspace_parameters.min_corner.z = -5.0;
347 workspace_parameters.max_corner.x = workspace_parameters.max_corner.y = workspace_parameters.max_corner.z = 5.0;
350 std::vector<double> goal_offset;
357 for (std::size_t i = 0; i < goal_constraints.size(); ++i)
361 brequest.
name = goal_constraints[i].name;
362 brequest.
request.workspace_parameters = workspace_parameters;
363 brequest.
request.goal_constraints = goal_constraints[i].constraints;
366 brequest.
request.num_planning_attempts = 1;
368 if (brequest.
request.goal_constraints.size() == 1 &&
369 brequest.
request.goal_constraints[0].position_constraints.size() == 1 &&
370 brequest.
request.goal_constraints[0].orientation_constraints.size() == 1 &&
371 brequest.
request.goal_constraints[0].visibility_constraints.size() == 0 &&
372 brequest.
request.goal_constraints[0].joint_constraints.size() == 0)
375 std::vector<BenchmarkRequest> request_combos;
377 requests.insert(requests.end(), request_combos.begin(), request_combos.end());
382 for (std::size_t i = 0; i < queries.size(); ++i)
386 brequest.
name = queries[i].name;
387 brequest.
request = queries[i].request;
390 brequest.
request.num_planning_attempts = 1;
393 if (brequest.
request.workspace_parameters.min_corner.x == brequest.
request.workspace_parameters.max_corner.x &&
394 brequest.
request.workspace_parameters.min_corner.x == 0.0 &&
395 brequest.
request.workspace_parameters.min_corner.y == brequest.
request.workspace_parameters.max_corner.y &&
396 brequest.
request.workspace_parameters.min_corner.y == 0.0 &&
397 brequest.
request.workspace_parameters.min_corner.z == brequest.
request.workspace_parameters.max_corner.z &&
398 brequest.
request.workspace_parameters.min_corner.z == 0.0)
401 brequest.
request.workspace_parameters = workspace_parameters;
405 std::vector<BenchmarkRequest> request_combos;
407 requests.insert(requests.end(), request_combos.begin(), request_combos.end());
411 for (std::size_t i = 0; i < traj_constraints.size(); ++i)
415 brequest.
name = traj_constraints[i].name;
416 brequest.
request.trajectory_constraints = traj_constraints[i].constraints;
419 brequest.
request.num_planning_attempts = 1;
421 if (brequest.
request.trajectory_constraints.constraints.size() == 1 &&
422 brequest.
request.trajectory_constraints.constraints[0].position_constraints.size() == 1 &&
423 brequest.
request.trajectory_constraints.constraints[0].orientation_constraints.size() == 1 &&
424 brequest.
request.trajectory_constraints.constraints[0].visibility_constraints.size() == 0 &&
425 brequest.
request.trajectory_constraints.constraints[0].joint_constraints.size() == 0)
428 std::vector<BenchmarkRequest> request_combos;
429 std::vector<PathConstraints> no_path_constraints;
431 requests.insert(requests.end(), request_combos.begin(), request_combos.end());
439 const std::vector<double> offset)
441 Eigen::Affine3d offset_tf(Eigen::AngleAxis<double>(offset[3], Eigen::Vector3d::UnitX()) *
442 Eigen::AngleAxis<double>(offset[4], Eigen::Vector3d::UnitY()) *
443 Eigen::AngleAxis<double>(offset[5], Eigen::Vector3d::UnitZ()));
444 offset_tf.translation() = Eigen::Vector3d(offset[0], offset[1], offset[2]);
446 geometry_msgs::Pose constraint_pose_msg;
447 constraint_pose_msg.position = constraints.position_constraints[0].constraint_region.primitive_poses[0].position;
448 constraint_pose_msg.orientation = constraints.orientation_constraints[0].orientation;
449 Eigen::Affine3d constraint_pose;
452 Eigen::Affine3d new_pose = constraint_pose * offset_tf;
453 geometry_msgs::Pose new_pose_msg;
456 constraints.position_constraints[0].constraint_region.primitive_poses[0].position = new_pose_msg.position;
457 constraints.orientation_constraints[0].orientation = new_pose_msg.orientation;
461 const std::vector<StartState>& start_states,
462 const std::vector<PathConstraints>& path_constraints,
463 std::vector<BenchmarkRequest>& requests)
466 if (start_states.empty())
469 for (std::size_t k = 0; k < path_constraints.size(); ++k)
472 new_brequest.
request.path_constraints = path_constraints[k].constraints[0];
473 new_brequest.
name = brequest.
name +
"_" + path_constraints[k].name;
474 requests.push_back(new_brequest);
477 if (path_constraints.empty())
478 requests.push_back(brequest);
482 for (std::size_t j = 0; j < start_states.size(); ++j)
485 new_brequest.
request.start_state = start_states[j].state;
488 for (std::size_t k = 0; k < path_constraints.size(); ++k)
490 new_brequest.
request.path_constraints = path_constraints[k].constraints[0];
491 new_brequest.
name = start_states[j].name +
"_" + new_brequest.
name +
"_" + path_constraints[k].name;
492 requests.push_back(new_brequest);
495 if (path_constraints.empty())
497 new_brequest.
name = start_states[j].name +
"_" + brequest.
name;
498 requests.push_back(new_brequest);
505 const std::string& group_name)
508 for (std::map<std::string, std::vector<std::string>>::const_iterator it = planners.begin(); it != planners.end();
511 bool plugin_exists =
false;
512 for (std::map<std::string, planning_interface::PlannerManagerPtr>::const_iterator planner_it =
516 plugin_exists = planner_it->first == it->first;
521 ROS_ERROR(
"Planning plugin '%s' does NOT exist", it->first.c_str());
527 for (std::map<std::string, std::vector<std::string>>::const_iterator it = planners.begin(); it != planners.end();
536 if (pm->getDescription().compare(
"stomp") || pm->getDescription().compare(
"chomp"))
539 for (std::size_t i = 0; i < it->second.size(); ++i)
541 bool planner_exists =
false;
542 for (planning_interface::PlannerConfigurationMap::const_iterator map_it = config_map.begin();
543 map_it != config_map.end() && !planner_exists; ++map_it)
545 std::string planner_name = group_name +
"[" + it->second[i] +
"]";
546 planner_exists = (map_it->second.group == group_name && map_it->second.name == planner_name);
551 ROS_ERROR(
"Planner '%s' does NOT exist for group '%s' in pipeline '%s'", it->second[i].c_str(),
552 group_name.c_str(), it->first.c_str());
553 std::cout <<
"There are " << config_map.size() <<
" planner entries: " << std::endl;
554 for (planning_interface::PlannerConfigurationMap::const_iterator map_it = config_map.begin();
555 map_it != config_map.end() && !planner_exists; ++map_it)
556 std::cout << map_it->second.name << std::endl;
574 scene_msg =
static_cast<moveit_msgs::PlanningScene
>(*pswm);
577 ROS_ERROR(
"Failed to load planning scene '%s'", scene_name.c_str());
583 scene_msg.world =
static_cast<moveit_msgs::PlanningSceneWorld
>(*pswwm);
584 scene_msg.robot_model_name =
585 "NO ROBOT INFORMATION. ONLY WORLD GEOMETRY";
588 ROS_ERROR(
"Failed to load planning scene '%s'", scene_name.c_str());
591 ROS_ERROR(
"Failed to find planning scene '%s'", scene_name.c_str());
593 catch (std::exception& ex)
595 ROS_ERROR(
"Error loading planning scene: %s", ex.what());
597 ROS_INFO(
"Loaded planning scene successfully");
602 std::vector<BenchmarkRequest>& queries)
607 std::vector<std::string> query_names;
612 catch (std::exception& ex)
614 ROS_ERROR(
"Error loading motion planning queries: %s", ex.what());
618 if (query_names.empty())
620 ROS_ERROR(
"Scene '%s' has no associated queries", scene_name.c_str());
624 for (std::size_t i = 0; i < query_names.size(); ++i)
631 catch (std::exception& ex)
633 ROS_ERROR(
"Error loading motion planning query '%s': %s", query_names[i].c_str(), ex.what());
638 query.
name = query_names[i];
639 query.
request =
static_cast<moveit_msgs::MotionPlanRequest
>(*planning_query);
640 queries.push_back(query);
642 ROS_INFO(
"Loaded queries successfully");
650 boost::regex start_regex(regex);
651 std::vector<std::string> state_names;
653 for (std::size_t i = 0; i < state_names.size(); ++i)
656 if (boost::regex_match(state_names[i].c_str(), match, start_regex))
664 start_state.
state = moveit_msgs::RobotState(*robot_state);
665 start_state.
name = state_names[i];
666 start_states.push_back(start_state);
669 catch (std::exception& ex)
671 ROS_ERROR(
"Runtime error when loading state '%s': %s", state_names[i].c_str(), ex.what());
677 if (start_states.empty())
678 ROS_WARN(
"No stored states matched the provided start state regex: '%s'", regex.c_str());
680 ROS_INFO(
"Loaded states successfully");
688 std::vector<std::string> cnames;
691 for (std::size_t i = 0; i < cnames.size(); ++i)
700 constraint.
name = cnames[i];
701 constraints.push_back(constraint);
704 catch (std::exception& ex)
706 ROS_ERROR(
"Runtime error when loading path constraint '%s': %s", cnames[i].c_str(), ex.what());
711 if (constraints.empty())
712 ROS_WARN(
"No path constraints found that match regex: '%s'", regex.c_str());
714 ROS_INFO(
"Loaded path constraints successfully");
720 std::vector<TrajectoryConstraints>& constraints)
724 std::vector<std::string> cnames;
727 for (std::size_t i = 0; i < cnames.size(); ++i)
736 constraint.
name = cnames[i];
737 constraints.push_back(constraint);
740 catch (std::exception& ex)
742 ROS_ERROR(
"Runtime error when loading trajectory constraint '%s': %s", cnames[i].c_str(), ex.what());
747 if (constraints.empty())
748 ROS_WARN(
"No trajectory constraints found that match regex: '%s'", regex.c_str());
750 ROS_INFO(
"Loaded trajectory constraints successfully");
756 const std::map<std::string, std::vector<std::string>>& planners,
int runs)
760 unsigned int num_planners = 0;
761 for (std::map<std::string, std::vector<std::string>>::const_iterator it = planners.begin(); it != planners.end();
763 num_planners += it->second.size();
765 boost::progress_display progress(num_planners * runs, std::cout);
768 for (std::map<std::string, std::vector<std::string>>::const_iterator it = planners.begin(); it != planners.end();
772 for (std::size_t i = 0; i < it->second.size(); ++i)
777 request.planner_id = it->second[i];
783 planning_interface::PlanningContextPtr context =
785 for (
int j = 0; j < runs; ++j)
794 bool solved = context->solve(mp_res);
805 ROS_DEBUG(
"Spent %lf seconds collecting metrics", metrics_time);
824 metrics[
"solved BOOLEAN"] = boost::lexical_cast<std::string>(solved);
830 double clearance = 0.0;
831 double smoothness = 0.0;
834 double process_time = total_time;
835 for (std::size_t j = 0; j < mp_res.
trajectory_.size(); ++j)
881 double acosValue = (a * a + b * b - cdist * cdist) / (2.0 * a * b);
882 if (acosValue > -1.0 && acosValue < 1.0)
885 double angle = (boost::math::constants::pi<double>() -
acos(acosValue));
888 double u = 2.0 * angle;
895 metrics[
"path_" + mp_res.
description_[j] +
"_correct BOOLEAN"] = boost::lexical_cast<std::string>(correct);
902 if (process_time <= 0.0)
909 double benchmark_duration)
913 size_t num_planners = 0;
914 for (std::map<std::string, std::vector<std::string>>::const_iterator it = planners.begin(); it != planners.end();
916 num_planners += it->second.size();
919 if (hostname.empty())
920 hostname =
"UNKNOWN";
923 if (filename.size() && filename[filename.size() - 1] !=
'/')
924 filename.append(
"/");
927 boost::filesystem::create_directories(filename);
931 std::ofstream out(filename.c_str());
934 ROS_ERROR(
"Failed to open '%s' for benchmark output", filename.c_str());
938 out <<
"MoveIt! version " << MOVEIT_VERSION << std::endl;
939 out <<
"Experiment " << brequest.
name << std::endl;
940 out <<
"Running on " << hostname << std::endl;
941 out <<
"Starting at " << start_time << std::endl;
944 moveit_msgs::PlanningScene scene_msg;
946 out <<
"<<<|" << std::endl;
947 out <<
"Motion plan request:" << std::endl << brequest.
request << std::endl;
948 out <<
"Planning scene: " << std::endl << scene_msg << std::endl <<
"|>>>" << std::endl;
953 out <<
"0 is the random seed" << std::endl;
954 out << brequest.
request.allowed_planning_time <<
" seconds per run" << std::endl;
956 out <<
"-1 MB per run" << std::endl;
958 out << benchmark_duration <<
" seconds spent to collect the data" << std::endl;
961 out <<
"0 enum types" << std::endl;
963 out << num_planners <<
" planners" << std::endl;
966 for (std::map<std::string, std::vector<std::string>>::const_iterator it = planners.begin(); it != planners.end();
969 for (std::size_t i = 0; i < it->second.size(); ++i, ++run_id)
972 out << it->second[i] << std::endl;
976 out <<
"0 common properties" << std::endl;
979 std::set<std::string> properties_set;
981 for (PlannerRunData::const_iterator pit =
benchmark_data_[run_id][j].begin();
983 properties_set.insert(pit->first);
986 out << properties_set.size() <<
" properties for each run" << std::endl;
987 for (std::set<std::string>::const_iterator pit = properties_set.begin(); pit != properties_set.end(); ++pit)
988 out << *pit << std::endl;
997 for (std::set<std::string>::const_iterator pit = properties_set.begin(); pit != properties_set.end(); ++pit)
1000 PlannerRunData::const_iterator runit =
benchmark_data_[run_id][j].find(*pit);
1002 out << runit->second;
1007 out <<
"." << std::endl;
1012 ROS_INFO(
"Benchmark results saved to '%s'", filename.c_str());
moveit_msgs::TrajectoryConstraints constraints
static std::string getHostname()
BenchmarkExecutor(const std::string &robot_description_param="robot_description")
void addPostRunEvent(PostRunEventFunction func)
void createRequestCombinations(const BenchmarkRequest &brequest, const std::vector< StartState > &start_states, const std::vector< PathConstraints > &path_constraints, std::vector< BenchmarkRequest > &combos)
Duplicate the given benchmark request for all combinations of start states and path constraints...
moveit_msgs::MotionPlanRequest request
const std::string & getSceneName() const
bool loadQueries(const std::string ®ex, const std::string &scene_name, std::vector< BenchmarkRequest > &queries)
Load all motion plan requests matching the given regular expression from the warehouse.
std::vector< std::string > description_
const std::string & getOutputDirectory() const
DatabaseConnection::Ptr loadDatabase()
void poseEigenToMsg(const Eigen::Affine3d &e, geometry_msgs::Pose &m)
bool hasPlanningScene(const std::string &name) const
double getTimeout() const
moveit_warehouse::PlanningSceneStorage * pss_
void poseMsgToEigen(const geometry_msgs::Pose &m, Eigen::Affine3d &e)
const std::string & getGroupName() const
bool loadStates(const std::string ®ex, std::vector< StartState > &start_states)
Load all states matching the given regular expression from the warehouse.
const std::string & getPathConstraintRegex() const
const std::string & getHostName() const
planning_scene::PlanningScenePtr planning_scene_
warehouse_ros::DatabaseLoader dbloader
virtual void writeOutput(const BenchmarkRequest &brequest, const std::string &start_time, double benchmark_duration)
bool getPlanningSceneWorld(PlanningSceneWorldWithMetadata &msg_m, const std::string &name) const
void getKnownRobotStates(std::vector< std::string > &names, const std::string &robot="") const
moveit_warehouse::TrajectoryConstraintsStorage * tcs_
void addPreRunEvent(PreRunEventFunction func)
std::map< std::string, PlannerConfigurationSettings > PlannerConfigurationMap
std::vector< PreRunEventFunction > pre_event_fns_
virtual void collectMetrics(PlannerRunData &metrics, const planning_interface::MotionPlanDetailedResponse &mp_res, bool solved, double total_time)
boost::function< void(const moveit_msgs::MotionPlanRequest &request, PlannerBenchmarkData &benchmark_data)> PlannerCompletionEventFunction
const std::string & getGoalConstraintRegex() const
BenchmarkOptions options_
std::vector< PlannerStartEventFunction > planner_start_fns_
void addQueryCompletionEvent(QueryCompletionEventFunction func)
virtual bool runBenchmarks(const BenchmarkOptions &opts)
std::shared_ptr< pluginlib::ClassLoader< planning_interface::PlannerManager > > planner_plugin_loader_
moveit_warehouse::ConstraintsStorage * cs_
void runBenchmark(moveit_msgs::MotionPlanRequest request, const std::map< std::string, std::vector< std::string >> &planners, int runs)
Execute the given motion plan request on the set of planners for the set number of runs...
const planning_scene::PlanningScenePtr & getPlanningScene()
boost::function< void(const moveit_msgs::MotionPlanRequest &request, planning_scene::PlanningScenePtr)> QueryCompletionEventFunction
Definition of a query-end benchmark event function. Invoked after a query has finished benchmarking...
std::vector< PlannerCompletionEventFunction > planner_completion_fns_
const std::string & getStartStateRegex() const
void getGoalOffsets(std::vector< double > &offsets) const
moveit_msgs::RobotState state
bool hasPlanningSceneWorld(const std::string &name) const
bool loadPathConstraints(const std::string ®ex, std::vector< PathConstraints > &constraints)
Load all constraints matching the given regular expression from the warehouse.
#define ROS_FATAL_STREAM(args)
std::map< std::string, std::string > PlannerRunData
Structure to hold information for a single run of a planner.
void getKnownTrajectoryConstraints(std::vector< std::string > &names, const std::string &robot="", const std::string &group="") const
bool getTrajectoryConstraints(TrajectoryConstraintsWithMetadata &msg_m, const std::string &name, const std::string &robot="", const std::string &group="") const
bool plannerConfigurationsExist(const std::map< std::string, std::vector< std::string >> &planners, const std::string &group_name)
Check that the desired planner plugins and algorithms exist for the given group.
planning_scene_monitor::PlanningSceneMonitor * psm_
std::vector< QueryCompletionEventFunction > query_end_fns_
void addPlannerCompletionEvent(PlannerCompletionEventFunction func)
std::vector< double > processing_time_
bool loadTrajectoryConstraints(const std::string ®ex, std::vector< TrajectoryConstraints > &constraints)
Load all trajectory constraints from the warehouse that match the given regular expression.
boost::function< void(moveit_msgs::MotionPlanRequest &request)> PreRunEventFunction
Definition of a pre-run benchmark event function. Invoked immediately before each planner calls solve...
bool loadPlanningScene(const std::string &scene_name, moveit_msgs::PlanningScene &scene_msg)
Load the planning scene with the given name from the warehouse.
std::vector< QueryStartEventFunction > query_start_fns_
void getKnownConstraints(std::vector< std::string > &names, const std::string &robot="", const std::string &group="") const
std::vector< moveit_msgs::Constraints > constraints
std::map< std::string, planning_interface::PlannerManagerPtr > planner_interfaces_
std::string toString(double d)
bool getPlanningQuery(MotionPlanRequestWithMetadata &query_m, const std::string &scene_name, const std::string &query_name)
bool getConstraints(ConstraintsWithMetadata &msg_m, const std::string &name, const std::string &robot="", const std::string &group="") const
moveit_warehouse::PlanningSceneWorldStorage * psws_
const robot_state::RobotState & getWayPoint(std::size_t index) const
const std::string & getTrajectoryConstraintRegex() const
void initialize(const std::vector< std::string > &plugin_classes)
virtual ~BenchmarkExecutor()
std::size_t getWayPointCount() const
bool getPlanningScene(PlanningSceneWithMetadata &scene_m, const std::string &scene_name) const
moveit_warehouse::RobotStateStorage * rs_
bool getRobotState(RobotStateWithMetadata &msg_m, const std::string &name, const std::string &robot="") const
INLINE Rall1d< T, V, S > acos(const Rall1d< T, V, S > &x)
std::vector< robot_trajectory::RobotTrajectoryPtr > trajectory_
void getPlanningQueriesNames(std::vector< std::string > &query_names, const std::string &scene_name) const
void addPlannerStartEvent(PlannerStartEventFunction func)
const std::string & getQueryRegex() const
boost::function< void(const moveit_msgs::MotionPlanRequest &request, const planning_interface::MotionPlanDetailedResponse &response, PlannerRunData &run_data)> PostRunEventFunction
Definition of a post-run benchmark event function. Invoked immediately after each planner calls solve...
std::vector< PlannerRunData > PlannerBenchmarkData
Structure to hold information for a single planner's benchmark data.
const std::string & getBenchmarkName() const
std::vector< PlannerBenchmarkData > benchmark_data_
boost::function< void(const moveit_msgs::MotionPlanRequest &request, PlannerBenchmarkData &benchmark_data)> PlannerStartEventFunction
virtual bool initializeBenchmarks(const BenchmarkOptions &opts, moveit_msgs::PlanningScene &scene_msg, std::vector< BenchmarkRequest > &queries)
const moveit_msgs::WorkspaceParameters & getWorkspaceParameters() const
#define ROS_ERROR_STREAM(args)
void addQueryStartEvent(QueryStartEventFunction func)
void shiftConstraintsByOffset(moveit_msgs::Constraints &constraints, const std::vector< double > offset)
const std::map< std::string, std::vector< std::string > > & getPlannerConfigurations() const
boost::function< void(const moveit_msgs::MotionPlanRequest &request, planning_scene::PlanningScenePtr)> QueryStartEventFunction
Definition of a query-start benchmark event function. Invoked before a new query is benchmarked...
std::vector< PostRunEventFunction > post_event_fns_
bool queriesAndPlannersCompatible(const std::vector< BenchmarkRequest > &requests, const std::map< std::string, std::vector< std::string >> &planners)
Check that the given requests can be run on the set of planner plugins and algorithms.