Skip to content

Commit e90e60f

Browse files
committed
Format!
1 parent 9cdde7d commit e90e60f

File tree

2 files changed

+9
-10
lines changed

2 files changed

+9
-10
lines changed

moveit_core/cost_functions/src/cost_functions.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,22 +45,22 @@ namespace cost_functions
4545
// Create cost function
4646
return [](const moveit::core::RobotState& robot_state, const planning_interface::MotionPlanRequest& request,
4747
const planning_scene::PlanningSceneConstPtr& planning_scene) {
48-
49-
std::vector<double> joint_pos;
50-
robot_state.copyJointGroupPositions(request.group_name, joint_pos);
51-
for(auto const val : joint_pos){
52-
std::cout << "Joint pos: " << val << std::endl;
53-
}
48+
std::vector<double> joint_pos;
49+
robot_state.copyJointGroupPositions(request.group_name, joint_pos);
50+
for (auto const val : joint_pos)
51+
{
52+
std::cout << "Joint pos: " << val << std::endl;
53+
}
5454
auto const shortest_distance_to_collision = planning_scene->distanceToCollisionUnpadded(robot_state);
5555

5656
// Return cost based on shortest_distance if the robot is not in contact or penetrated a collision object
5757
if (shortest_distance_to_collision > 0.0)
5858
{
59-
std::cout << "Cost: " << 1.0/ shortest_distance_to_collision << std::endl;
59+
std::cout << "Cost: " << 1.0 / shortest_distance_to_collision << std::endl;
6060
// The closer the collision object the higher the cost
6161
return 1.0 / shortest_distance_to_collision;
6262
}
63-
std::cout << "Cost: " << std::numeric_limits<double>::infinity() << std::endl;
63+
std::cout << "Cost: " << std::numeric_limits<double>::infinity() << std::endl;
6464
return std::numeric_limits<double>::infinity(); // Return a max cost cost by default
6565
};
6666
}

moveit_planners/ompl/ompl_interface/src/model_based_planning_context.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,7 @@ void ompl_interface::ModelBasedPlanningContext::useConfig(const planning_scene::
378378

379379
if (state_cost_function_ != nullptr)
380380
{
381-
RCLCPP_WARN(LOGGER, "%s: Use user defined optimization function!",
382-
name_.c_str());
381+
RCLCPP_WARN(LOGGER, "%s: Use user defined optimization function!", name_.c_str());
383382
objective = std::make_shared<ompl_interface::PlanningInterfaceObjective>(ompl_simple_setup_->getSpaceInformation(),
384383
planning_scene, req, state_cost_function_);
385384
ompl_simple_setup_->setOptimizationObjective(objective);

0 commit comments

Comments
 (0)