Skip to content

Commit

Permalink
Rename setPairCollisionMarginData to setPairCollisionCoeff
Browse files Browse the repository at this point in the history
  • Loading branch information
rjoomen authored and Levi-Armstrong committed Jun 6, 2023
1 parent 8066b98 commit 73cde01
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,19 @@ struct CollisionCoeffData
CollisionCoeffData(const double& default_collision_coeff = 1);

/**
* @brief Set the margin for a given contact pair
* @brief Set the coefficient for a given contact pair
*
* The order of the object names does not matter, that is handled internal to
* the class.
*
* @param obj1 The first object name. Order doesn't matter
* @param obj2 The Second object name. Order doesn't matter
* @param Coeff used for collision pair
* @param Coeff Coefficient
*/
void setPairCollisionMarginData(const std::string& obj1, const std::string& obj2, const double& collision_coeff);
void setPairCollisionCoeff(const std::string& obj1, const std::string& obj2, const double& collision_coeff);

/**
* @brief Get the pairs collision coeff
* @brief Get the pairs collision coefficient
*
* If a collision coeff for the request pair does not exist it returns the default collision coeff
*
Expand All @@ -75,7 +75,7 @@ struct CollisionCoeffData
const double& getPairCollisionCoeff(const std::string& obj1, const std::string& obj2) const;

private:
/// Stores the collision margin used if no pair-specific one is set
/// Stores the collision coefficient used if no pair-specific one is set
double default_collision_coeff_;

/// A map of link pair names to contact distance
Expand Down
6 changes: 3 additions & 3 deletions trajopt_ifopt/src/constraints/collision/collision_types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,9 @@ CollisionCoeffData::CollisionCoeffData(const double& default_collision_coeff)
{
}

void CollisionCoeffData::setPairCollisionMarginData(const std::string& obj1,
const std::string& obj2,
const double& collision_coeff)
void CollisionCoeffData::setPairCollisionCoeff(const std::string& obj1,
const std::string& obj2,
const double& collision_coeff)
{
auto key = tesseract_common::makeOrderedLinkPair(obj1, obj2);
lookup_table_[key] = collision_coeff;
Expand Down

0 comments on commit 73cde01

Please sign in to comment.