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
31861369
Commit
31861369
authored
Feb 15, 2016
by
jcarpent
Browse files
[C++][Python] Rename getJointToFrameTransform to getFramePlacement
parent
99473296
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/multibody/model.hpp
View file @
31861369
...
...
@@ -120,10 +120,9 @@ namespace se3
bool
existFrame
(
const
std
::
string
&
name
)
const
;
const
std
::
string
&
getFrameName
(
const
Index
index
)
const
;
const
Index
&
getFrameParent
(
const
std
::
string
&
name
)
const
;
const
Index
&
getFrameParent
(
Index
index
)
const
;
const
SE3
&
getJointToFrameTransform
(
const
std
::
string
&
name
)
const
;
const
SE3
&
getJointToFrameTransform
(
Index
index
)
const
;
const
Index
&
getFrameParent
(
const
Index
index
)
const
;
const
SE3
&
getFramePlacement
(
const
std
::
string
&
name
)
const
;
const
SE3
&
getFramePlacement
(
const
Index
index
)
const
;
bool
addFrame
(
const
Frame
&
frame
);
bool
addFrame
(
const
std
::
string
&
name
,
Index
index
,
const
SE3
&
placement
);
...
...
src/multibody/model.hxx
View file @
31861369
...
...
@@ -202,7 +202,7 @@ namespace se3
return
operational_frames
[
index
].
parent_id
;
}
inline
const
SE3
&
Model
::
get
JointToFrameTransform
(
const
std
::
string
&
name
)
const
inline
const
SE3
&
Model
::
get
FramePlacement
(
const
std
::
string
&
name
)
const
{
assert
(
existFrame
(
name
)
&&
"The Frame you requested does not exist"
);
std
::
vector
<
Frame
>::
const_iterator
it
=
std
::
find_if
(
operational_frames
.
begin
()
...
...
@@ -211,10 +211,10 @@ namespace se3
);
std
::
vector
<
Frame
>::
iterator
::
difference_type
it_diff
=
it
-
operational_frames
.
begin
();
return
get
JointToFrameTransform
(
Model
::
Index
(
it_diff
));
return
get
FramePlacement
(
Model
::
Index
(
it_diff
));
}
inline
const
SE3
&
Model
::
get
JointToFrameTransform
(
Model
::
Index
index
)
const
inline
const
SE3
&
Model
::
get
FramePlacement
(
const
Index
index
)
const
{
return
operational_frames
[
index
].
frame_placement
;
}
...
...
src/python/model.hpp
View file @
31861369
//
// Copyright (c) 2015 CNRS
// Copyright (c) 2015
-2016
CNRS
// Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France.
//
// This file is part of Pinocchio
...
...
@@ -133,9 +133,9 @@ namespace se3
.
add_property
(
"fix_bodyNames"
,
bp
::
make_function
(
&
ModelPythonVisitor
::
fix_bodyNames
,
bp
::
return_internal_reference
<>
())
)
.
def
(
"getFrameParent"
,
&
ModelPythonVisitor
::
getFrameParent
)
.
def
(
"getFramePlacement"
,
&
ModelPythonVisitor
::
getJointToFrameTransform
)
.
def
(
"addExtraFrame"
,
&
ModelPythonVisitor
::
addExtraFrame
)
.
add_property
(
"operational_frames"
,
bp
::
make_function
(
&
ModelPythonVisitor
::
extraFrames
,
bp
::
return_internal_reference
<>
())
)
.
def
(
"getFramePlacement"
,
&
ModelPythonVisitor
::
getFramePlacement
)
.
add_property
(
"gravity"
,
&
ModelPythonVisitor
::
gravity
,
&
ModelPythonVisitor
::
setGravity
)
.
def
(
"BuildEmptyModel"
,
&
ModelPythonVisitor
::
maker_empty
)
...
...
@@ -180,8 +180,8 @@ namespace se3
static
std
::
vector
<
std
::
string
>
&
fix_bodyNames
(
ModelHandler
&
m
)
{
return
m
->
fix_bodyNames
;
}
static
Model
::
Index
getFrameParent
(
ModelHandler
&
m
,
const
std
::
string
&
name
)
{
return
m
->
getFrameParent
(
name
);
}
static
SE3
getJointToFrameTransform
(
ModelHandler
&
m
,
const
std
::
string
&
name
)
{
return
m
->
getJointToFrameTransform
(
name
);
}
static
void
addExtraFrame
(
ModelHandler
&
m
,
const
std
::
string
&
frameName
,
Index
parent
,
const
SE3_fx
&
placementWrtParent
)
static
SE3
getFramePlacement
(
ModelHandler
&
m
,
const
std
::
string
&
name
)
{
return
m
->
getFramePlacement
(
name
);
}
{
m
->
addFrame
(
frameName
,
parent
,
placementWrtParent
);
}
...
...
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