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
Guilhem Saurel
ndcurves
Commits
1790b9a5
Commit
1790b9a5
authored
Jan 23, 2020
by
Pierre Fernbach
Browse files
[Python] add bindings for SE3.translation_curve and SE3.rotation_curve
parent
7638fa97
Changes
1
Hide whitespace changes
Inline
Side-by-side
python/curves/curves_python.cpp
View file @
1790b9a5
...
...
@@ -356,6 +356,14 @@ SE3Curve_t* wrapSE3CurveFromTwoCurves(const curve_ptr_t& translation_curve,
return
new
SE3Curve_t
(
translation_curve
,
rotation_curve
);
}
curve_abc_t
*
SE3getTranslationCurve
(
SE3Curve_t
&
self
){
return
self
.
translation_curve
().
get
();
}
curve_rotation_t
*
SE3getRotationCurve
(
SE3Curve_t
&
self
){
return
self
.
rotation_curve
().
get
();
}
#ifdef CURVES_WITH_PINOCCHIO_SUPPORT
typedef
pinocchio
::
SE3Tpl
<
real
,
0
>
SE3_t
;
typedef
pinocchio
::
MotionTpl
<
real
,
0
>
Motion_t
;
...
...
@@ -944,6 +952,10 @@ BOOST_PYTHON_MODULE(curves) {
"translation curve."
"The orientation along the SE3Curve will be a slerp between the two given rotations."
"The orientations should be represented as 3x3 rotation matrix"
)
.
def
(
"translation_curve"
,
&
SE3getTranslationCurve
,
return_internal_reference
<>
(),
"Return a curve corresponding to the translation part of self."
)
.
def
(
"rotation_curve"
,
&
SE3getRotationCurve
,
return_internal_reference
<>
(),
"Return a curve corresponding to the rotation part of self."
)
.
def
(
"saveAsText"
,
&
SE3Curve_t
::
saveAsText
<
SE3Curve_t
>
,
bp
::
args
(
"filename"
),
"Saves *this inside a text file."
)
.
def
(
"loadFromText"
,
&
SE3Curve_t
::
loadFromText
<
SE3Curve_t
>
,
bp
::
args
(
"filename"
),
"Loads *this from a text file."
)
...
...
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