Skip to content

Commit

Permalink
Formatting + small bug
Browse files Browse the repository at this point in the history
  • Loading branch information
sjahr committed Nov 3, 2022
1 parent e1e14dc commit f25ee38
Showing 1 changed file with 22 additions and 19 deletions.
41 changes: 22 additions & 19 deletions moveit_ros/benchmarks/src/BenchmarkExecutor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -461,31 +461,31 @@ bool BenchmarkExecutor::loadBenchmarkQueryData(

RCLCPP_INFO(LOGGER, "Scene name: '%s'", options.getSceneName().c_str());

if(!loadPlanningScene(options.getSceneName(), scene_msg))
if (!loadPlanningScene(options.getSceneName(), scene_msg))
{
RCLCPP_ERROR(LOGGER, "Failed to load the planning scene");
return false;
RCLCPP_ERROR(LOGGER, "Failed to load the planning scene");
return false;
}
if(!loadStates(options.getStartStateRegex(), start_states))
if (!loadStates(options.getStartStateRegex(), start_states))
{
RCLCPP_ERROR(LOGGER, "Failed to load the states");
return false;
RCLCPP_ERROR(LOGGER, "Failed to load the states");
return false;
}
if(!loadPathConstraints(options.getGoalConstraintRegex(), goal_constraints))
if (!loadPathConstraints(options.getGoalConstraintRegex(), goal_constraints))
{
RCLCPP_ERROR(LOGGER, "Failed to load the goal constraints");
RCLCPP_ERROR(LOGGER, "Failed to load the goal constraints");
}
if(!loadPathConstraints(options.getPathConstraintRegex(), path_constraints))
if (!loadPathConstraints(options.getPathConstraintRegex(), path_constraints))
{
RCLCPP_ERROR(LOGGER, "Failed to load the path constraints");
RCLCPP_ERROR(LOGGER, "Failed to load the path constraints");
}
if(!loadTrajectoryConstraints(options.getTrajectoryConstraintRegex(), traj_constraints))
if (!loadTrajectoryConstraints(options.getTrajectoryConstraintRegex(), traj_constraints))
{
RCLCPP_ERROR(LOGGER, "Failed to load the trajectory constraints");
RCLCPP_ERROR(LOGGER, "Failed to load the trajectory constraints");
}
if(!loadQueries(options.getQueryRegex(), options.getSceneName(), queries))
if (!loadQueries(options.getQueryRegex(), options.getSceneName(), queries))
{
RCLCPP_ERROR(LOGGER, "Failed to get a query regex");
RCLCPP_ERROR(LOGGER, "Failed to get a query regex");
}
return true;
}
Expand Down Expand Up @@ -630,7 +630,7 @@ bool BenchmarkExecutor::loadPlanningScene(const std::string& scene_name, moveit_

if (!planning_scene_storage_->getPlanningScene(planning_scene_w_metadata, scene_name))
{
RCLCPP_ERROR(LOGGER,"I FAIL");
RCLCPP_ERROR(LOGGER, "I FAIL");
RCLCPP_ERROR(LOGGER, "Failed to load planning scene '%s'", scene_name.c_str());
return false;
}
Expand All @@ -648,9 +648,11 @@ bool BenchmarkExecutor::loadPlanningScene(const std::string& scene_name, moveit_
scene_msg.robot_model_name =
"NO ROBOT INFORMATION. ONLY WORLD GEOMETRY"; // this will be fixed when running benchmark
}
else{
else
{
RCLCPP_ERROR(LOGGER, "Failed to find planning scene '%s'", scene_name.c_str());
return false;}
return false;
}
}
catch (std::exception& ex)
{
Expand All @@ -664,8 +666,9 @@ bool BenchmarkExecutor::loadPlanningScene(const std::string& scene_name, moveit_
bool BenchmarkExecutor::loadQueries(const std::string& regex, const std::string& scene_name,
std::vector<BenchmarkRequest>& queries)
{
if (regex.empty()){
RCLCPP_WARN(LOGGER, "No query regex provided, don't load any queries from the database")
if (regex.empty())
{
RCLCPP_WARN(LOGGER, "No query regex provided, don't load any queries from the database");
return true;
}

Expand Down

0 comments on commit f25ee38

Please sign in to comment.