资源简介
slam高博随书代码slambook-master.rar
代码片段和文件信息
// This file is part of Sophus.
//
// Copyright 2012 Hauke Strasdat (Imperial College London)
//
// Permission is hereby granted free of charge to any person obtaining a copy
// of this software and associated documentation files (the “Software“) to
// deal in the Software without restriction including without limitation the
// rights to use copy modify merge publish distribute sublicense and/or
// sell copies of the Software and to permit persons to whom the Software is
// furnished to do so subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED “AS IS“ WITHOUT WARRANTY OF ANY KIND EXPRESS OR
// IMPLIED INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM DAMAGES OR OTHER
// LIABILITY WHETHER IN AN ACTION OF CONTRACT TORT OR OTHERWISE ARISING
// FROM OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
// IN THE SOFTWARE.
#include
#include “scso3.h“
namespace Sophus
{
ScSO3::ScSO3()
{
quaternion_.setIdentity();
}
ScSO3
::ScSO3(const ScSO3 & other) : quaternion_(other.quaternion_) {}
ScSO3
::ScSO3(const Matrix3d & scale_times_R)
{
Matrix3d squaredScaleMat = scale_times_R*scale_times_R.transpose();
double squaredScale
=( 1./3.)*(squaredScaleMat(00)
+squaredScaleMat(11)
+squaredScaleMat(22));
assert(squaredScale>0);
double scale = sqrt(squaredScale);
quaternion_ = scale_times_R/scale;
quaternion_.coeffs() *= scale;
}
ScSO3
::ScSO3(double scale
const Matrix3d & R)
{
assert(scale>0);
quaternion_ = R;
quaternion_.normalize();
quaternion_.coeffs() *= scale;
}
ScSO3
::ScSO3(double scale const SO3 & so3)
{
assert(scale>0);
quaternion_ = so3.unit_quaternion();
quaternion_.coeffs() *= scale;
}
ScSO3
::ScSO3(const Quaterniond & quat) : quaternion_(quat) {}
void ScSO3
::operator=(const ScSO3 & other)
{
this->quaternion_ = other.quaternion_;
}
ScSO3 ScSO3
::operator*(const ScSO3& other) const
{
ScSO3 result(*this);
result.quaternion_ *= other.quaternion_;
return result;
}
void ScSO3
::operator*=(const ScSO3& other)
{
quaternion_ *= other.quaternion_;
}
Vector3d ScSO3
::operator*(const Vector3d & xyz) const
{
//ToDO: implement this directly!
double scale = quaternion().norm();
Quaterniond norm_quad = quaternion_;
norm_quad.coeffs() /= scale;
return scale*norm_quad._transformVector(xyz);
}
ScSO3 ScSO3
::inverse() const
{
assert(quaternion_.squaredNorm()>0.);
return ScSO3(quaternion().inverse());
}
Matrix3d ScSO3
::matrix() const
{
//ToDO: implement this directly!
double scale = quaternion().norm();
Quaterniond norm_quad = quaternion_;
norm_quad.coeffs() /= scale;
return scale*norm_quad.toRotat
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 66 2017-03-05 22:32 slambook-master\.gitignore
文件 14605482 2017-03-05 22:32 slambook-master\3rdparty\ceres-solver.tar.gz
文件 1243868 2017-03-05 22:32 slambook-master\3rdparty\DBow3.tar.gz
文件 8342066 2017-03-05 22:32 slambook-master\3rdparty\g2o.tar.gz
文件 3527776 2017-03-05 22:32 slambook-master\3rdparty\Pangolin.tar.gz
文件 259 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\config
文件 73 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\desc
文件 41 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\HEAD
文件 452 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\hooks\applypatch-msg.sample
文件 896 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\hooks\commit-msg.sample
文件 189 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\hooks\post-update.sample
文件 398 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\hooks\pre-applypatch.sample
文件 1642 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\hooks\pre-commit.sample
文件 1352 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\hooks\pre-push.sample
文件 4898 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\hooks\pre-reba
文件 1239 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\hooks\prepare-commit-msg.sample
文件 3611 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\hooks\update.sample
文件 1856 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\index
文件 240 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\info\exclude
文件 374 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\logs\HEAD
文件 191 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\logs\refs\heads\master
文件 191 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\logs\refs\remotes\origin\HEAD
文件 20840 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\ob
文件 242441 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\ob
文件 242 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\packed-refs
文件 41 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\refs\heads\master
文件 32 2016-07-04 10:13 slambook-master\3rdparty\Sophus\.git\refs\remotes\origin\HEAD
文件 2881 2016-07-04 10:13 slambook-master\3rdparty\Sophus\CMakeLists.txt
文件 844 2016-07-04 10:13 slambook-master\3rdparty\Sophus\cmake_modules\FindEigen3.cmake
文件 143 2016-07-04 10:13 slambook-master\3rdparty\Sophus\README
............此处省略377个文件信息
- 上一篇:Web API的设计与开发.7z
- 下一篇:手把手教你学高速电路信号仿真
相关资源
- srcnn.rar
- 无人驾驶.rar
- 电子技术基础模拟部分第六版学习辅
- IntroductiontoLinearAlgebra5ed.part1.rar
- MachineLearningforHackers中英文.rar
- EnterpriseArchitect.rar
- 艾伦·图灵传——如谜的解谜者.rar
- HJ独立版3.1.26.zip
- HJ独立版3.1.18.zip
- xiaomi.rar
- 中文版PhotoshopCC完全自学教程[扫描版
- TransCAD免安装版.zip
- 人才招聘网站.zip
- 计算机毕业课程设计源码打包.rar
- 数字信号处理教程习题分析与解答第
- 亿图-EdrawMax.rar
- 聚合小说漫画动漫听书分销系统源码
- 深度探索C对象模型2012版.pdf
- IntroductiontoLinearAlgebra5thGilbertStrang.pd
- unityAction-RPGStarterKit6.01.zip
- 7c860cdb20668fa931dcff160b43a7f9.rar
- 21个项目玩转深度学习全部资源---基于
- 志汇点餐小程序全部教程.rar
- 技术的本质[高清扫描].pdf
- HCIE路由交换学习指南.pdf
- Learun7.Ultimate.rar
- 1模具制造手册原著第3版_13900243.pdf
- RoboticsVisionandControl第二版.pdf
- 博客藏经阁丛书深入理解AlteraFPGA应用
- comsol教程.rar
评论
共有 条评论