Skip to content
GitLab
Menu
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
a154de8a
Commit
a154de8a
authored
Apr 29, 2016
by
Valenza Florian
Browse files
[C++] Renamed member in Frame class
parent
c68e5bfa
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/algorithm/operational-frames.hpp
View file @
a154de8a
...
...
@@ -82,8 +82,8 @@ namespace se3
{
for
(
Model
::
FrameIndex
i
=
0
;
i
<
(
Model
::
FrameIndex
)
model
.
nOperationalFrames
;
++
i
)
{
const
Model
::
JointIndex
&
parent
=
model
.
operational_frames
[
i
].
parent
_id
;
data
.
oMof
[
i
]
=
(
data
.
oMi
[
parent
]
*
model
.
operational_frames
[
i
].
frameP
lacement
);
const
Model
::
JointIndex
&
parent
=
model
.
operational_frames
[
i
].
parent
;
data
.
oMof
[
i
]
=
(
data
.
oMi
[
parent
]
*
model
.
operational_frames
[
i
].
p
lacement
);
}
}
...
...
@@ -107,14 +107,14 @@ namespace se3
assert
(
J
.
rows
()
==
data
.
J
.
rows
()
);
assert
(
J
.
cols
()
==
data
.
J
.
cols
()
);
const
Model
::
JointIndex
&
parent
=
model
.
operational_frames
[
frame_id
].
parent
_id
;
const
Model
::
JointIndex
&
parent
=
model
.
operational_frames
[
frame_id
].
parent
;
const
SE3
&
oMframe
=
data
.
oMof
[
frame_id
];
const
Frame
&
frame
=
model
.
operational_frames
[
frame_id
];
const
int
colRef
=
nv
(
model
.
joints
[
parent
])
+
idx_v
(
model
.
joints
[
parent
])
-
1
;
// Lever between the joint center and the frame center expressed in the global frame
const
SE3
::
Vector3
lever
(
data
.
oMi
[
parent
].
rotation
()
*
(
frame
.
frameP
lacement
.
translation
()));
const
SE3
::
Vector3
lever
(
data
.
oMi
[
parent
].
rotation
()
*
(
frame
.
p
lacement
.
translation
()));
getJacobian
<
localFrame
>
(
model
,
data
,
parent
,
J
);
for
(
int
j
=
colRef
;
j
>=
0
;
j
=
data
.
parents_fromRow
[(
size_t
)
j
])
...
...
src/multibody/model.hxx
View file @
a154de8a
...
...
@@ -208,7 +208,7 @@ namespace se3
inline
Model
::
JointIndex
Model
::
getFrameParent
(
const
FrameIndex
index
)
const
{
return
operational_frames
[
index
].
parent
_id
;
return
operational_frames
[
index
].
parent
;
}
inline
const
SE3
&
Model
::
getFramePlacement
(
const
std
::
string
&
name
)
const
...
...
@@ -225,7 +225,7 @@ namespace se3
inline
const
SE3
&
Model
::
getFramePlacement
(
const
FrameIndex
index
)
const
{
return
operational_frames
[
index
].
frameP
lacement
;
return
operational_frames
[
index
].
p
lacement
;
}
inline
bool
Model
::
addFrame
(
const
Frame
&
frame
)
...
...
src/python/frame.hpp
View file @
a154de8a
...
...
@@ -51,22 +51,21 @@ namespace se3
void
visit
(
PyClass
&
cl
)
const
{
cl
.
def
(
bp
::
init
<
const
std
::
string
&
,
const
JointIndex
,
const
SE3_fx
&>
((
bp
::
arg
(
"name (string)"
),
bp
::
arg
(
"parent
_id
(index)"
),
bp
::
arg
(
"SE3 placement"
)),
.
def
(
bp
::
init
<
const
std
::
string
&
,
const
JointIndex
,
const
SE3_fx
&>
((
bp
::
arg
(
"name (string)"
),
bp
::
arg
(
"parent (index)"
),
bp
::
arg
(
"SE3 placement"
)),
"Initialize from name, parent id and placement wrt parent joint."
))
.
add_property
(
"name"
,
&
FramePythonVisitor
::
getName
,
&
FramePythonVisitor
::
setName
)
.
add_property
(
"parent_id"
,
&
FramePythonVisitor
::
getParentId
,
&
FramePythonVisitor
::
setParentId
)
.
add_property
(
"framePlacement"
,
&
FramePythonVisitor
::
getPlacementWrtParentJoint
,
&
FramePythonVisitor
::
setPlacementWrtParentJoint
)
.
def_readwrite
(
"name"
,
&
Frame
::
name
,
"name of the frame"
)
.
def_readwrite
(
"parent"
,
&
Frame
::
parent
,
"id of the parent joint"
)
.
add_property
(
"placement"
,
&
FramePythonVisitor
::
getPlacementWrtParentJoint
,
&
FramePythonVisitor
::
setPlacementWrtParentJoint
,
"placement in the parent joint local frame"
)
;
}
static
std
::
string
getName
(
const
Frame
&
self
)
{
return
self
.
name
;
}
static
void
setName
(
Frame
&
self
,
const
std
::
string
&
name
)
{
self
.
name
=
name
;
}
static
JointIndex
getParentId
(
const
Frame
&
self
)
{
return
self
.
parent_id
;
}
static
void
setParentId
(
Frame
&
self
,
const
JointIndex
parent_id
)
{
self
.
parent_id
=
parent_id
;
}
static
SE3_fx
getPlacementWrtParentJoint
(
const
Frame
&
self
)
{
return
self
.
framePlacement
;
}
static
void
setPlacementWrtParentJoint
(
Frame
&
self
,
const
SE3_fx
&
placement
)
{
self
.
framePlacement
=
placement
;
}
static
SE3_fx
getPlacementWrtParentJoint
(
const
Frame
&
self
)
{
return
self
.
placement
;
}
static
void
setPlacementWrtParentJoint
(
Frame
&
self
,
const
SE3_fx
&
placement
)
{
self
.
placement
=
placement
;
}
static
void
expose
()
{
...
...
src/spatial/frame.hpp
View file @
a154de8a
...
...
@@ -36,19 +36,19 @@ namespace se3
{
typedef
se3
::
JointIndex
JointIndex
;
Frame
()
:
name
(
random
(
8
)),
parent
_id
(),
frameP
lacement
()
{}
// needed by EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION
Frame
()
:
name
(
random
(
8
)),
parent
(),
p
lacement
()
{}
// needed by EIGEN_DEFINE_STL_VECTOR_SPECIALIZATION
///
/// \brief Default constructor of a Frame
///
/// \param[in] name Name of the frame.
/// \param[in] parent
_id
Index of the parent joint in the kinematic tree.
/// \param[in]
frame_
placement Placement of the frame wrt the parent joint frame.
/// \param[in] parent Index of the parent joint in the kinematic tree.
/// \param[in] placement Placement of the frame wrt the parent joint frame.
///
Frame
(
const
std
::
string
&
name
,
const
JointIndex
parent
_id
,
const
SE3
&
frame_placement
)
:
Frame
(
const
std
::
string
&
name
,
const
JointIndex
parent
,
const
SE3
&
frame_placement
)
:
name
(
name
)
,
parent
_id
(
parent
_id
)
,
frameP
lacement
(
frame_placement
)
,
parent
(
parent
)
,
p
lacement
(
frame_placement
)
{}
///
...
...
@@ -58,18 +58,18 @@ namespace se3
///
bool
operator
==
(
const
Frame
&
other
)
const
{
return
name
==
other
.
name
&&
parent
_id
==
other
.
parent
_id
&&
frameP
lacement
==
other
.
frameP
lacement
;
return
name
==
other
.
name
&&
parent
==
other
.
parent
&&
p
lacement
==
other
.
p
lacement
;
}
/// \brief Name of the frame.
std
::
string
name
;
/// \brief Index of the parent joint.
JointIndex
parent
_id
;
JointIndex
parent
;
/// \brief Placement of the frame wrt the parent joint.
SE3
frameP
lacement
;
SE3
p
lacement
;
};
// struct Frame
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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