64 if (nh.
getParam(
"benchmark_config", benchmark_config))
72 ROS_WARN(
"No benchmark_config found on param server");
155 for (std::map<std::string, std::vector<std::string>>::const_iterator it =
planners_.begin(); it !=
planners_.end();
157 plugin_list.push_back(it->first);
172 nh.
param(std::string(
"benchmark_config/warehouse/host"),
hostname_, std::string(
"127.0.0.1"));
173 nh.
param(std::string(
"benchmark_config/warehouse/port"),
port_, 33829);
176 ROS_WARN(
"Benchmark scene_name NOT specified");
180 ROS_INFO(
"Benchmark scene: %s",
scene_name_.c_str());
186 nh.
param(std::string(
"benchmark_config/parameters/runs"),
runs_, 10);
187 nh.
param(std::string(
"benchmark_config/parameters/timeout"),
timeout_, 10.0);
188 nh.
param(std::string(
"benchmark_config/parameters/output_directory"),
output_directory_, std::string(
""));
189 nh.
param(std::string(
"benchmark_config/parameters/queries"),
query_regex_, std::string(
".*"));
197 ROS_WARN(
"Benchmark group NOT specified");
199 if (nh.
hasParam(
"benchmark_config/parameters/workspace"))
203 nh.
param(std::string(
"benchmark_config/parameters/goal_offset/x"),
goal_offsets[0], 0.0);
204 nh.
param(std::string(
"benchmark_config/parameters/goal_offset/y"),
goal_offsets[1], 0.0);
205 nh.
param(std::string(
"benchmark_config/parameters/goal_offset/z"),
goal_offsets[2], 0.0);
206 nh.
param(std::string(
"benchmark_config/parameters/goal_offset/roll"),
goal_offsets[3], 0.0);
207 nh.
param(std::string(
"benchmark_config/parameters/goal_offset/pitch"),
goal_offsets[4], 0.0);
208 nh.
param(std::string(
"benchmark_config/parameters/goal_offset/yaw"),
goal_offsets[5], 0.0);
212 ROS_INFO(
"Benchmark timeout: %f secs",
timeout_);
213 ROS_INFO(
"Benchmark group: %s",
group_name_.c_str());
214 ROS_INFO(
"Benchmark query regex: '%s'",
query_regex_.c_str());
227 if (!nh.
getParam(
"benchmark_config/parameters/workspace/frame_id",
workspace_.header.frame_id))
228 ROS_WARN(
"Workspace frame_id not specified in benchmark config");
230 nh.
param(std::string(
"benchmark_config/parameters/workspace/min_corner/x"),
workspace_.min_corner.x, 0.0);
231 nh.
param(std::string(
"benchmark_config/parameters/workspace/min_corner/y"),
workspace_.min_corner.y, 0.0);
232 nh.
param(std::string(
"benchmark_config/parameters/workspace/min_corner/z"),
workspace_.min_corner.z, 0.0);
234 nh.
param(std::string(
"benchmark_config/parameters/workspace/max_corner/x"),
workspace_.max_corner.x, 0.0);
235 nh.
param(std::string(
"benchmark_config/parameters/workspace/max_corner/y"),
workspace_.max_corner.y, 0.0);
236 nh.
param(std::string(
"benchmark_config/parameters/workspace/max_corner/z"),
workspace_.max_corner.z, 0.0);
246 if (nh.
getParam(
"benchmark_config/planners", planner_configs))
250 ROS_ERROR(
"Expected a list of planner configurations to benchmark");
254 for (
int i = 0; i < planner_configs.
size(); ++i)
258 ROS_WARN(
"Improper YAML type for planner configurations");
261 if (!planner_configs[i].hasMember(
"plugin") || !planner_configs[i].hasMember(
"planners"))
263 ROS_WARN(
"Malformed YAML for planner configurations");
269 ROS_WARN(
"Expected a list of planners to benchmark");
273 std::string plugin = planner_configs[i][
"plugin"];
274 ROS_INFO(
"Reading in planner names for plugin '%s'", plugin.c_str());
276 std::vector<std::string> planners;
277 for (
int j = 0; j < planner_configs[i][
"planners"].
size(); ++j)
278 planners.push_back(planner_configs[i][
"planners"][j]);
280 for (std::size_t j = 0; j < planners.size(); ++j)
281 ROS_INFO(
" [%lu]: %s", j, planners[j].c_str());
std::string path_constraint_regex_
const std::string & getSceneName() const
std::string hostname_
warehouse parameters
const std::string & getOutputDirectory() const
double getTimeout() const
const std::string & getGroupName() const
const std::string & getPathConstraintRegex() const
void readWarehouseOptions(ros::NodeHandle &nh)
const std::string & getHostName() const
void readBenchmarkParameters(ros::NodeHandle &nh)
moveit_msgs::WorkspaceParameters workspace_
std::string trajectory_constraint_regex_
const std::string & getWorkspaceFrameID() const
void readPlannerConfigs(ros::NodeHandle &nh)
const std::string & getGoalConstraintRegex() const
Type const & getType() const
void readBenchmarkOptions(const std::string &ros_namespace)
const std::string & getStartStateRegex() const
void getGoalOffsets(std::vector< double > &offsets) const
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
std::string goal_constraint_regex_
void setNamespace(const std::string &ros_namespace)
std::string benchmark_name_
std::string output_directory_
virtual ~BenchmarkOptions()
const std::string & getTrajectoryConstraintRegex() const
#define ROS_INFO_STREAM(args)
const std::string & getQueryRegex() const
bool getParam(const std::string &key, std::string &s) const
const std::string & getBenchmarkName() const
int runs_
benchmark parameters
std::string start_state_regex_
const moveit_msgs::WorkspaceParameters & getWorkspaceParameters() const
bool hasParam(const std::string &key) const
void readWorkspaceParameters(ros::NodeHandle &nh)
const std::map< std::string, std::vector< std::string > > & getPlannerConfigurations() const
std::map< std::string, std::vector< std::string > > planners_
planner configurations
void getPlannerPluginList(std::vector< std::string > &plugin_list) const