Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
pinocchio
Commits
089f46b7
Verified
Commit
089f46b7
authored
Nov 03, 2019
by
Justin Carpentier
Browse files
model: use JointModel as input for addJoint method
parent
ae5d9ced
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/multibody/model.hpp
View file @
089f46b7
...
...
@@ -350,9 +350,8 @@ namespace pinocchio
///
/// \sa Model::appendBodyToJoint, Model::addJointFrame
///
template
<
typename
JointModelDerived
>
JointIndex
addJoint
(
const
JointIndex
parent
,
const
JointModel
Base
<
JointModelDerived
>
&
joint_model
,
const
JointModel
&
joint_model
,
const
SE3
&
joint_placement
,
const
std
::
string
&
joint_name
,
const
VectorXs
&
max_effort
,
...
...
@@ -378,12 +377,10 @@ namespace pinocchio
///
/// \sa Model::appendBodyToJoint
///
template
<
typename
JointModelDerived
>
JointIndex
addJoint
(
const
JointIndex
parent
,
const
JointModel
Base
<
JointModelDerived
>
&
joint_model
,
const
JointModel
&
joint_model
,
const
SE3
&
joint_placement
,
const
std
::
string
&
joint_name
);
const
std
::
string
&
joint_name
);
///
/// \brief Add a joint to the frame tree.
...
...
src/multibody/model.hxx
View file @
089f46b7
...
...
@@ -55,10 +55,9 @@ namespace pinocchio
}
template
<
typename
Scalar
,
int
Options
,
template
<
typename
,
int
>
class
JointCollectionTpl
>
template
<
typename
JointModelDerived
>
typename
ModelTpl
<
Scalar
,
Options
,
JointCollectionTpl
>::
JointIndex
ModelTpl
<
Scalar
,
Options
,
JointCollectionTpl
>::
addJoint
(
const
JointIndex
parent
,
const
JointModel
Base
<
JointModelDerived
>
&
joint_model
,
const
JointModel
&
joint_model
,
const
SE3
&
joint_placement
,
const
std
::
string
&
joint_name
,
const
VectorXs
&
max_effort
,
...
...
@@ -80,7 +79,8 @@ namespace pinocchio
JointIndex
idx
=
(
JointIndex
)(
njoints
++
);
joints
.
push_back
(
JointModel
(
joint_model
.
derived
()));
JointModelDerived
&
jmodel
=
boost
::
get
<
JointModelDerived
>
(
joints
.
back
());
// JointModelDerived & jmodel = boost::get<JointModelDerived>(joints.back());
JointModel
&
jmodel
=
joints
.
back
();
jmodel
.
setIndexes
(
idx
,
nq
,
nv
);
const
int
joint_nq
=
jmodel
.
nq
();
...
...
@@ -129,10 +129,9 @@ namespace pinocchio
}
template
<
typename
Scalar
,
int
Options
,
template
<
typename
,
int
>
class
JointCollectionTpl
>
template
<
typename
JointModelDerived
>
typename
ModelTpl
<
Scalar
,
Options
,
JointCollectionTpl
>::
JointIndex
ModelTpl
<
Scalar
,
Options
,
JointCollectionTpl
>::
addJoint
(
const
JointIndex
parent
,
const
JointModel
Base
<
JointModelDerived
>
&
joint_model
,
const
JointModel
&
joint_model
,
const
SE3
&
joint_placement
,
const
std
::
string
&
joint_name
)
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment