expose-explog.cpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015-2021 CNRS INRIA
3 // Copyright (c) 2015 Wandercraft, 86 rue de Paris 91400 Orsay, France.
4 //
5 
6 #include <boost/python.hpp>
7 
10 
11 namespace pinocchio
12 {
13  namespace python
14  {
15  namespace bp = boost::python;
16 
17  void exposeExplog()
18  {
19 
20  bp::def(
21  "exp3", &exp3_proxy<context::Vector3s>, bp::arg("w"),
22  "Exp: so3 -> SO3. Return the integral of the input"
23  " vector w during time 1. This is also known as the Rodrigues formula.");
24 
25  bp::def(
26  "exp3_quat", &exp3_proxy_quat<context::Vector3s>, bp::arg("w"),
27  "Exp: so3 -> S3. Returns the integral of the input vector w during time 1, represented "
28  "as a unit Quaternion.");
29 
30  bp::def(
31  "Jexp3", &Jexp3_proxy<context::Vector3s>, bp::arg("w"),
32  "Jacobian of exp(v) which maps from the tangent of SO(3) at R = exp(v) to"
33  " the tangent of SO(3) at Identity.");
34 
35  bp::def(
36  "log3", &log3_proxy<context::Matrix3s>, bp::arg("R"),
37  "Log: SO3 -> so3 is the pseudo-inverse of Exp: so3 -> SO3. Log maps from SO3"
38  " -> { v in so3, ||v|| < 2pi }.");
39 
40  bp::def(
41  "log3", &log3_proxy<context::Matrix3s, context::Matrix1s>, bp::args("R", "theta"),
42  "Log: SO3 -> so3 is the pseudo-inverse of Exp: so3 -> SO3. Log maps from SO3"
43  " -> { v in so3, ||v|| < 2pi }.\n"
44  "It also returns the angle of rotation theta around the rotation axis.");
45 
46  bp::def(
47  "log3", &log3_proxy_fix<context::Matrix3s, context::Scalar>, bp::args("R", "theta"),
48  "Log: SO3 -> so3 is the pseudo-inverse of Exp: so3 -> SO3. Log maps from SO3"
49  " -> { v in so3, ||v|| < 2pi }.\n"
50  "It also returns the angle of rotation theta around the rotation axis.");
51 
52  bp::def(
53  "log3", &log3_proxy<context::Quaternion>, bp::args("quat"),
54  "Log: S^3 -> so3 is the pseudo-inverse of Exp: so3 -> S^3, the exponential map from "
55  "so3 to the unit"
56  " quaternions. It maps from S^3 -> { v in so3, ||v|| < 2pi }.");
57 
58  bp::def(
59  "log3", &log3_proxy_quatvec<context::Vector4s>, bp::args("quat"),
60  "Log: S^3 -> so3 is the pseudo-inverse of Exp: so3 -> S^3, the exponential map from "
61  "so3 to the unit"
62  " quaternions. It maps from S^3 -> { v in so3, ||v|| < 2pi }.");
63 
64  bp::def(
65  "log3", &log3_proxy_quatvec<context::Vector4s, context::Matrix1s>,
66  bp::args("quat", "theta"),
67  "Log: S^3 -> so3 is the pseudo-inverse of Exp: so3 -> S^3, the exponential map from "
68  "so3 to the unit"
69  " quaternions. It maps from S^3 -> { v in so3, ||v|| < 2pi }.\n"
70  "It also returns the angle of rotation theta around the rotation axis.");
71 
72  bp::def(
73  "log3", &log3_proxy_quatvec_fix<context::Vector4s, context::Scalar>,
74  bp::args("quat", "theta"),
75  "Log: S^3 -> so3 is the pseudo-inverse of Exp: so3 -> S^3, the exponential map from "
76  "so3 to the unit"
77  " quaternions. It maps from S^3 -> { v in so3, ||v|| < 2pi }.\n"
78  "It also returns the angle of rotation theta around the rotation axis.");
79 
80  bp::def(
81  "Jlog3", &Jlog3_proxy<context::Matrix3s>, bp::arg("R"),
82  "Jacobian of log(R) which maps from the tangent of SO(3) at R to"
83  " the tangent of SO(3) at Identity.");
84 
85  bp::def(
86  "Hlog3", &Hlog3_proxy<Eigen::Matrix3d, Eigen::Vector3d>, bp::args("R", "v"),
87  "Vector v to be multiplied to the hessian", "v^T * H where H is the Hessian of log(R)");
88 
89  bp::def(
90  "exp6", &exp6_proxy<context::Scalar, context::Options>, bp::arg("motion"),
91  "Exp: se3 -> SE3. Return the integral of the input"
92  " spatial velocity during time 1.");
93 
94  bp::def(
95  "exp6", &exp6_proxy<context::Motion::Vector6>, bp::arg("v"),
96  "Exp: se3 -> SE3. Return the integral of the input"
97  " spatial velocity during time 1.");
98 
99  bp::def(
100  "exp6_quat", &exp6_proxy_quatvec<context::Motion::Vector6>, bp::arg("v"),
101  "Exp: se3 -> R3 * S3. Return the integral of the input 6D spatial velocity over unit time,"
102  " using quaternion to represent rotation as in the standard configuration layout"
103  " for the Lie group SE3.");
104 
105  bp::def(
106  "Jexp6", &Jexp6_proxy<context::Scalar, context::Options>, bp::arg("motion"),
107  "Jacobian of exp(v) which maps from the tangent of SE(3) at exp(v) to"
108  " the tangent of SE(3) at Identity.");
109 
110  bp::def(
111  "Jexp6", &Jexp6_proxy<context::Motion::Vector6>, bp::arg("v"),
112  "Jacobian of exp(v) which maps from the tangent of SE(3) at exp(v) to"
113  " the tangent of SE(3) at Identity.");
114 
115  bp::def(
116  "log6", (context::Motion(*)(const context::SE3 &))&log6<context::Scalar, context::Options>,
117  bp::arg("M"),
118  "Log: SE3 -> se3. Pseudo-inverse of exp from SE3"
119  " -> { v,w in se3, ||w|| < 2pi }.");
120 
121  bp::def(
122  "log6", &log6_proxy<context::Matrix4s>, bp::arg("homegeneous_matrix"),
123  "Log: SE3 -> se3. Pseudo-inverse of Exp: so3 -> SO3. Log maps from SE3"
124  " -> { v,w in se3, ||w|| < 2pi }.");
125 
126  bp::def(
127  "log6_quat", &log6_proxy_quatvec<context::Vector7s>, bp::arg("q"),
128  "Log: R^3 * S^3 -> se3. Pseudo-inverse of Exp: se3 -> R^3 * S^3,",
129  " the variant of the SE3 Exp using quaternions for the rotations.");
130 
131  bp::def(
132  "Jlog6", &Jlog6_proxy<context::Scalar, context::Options>, bp::arg("M"),
133  "Jacobian of log(M) which maps from the tangent of SE(3) at M to"
134  " the tangent of SE(3) at Identity.");
135  }
136 
137  } // namespace python
138 } // namespace pinocchio
boost::python
pinocchio::SE3Tpl< Scalar, Options >
context.hpp
python
explog.hpp
pinocchio::MotionTpl< Scalar, Options >
pinocchio::python::exposeExplog
void exposeExplog()
Definition: expose-explog.cpp:17
pinocchio
Main pinocchio namespace.
Definition: timings.cpp:27


pinocchio
Author(s):
autogenerated on Fri Nov 1 2024 02:41:43