Skip to content

Commit

Permalink
Merge pull request #83 from gergondet/topic/MBGMakeMultiBodyConst
Browse files Browse the repository at this point in the history
Mark MultiBodyGraph::makeMultiBody as const
  • Loading branch information
gergondet authored May 26, 2021
2 parents 62d68bf + f52e1c9 commit d911bd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions src/RBDyn/MultiBodyGraph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -127,15 +127,15 @@ std::size_t MultiBodyGraph::nrJoints() const
MultiBody MultiBodyGraph::makeMultiBody(const std::string & rootBodyName,
bool isFixed,
const sva::PTransformd & X_0_j0,
const sva::PTransformd & X_b0_j0)
const sva::PTransformd & X_b0_j0) const
{
return makeMultiBody(rootBodyName, isFixed ? Joint::Fixed : Joint::Free, X_0_j0, X_b0_j0);
}

MultiBody MultiBodyGraph::makeMultiBody(const std::string & rootBodyName,
Joint::Type rootJointType,
const sva::PTransformd & X_0_j0,
const sva::PTransformd & X_b0_j0)
const sva::PTransformd & X_b0_j0) const
{
return makeMultiBody(rootBodyName, rootJointType, Eigen::Vector3d::UnitZ(), X_0_j0, X_b0_j0);
}
Expand All @@ -144,7 +144,7 @@ MultiBody MultiBodyGraph::makeMultiBody(const std::string & rootBodyName,
Joint::Type rootJointType,
const Eigen::Vector3d & axis,
const sva::PTransformd & X_0_j0,
const sva::PTransformd & X_b0_j0)
const sva::PTransformd & X_b0_j0) const
{
using namespace Eigen;

Expand Down
6 changes: 3 additions & 3 deletions src/RBDyn/RBDyn/MultiBodyGraph.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class RBDYN_DLLAPI MultiBodyGraph
MultiBody makeMultiBody(const std::string & rootBodyName,
bool isFixed,
const sva::PTransformd & X_0_j0 = sva::PTransformd::Identity(),
const sva::PTransformd & X_b0_j0 = sva::PTransformd::Identity());
const sva::PTransformd & X_b0_j0 = sva::PTransformd::Identity()) const;

/**
* Create a MultiBody from the graph.
Expand All @@ -150,7 +150,7 @@ class RBDYN_DLLAPI MultiBodyGraph
MultiBody makeMultiBody(const std::string & rootBodyName,
Joint::Type rootJointType,
const sva::PTransformd & X_0_j0 = sva::PTransformd::Identity(),
const sva::PTransformd & X_b0_j0 = sva::PTransformd::Identity());
const sva::PTransformd & X_b0_j0 = sva::PTransformd::Identity()) const;

/**
* Create a MultiBody from the graph.
Expand All @@ -165,7 +165,7 @@ class RBDYN_DLLAPI MultiBodyGraph
Joint::Type rootJointType,
const Eigen::Vector3d & axis,
const sva::PTransformd & X_0_j0 = sva::PTransformd::Identity(),
const sva::PTransformd & X_b0_j0 = sva::PTransformd::Identity());
const sva::PTransformd & X_b0_j0 = sva::PTransformd::Identity()) const;

/**
* Remove a joint (and successor joints and bodies) from the graph.
Expand Down

0 comments on commit d911bd1

Please sign in to comment.