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
Guilhem Saurel
pinocchio
Commits
276ae00e
Commit
276ae00e
authored
Jul 02, 2018
by
jcarpent
Browse files
[Python] Use correct se3Action{.,Inverse} operators
parent
8749bba2
Changes
2
Hide whitespace changes
Inline
Side-by-side
bindings/python/spatial/force.hpp
View file @
276ae00e
...
...
@@ -22,6 +22,7 @@
#include
<eigenpy/memory.hpp>
#include
<boost/python/tuple.hpp>
#include
"pinocchio/spatial/se3.hpp"
#include
"pinocchio/spatial/force.hpp"
#include
"pinocchio/bindings/python/utils/copyable.hpp"
#include
"pinocchio/bindings/python/utils/printable.hpp"
...
...
@@ -38,6 +39,8 @@ namespace se3
struct
ForcePythonVisitor
:
public
boost
::
python
::
def_visitor
<
ForcePythonVisitor
<
Force
>
>
{
enum
{
Options
=
traits
<
Motion
>::
Options
};
typedef
typename
Force
::
Vector6
Vector6
;
typedef
typename
Force
::
Vector3
Vector3
;
typedef
typename
Force
::
Scalar
Scalar
;
...
...
@@ -67,9 +70,9 @@ namespace se3
"Returns the components of *this as a 6d vector."
)
.
add_property
(
"np"
,
&
ForcePythonVisitor
::
getVector
)
.
def
(
"se3Action"
,
&
Force
::
se3Action
,
.
def
(
"se3Action"
,
&
Force
::
template
se3Action
<
Scalar
,
Options
>
,
bp
::
args
(
"M"
),
"Returns the result of the dual action of M on *this."
)
.
def
(
"se3ActionInverse"
,
&
Force
::
se3ActionInverse
,
.
def
(
"se3ActionInverse"
,
&
Force
::
template
se3ActionInverse
<
Scalar
,
Options
>
,
bp
::
args
(
"M"
),
"Returns the result of the dual action of the inverse of M on *this."
)
.
def
(
"setZero"
,
&
ForcePythonVisitor
::
setZero
,
...
...
bindings/python/spatial/motion.hpp
View file @
276ae00e
...
...
@@ -22,6 +22,7 @@
#include
<eigenpy/memory.hpp>
#include
<boost/python/tuple.hpp>
#include
"pinocchio/spatial/se3.hpp"
#include
"pinocchio/spatial/motion.hpp"
#include
"pinocchio/spatial/force.hpp"
#include
"pinocchio/bindings/python/utils/copyable.hpp"
...
...
@@ -39,6 +40,8 @@ namespace se3
struct
MotionPythonVisitor
:
public
boost
::
python
::
def_visitor
<
MotionPythonVisitor
<
Motion
>
>
{
enum
{
Options
=
traits
<
Motion
>::
Options
};
typedef
typename
Motion
::
Scalar
Scalar
;
typedef
ForceTpl
<
Scalar
,
traits
<
Motion
>::
Options
>
Force
;
typedef
typename
Motion
::
Vector6
Vector6
;
...
...
@@ -71,9 +74,9 @@ namespace se3
"Returns the components of *this as a 6d vector."
)
.
add_property
(
"np"
,
&
MotionPythonVisitor
::
getVector
)
.
def
(
"se3Action"
,
&
Motion
::
se3Action
,
.
def
(
"se3Action"
,
&
Motion
::
template
se3Action
<
Scalar
,
Options
>
,
bp
::
args
(
"M"
),
"Returns the result of the action of M on *this."
)
.
def
(
"se3ActionInverse"
,
&
Motion
::
se3ActionInverse
,
.
def
(
"se3ActionInverse"
,
&
Motion
::
template
se3ActionInverse
<
Scalar
,
Options
>
,
bp
::
args
(
"M"
),
"Returns the result of the action of the inverse of M on *this."
)
.
add_property
(
"action"
,
&
Motion
::
toActionMatrix
,
"Returns the action matrix of *this (acting on Motion)."
)
...
...
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