Go to the documentation of this file.
62 if (nh.
getParam(
"benchmark_config", benchmark_config))
70 ROS_WARN(
"No benchmark_config found on param server");
162 planning_pipeline_names.clear();
179 nh.
param(std::string(
"benchmark_config/warehouse/host"),
hostname_, std::string(
"127.0.0.1"));
180 nh.
param(std::string(
"benchmark_config/warehouse/port"),
port_, 33829);
183 ROS_WARN(
"Benchmark scene_name NOT specified");
193 nh.
param(std::string(
"benchmark_config/parameters/runs"),
runs_, 10);
194 nh.
param(std::string(
"benchmark_config/parameters/timeout"),
timeout_, 10.0);
195 nh.
param(std::string(
"benchmark_config/parameters/output_directory"),
output_directory_, std::string(
""));
196 nh.
param(std::string(
"benchmark_config/parameters/queries"),
query_regex_, std::string(
".*"));
206 ROS_WARN(
"Benchmark group NOT specified");
208 if (nh.
hasParam(
"benchmark_config/parameters/workspace"))
212 nh.
param(std::string(
"benchmark_config/parameters/goal_offset/x"),
goal_offsets[0], 0.0);
213 nh.
param(std::string(
"benchmark_config/parameters/goal_offset/y"),
goal_offsets[1], 0.0);
214 nh.
param(std::string(
"benchmark_config/parameters/goal_offset/z"),
goal_offsets[2], 0.0);
215 nh.
param(std::string(
"benchmark_config/parameters/goal_offset/roll"),
goal_offsets[3], 0.0);
216 nh.
param(std::string(
"benchmark_config/parameters/goal_offset/pitch"),
goal_offsets[4], 0.0);
217 nh.
param(std::string(
"benchmark_config/parameters/goal_offset/yaw"),
goal_offsets[5], 0.0);
236 if (!nh.
getParam(
"benchmark_config/parameters/workspace/frame_id",
workspace_.header.frame_id))
237 ROS_WARN(
"Workspace frame_id not specified in benchmark config");
239 nh.
param(std::string(
"benchmark_config/parameters/workspace/min_corner/x"),
workspace_.min_corner.x, 0.0);
240 nh.
param(std::string(
"benchmark_config/parameters/workspace/min_corner/y"),
workspace_.min_corner.y, 0.0);
241 nh.
param(std::string(
"benchmark_config/parameters/workspace/min_corner/z"),
workspace_.min_corner.z, 0.0);
243 nh.
param(std::string(
"benchmark_config/parameters/workspace/max_corner/x"),
workspace_.max_corner.x, 0.0);
244 nh.
param(std::string(
"benchmark_config/parameters/workspace/max_corner/y"),
workspace_.max_corner.y, 0.0);
245 nh.
param(std::string(
"benchmark_config/parameters/workspace/max_corner/z"),
workspace_.max_corner.z, 0.0);
255 if (nh.
getParam(
"benchmark_config/planning_pipelines", pipeline_configs))
259 ROS_ERROR(
"Expected a list of planning pipeline configurations to benchmark");
263 for (
int i = 0; i < pipeline_configs.
size(); ++i)
267 ROS_WARN(
"Improper YAML type for planning pipeline configurations");
270 if (!pipeline_configs[i].hasMember(
"name") || !pipeline_configs[i].hasMember(
"planners"))
272 ROS_WARN(
"Malformed YAML for planner configurations");
278 ROS_WARN(
"Expected a list of planners to benchmark");
282 const std::string pipeline_name = pipeline_configs[i][
"name"];
283 ROS_INFO(
"Reading in planner names for planning pipeline '%s'", pipeline_name.c_str());
285 std::vector<std::string> planners;
286 planners.reserve(pipeline_configs[i][
"planners"].size());
287 for (
int j = 0; j < pipeline_configs[i][
"planners"].
size(); ++j)
288 planners.emplace_back(pipeline_configs[i][
"planners"][j]);
290 for (std::size_t j = 0; j < planners.size(); ++j)
291 ROS_INFO(
" [%lu]: %s", j, planners[j].c_str());
void readWorkspaceParameters(ros::NodeHandle &nh)
std::string trajectory_constraint_regex_
const std::string & getStartStateRegex() const
Get the regex expression for matching the names of all start states to plan from.
const std::string & getGroupName() const
Get the name of the planning group to run the benchmark with.
moveit_msgs::WorkspaceParameters workspace_
bool getParam(const std::string &key, bool &b) const
std::string output_directory_
const std::string & getHostName() const
Get the name of the warehouse database host server.
std::string benchmark_name_
std::string start_state_regex_
void readBenchmarkParameters(ros::NodeHandle &nh)
int getNumRuns() const
Get the specified number of benchmark query runs.
std::string hostname_
warehouse parameters
std::string path_constraint_regex_
const std::string & getWorkspaceFrameID() const
const moveit_msgs::WorkspaceParameters & getWorkspaceParameters() const
const std::string & getOutputDirectory() const
Get the target directory for the generated benchmark result data.
double getTimeout() const
Get the maximum timeout per planning attempt.
bool hasParam(const std::string &key) const
void readPlannerConfigs(ros::NodeHandle &nh)
std::string goal_constraint_regex_
const std::map< std::string, std::vector< std::string > > & getPlanningPipelineConfigurations() const
Get all planning pipeline names mapped to their parameter configuration.
#define ROS_INFO_STREAM(args)
void getGoalOffsets(std::vector< double > &offsets) const
Get the constant position/orientation offset to be used for shifting all goal constraints.
void setNamespace(const std::string &ros_namespace)
Set the ROS namespace the node handle should use for parameter lookup.
const Type & getType() const
int runs_
benchmark parameters
std::map< std::string, std::vector< std::string > > planning_pipelines_
planner configurations
BenchmarkOptions()
Constructor.
void readWarehouseOptions(ros::NodeHandle &nh)
std::string predefined_poses_group_
const std::vector< std::string > & getPredefinedPoses() const
Get the names of all predefined poses to consider for planning.
const std::string & getPathConstraintRegex() const
Get the regex expression for matching the names of all path constraints to plan with.
T param(const std::string ¶m_name, const T &default_val) const
void readBenchmarkOptions(const std::string &ros_namespace)
int getPort() const
Get the port of the warehouse database host server.
const std::string & getTrajectoryConstraintRegex() const
Get the regex expression for matching the names of all trajectory constraints to plan with.
const std::string & getGoalConstraintRegex() const
Get the regex expression for matching the names of all goal constraints to plan to.
void getPlanningPipelineNames(std::vector< std::string > &planning_pipeline_names) const
Get all planning pipeline names.
const std::string & getPredefinedPosesGroup() const
Get the name of the planning group for which the predefined poses are defined.
std::vector< std::string > predefined_poses_
virtual ~BenchmarkOptions()
Destructor.
const std::string & getBenchmarkName() const
Get the reference name of the benchmark.
const std::string & getQueryRegex() const
Get the regex expression for matching the names of all queries to run.
const std::string & getSceneName() const
Get the reference name of the planning scene stored inside the warehouse database.
benchmarks
Author(s): Ryan Luna
autogenerated on Sat May 3 2025 02:27:17