#include <sim3.h>
|
Eigen::Quaterniond | r |
|
Eigen::Vector3d | t |
|
double | s |
|
Definition at line 38 of file sim3.h.
g2o::Sim3::Sim3 |
( |
const Eigen::Quaterniond & |
r, |
|
|
const Eigen::Vector3d & |
t, |
|
|
double |
s |
|
) |
| |
|
inline |
g2o::Sim3::Sim3 |
( |
const Eigen::Matrix3d & |
R, |
|
|
const Eigen::Vector3d & |
t, |
|
|
double |
s |
|
) |
| |
|
inline |
g2o::Sim3::Sim3 |
( |
const Vector7d & |
update | ) |
|
|
inline |
Definition at line 68 of file sim3.h.
References g2o::skew().
71 Eigen::Vector3d omega;
72 for (
int i=0; i<3; i++)
75 Eigen::Vector3d upsilon;
76 for (
int i=0; i<3; i++)
77 upsilon[i]=update[i+3];
79 double sigma = update[6];
80 double theta = omega.norm();
81 Eigen::Matrix3d Omega =
skew(omega);
83 Eigen::Matrix3d Omega2 = Omega*Omega;
97 R = (I + Omega + Omega*Omega);
101 double theta2= theta*theta;
102 A = (1-cos(theta))/(theta2);
103 B = (theta-sin(theta))/(theta2*theta);
104 R = I + sin(theta)/theta *Omega + (1-cos(theta))/(theta*theta)*Omega2;
112 double sigma2= sigma*sigma;
113 A = ((sigma-1)*
s+1)/sigma2;
114 B= ((0.5*sigma2-sigma+1)*
s)/(sigma2*sigma);
115 R = (I + Omega + Omega2);
119 R = I + sin(theta)/theta *Omega + (1-cos(theta))/(theta*theta)*Omega2;
120 double a=
s*sin(theta);
121 double b=
s*cos(theta);
122 double theta2= theta*theta;
123 double sigma2= sigma*sigma;
124 double c=theta2+sigma2;
125 A = (a*sigma+ (1-b)*theta)/(theta*c);
126 B = (C-((b-1)*sigma+a*theta)/(c))*1./(theta2);
130 r = Eigen::Quaterniond(R);
134 Eigen::Matrix3d W = A*Omega + B*Omega2 + C*I;
G2O_TYPES_SLAM3D_API Matrix3D skew(const Vector3D &v)
Sim3 g2o::Sim3::inverse |
( |
| ) |
const |
|
inline |
Definition at line 142 of file sim3.h.
References g2o::deltaR(), and g2o::skew().
Referenced by g2o::EdgeSim3::computeError(), g2o::VertexSim3Expmap::write(), and g2o::EdgeSim3::write().
145 double sigma = std::log(
s);
147 Eigen::Vector3d omega;
148 Eigen::Vector3d upsilon;
150 Eigen::Matrix3d R =
r.toRotationMatrix();
151 double d = 0.5*(R(0,0)+R(1,1)+R(2,2)-1);
153 Eigen::Matrix3d Omega;
155 double eps = 0.00001;
156 Eigen::Matrix3d I = Eigen::Matrix3d::Identity();
171 double theta = acos(d);
172 double theta2 = theta*theta;
173 omega = theta/(2*sqrt(1-d*d))*
deltaR(R);
175 A = (1-cos(theta))/(theta2);
176 B = (theta-sin(theta))/(theta2*theta);
184 double sigma2 = sigma*sigma;
187 A = ((sigma-1)*
s+1)/(sigma2);
188 B = ((0.5*sigma2-sigma+1)*
s)/(sigma2*sigma);
192 double theta = acos(d);
193 omega = theta/(2*sqrt(1-d*d))*
deltaR(R);
195 double theta2 = theta*theta;
196 double a=
s*sin(theta);
197 double b=
s*cos(theta);
198 double c=theta2 + sigma*sigma;
199 A = (a*sigma+ (1-b)*theta)/(theta*c);
200 B = (C-((b-1)*sigma+a*theta)/(c))*1./(theta2);
204 Eigen::Matrix3d W = A*Omega + B*Omega*Omega + C*I;
206 upsilon = W.lu().solve(
t);
208 for (
int i=0; i<3; i++)
211 for (
int i=0; i<3; i++)
212 res[i+3] = upsilon[i];
Eigen::Matrix< double, 7, 1 > Vector7d
G2O_TYPES_SLAM3D_API Vector3D deltaR(const Matrix3D &R)
G2O_TYPES_SLAM3D_API Matrix3D skew(const Vector3D &v)
Eigen::Vector3d g2o::Sim3::map |
( |
const Eigen::Vector3d & |
xyz | ) |
const |
|
inline |
void g2o::Sim3::normalizeRotation |
( |
| ) |
|
|
inline |
Sim3 g2o::Sim3::operator* |
( |
const Sim3 & |
other | ) |
const |
|
inline |
Definition at line 252 of file sim3.h.
References r, s, and t.
255 ret.t=
s*(
r*other.t)+
t;
Sim3& g2o::Sim3::operator*= |
( |
const Sim3 & |
other | ) |
|
|
inline |
Definition at line 260 of file sim3.h.
261 Sim3 ret=(*this)*other;
double g2o::Sim3::operator[] |
( |
int |
i | ) |
const |
|
inline |
Definition at line 225 of file sim3.h.
References s.
230 return r.coeffs()[i];
double& g2o::Sim3::operator[] |
( |
int |
i | ) |
|
|
inline |
Definition at line 238 of file sim3.h.
References s.
243 return r.coeffs()[i];
const Eigen::Quaterniond& g2o::Sim3::rotation |
( |
| ) |
const |
|
inline |
Eigen::Quaterniond& g2o::Sim3::rotation |
( |
| ) |
|
|
inline |
Definition at line 277 of file sim3.h.
References r.
const double& g2o::Sim3::scale |
( |
| ) |
const |
|
inline |
double& g2o::Sim3::scale |
( |
| ) |
|
|
inline |
Definition at line 281 of file sim3.h.
References s.
const Eigen::Vector3d& g2o::Sim3::translation |
( |
| ) |
const |
|
inline |
Eigen::Vector3d& g2o::Sim3::translation |
( |
| ) |
|
|
inline |
Definition at line 273 of file sim3.h.
References t.
Eigen::Quaterniond g2o::Sim3::r |
|
protected |
Eigen::Vector3d g2o::Sim3::t |
|
protected |
The documentation for this struct was generated from the following file:
- /home/xuezhisd/CLionProjects/g2o/g2o/types/sim3/sim3.h