Skip to content

Commit

Permalink
Clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
marip8 committed Sep 29, 2023
1 parent b7a6d9f commit 9a8569d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
3 changes: 1 addition & 2 deletions include/reach/utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,7 @@ void reachNeighborsRecursive(const ReachResult& db, const ReachRecord& msg, IKSo
/**
* @brief Extracts the subset vector of values from the input map that correspond to the ordered input keys
*/
std::vector<double> extractSubset(const std::map<std::string, double>& input,
const std::vector<std::string>& keys);
std::vector<double> extractSubset(const std::map<std::string, double>& input, const std::vector<std::string>& keys);

} // namespace reach

Expand Down
5 changes: 3 additions & 2 deletions src/reach_study.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,15 @@ void ReachStudy::checkSeedState()
{
// Check the optional seed state parameter
const std::vector<std::string> joint_names = ik_solver_->getJointNames();
if(params_.seed_state.empty())
if (params_.seed_state.empty())
{
logger_->print("Seed state is empty; setting to all-zeros state");
params_.seed_state = zip(joint_names, std::vector<double>(joint_names.size(), 0.0));
}
else
{
// Attempt to extract a subset of the seed state for the provided joint names. This function throws an exception if this is not possible
// Attempt to extract a subset of the seed state for the provided joint names. This function throws an exception if
// this is not possible
extractSubset(params_.seed_state, joint_names);
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/utils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,7 @@ void reachNeighborsRecursive(const ReachResult& db, const ReachRecord& rec, IKSo
}
}

std::vector<double> extractSubset(const std::map<std::string, double>& input,
const std::vector<std::string>& keys)
std::vector<double> extractSubset(const std::map<std::string, double>& input, const std::vector<std::string>& keys)
{
if (keys.size() > input.size())
throw std::runtime_error("Seed pose size was not at least as large as the number of joints in the planning group");
Expand Down

0 comments on commit 9a8569d

Please sign in to comment.