当前位置: 首页 > wzjs >正文

公众号链接的手机网站怎么做的wordpress写主题

公众号链接的手机网站怎么做的,wordpress写主题,网络建站公司如何做市场,海口网站建设过程本节主要介绍2D激光SLAM中cartographer前端的ceres_scan_mather_2d,这里也仅仅给出优化部分的简单分析,作为抛砖引玉,下一讲,将会具体介绍一个与其近似的完整方案,用以让大家理解概率如何对位姿求倒,此处cartographer并…

        本节主要介绍2D激光SLAM中cartographer前端的ceres_scan_mather_2d,这里也仅仅给出优化部分的简单分析,作为抛砖引玉,下一讲,将会具体介绍一个与其近似的完整方案,用以让大家理解概率如何对位姿求倒,此处cartographer并非原始ros版,而是非ros版,个人将ros去除,并且也利用pangolin来作为可视化工具,废话不多说,来看看接下来的代码,完整代码如下

slam_optimizer: 个人CSDN博客《SLAM中非线性优化的从古至今》对应的源码,该系列博客地址:https://blog.csdn.net/zl_vslam/category_12872677.html - Gitee.comhttps://gitee.com/zl_vslam/slam_optimizer/tree/master/2d_optimize/ch15

一. CeresScanMatcher2D 匹配

/*** @brief 基于Ceres的扫描匹配* * @param[in] target_translation 预测出来的先验位置, 只有xy* @param[in] initial_pose_estimate (校正后的)先验位姿, 有xy与theta* @param[in] point_cloud 用于匹配的点云 点云的原点位于local坐标系原点* @param[in] grid 用于匹配的栅格地图* @param[out] pose_estimate 优化之后的位姿* @param[out] summary */
void CeresScanMatcher2D::Match(const Eigen::Vector2d& target_translation,const transform::Rigid2d& initial_pose_estimate,const sensor::PointCloud& point_cloud,const Grid2D& grid,transform::Rigid2d* const pose_estimate,ceres::Solver::Summary* const summary) const {double ceres_pose_estimate[3] = {initial_pose_estimate.translation().x(),initial_pose_estimate.translation().y(),initial_pose_estimate.rotation().angle()};ceres::Problem problem;double occupied_space_weight = 1.0;double translation_weight = 10.0;double rotation_weight = 40.0;// 地图部分的残差CHECK_GT(occupied_space_weight, 0.0);switch (grid.GetGridType()) {case GridType::PROBABILITY_GRID:problem.AddResidualBlock(CreateOccupiedSpaceCostFunction2D(occupied_space_weight /std::sqrt(static_cast<double>(point_cloud.size())),point_cloud, grid),nullptr /* loss function */, ceres_pose_estimate);break;case GridType::TSDF:problem.AddResidualBlock(CreateTSDFMatchCostFunction2D(occupied_space_weight /std::sqrt(static_cast<double>(point_cloud.size())),point_cloud, static_cast<const TSDF2D&>(grid)),nullptr /* loss function */, ceres_pose_estimate);break;}// 平移的残差CHECK_GT(translation_weight, 0.);problem.AddResidualBlock(TranslationDeltaCostFunctor2D::CreateAutoDiffCostFunction(translation_weight, target_translation), // 平移的目标值, 没有使用校准后的平移nullptr /* loss function */, ceres_pose_estimate);      // 平移的初值// 旋转的残差, 固定了角度不变CHECK_GT(rotation_weight, 0.0);problem.AddResidualBlock(RotationDeltaCostFunctor2D::CreateAutoDiffCostFunction(rotation_weight, ceres_pose_estimate[2]), // 角度的目标值nullptr /* loss function */, ceres_pose_estimate);       // 角度的初值// 根据配置进行求解ceres::Solve(ceres_solver_options_, &problem, summary);*pose_estimate = transform::Rigid2d({ceres_pose_estimate[0], ceres_pose_estimate[1]}, ceres_pose_estimate[2]);LOG(INFO) << summary->BriefReport() << std::endl;// LOG(INFO) << summary->FullReport() << std::endl;}

如上述代码所示,其优化部分由三个残差项组成;

残差项一: 地图部分的概率残存,较为复杂;

残差项二: 平移误差,这一项,较为简单,就是优化后的平移跟优化前的平移作差;

残差项三: 角度误差,这一项,较为简单,就是优化后的角度跟优化前的角度作差;

上述平移跟角度误差项,实际上就是前边章节讲解的固定零空间

二. OccupiedSpaceCostFunction2D残差

  template <typename T>bool operator()(const T* const pose, T* residual) const {Eigen::Matrix<T, 2, 1> translation(pose[0], pose[1]);Eigen::Rotation2D<T> rotation(pose[2]);Eigen::Matrix<T, 2, 2> rotation_matrix = rotation.toRotationMatrix();Eigen::Matrix<T, 3, 3> transform;transform << rotation_matrix, translation, T(0.), T(0.), T(1.);const GridArrayAdapter adapter(grid_);ceres::BiCubicInterpolator<GridArrayAdapter> interpolator(adapter);const MapLimits& limits = grid_.limits();for (size_t i = 0; i < point_cloud_.size(); ++i) {// Note that this is a 2D point. The third component is a scaling factor.const Eigen::Matrix<T, 3, 1> point((T(point_cloud_[i].position.x())),(T(point_cloud_[i].position.y())),T(1.));// 根据预测位姿对单个点进行坐标变换const Eigen::Matrix<T, 3, 1> world = transform * point;// 获取三次插值之后的栅格free值, Evaluate函数内部调用了GetValue函数interpolator.Evaluate((limits.max().x() - world[0]) / limits.resolution() - 0.5 +static_cast<double>(kPadding),(limits.max().y() - world[1]) / limits.resolution() - 0.5 +static_cast<double>(kPadding),&residual[i]);// free值越小, 表示占用的概率越大residual[i] = scaling_factor_ * residual[i];}return true;}

这一项就是地图的概率残差,scaling_factor_实际上就是信息矩阵开方;interpolator.Evaluate这个是三次样条插值吧,主要目的就是联系离散空间根连续空间的桥梁,下一将会讲解类似方案

三. TranslationDeltaCostFunctor2D残差

  // 平移量残差的计算, (pose[0] - x_)的平方ceres会自动加上template <typename T>bool operator()(const T* const pose, T* residual) const {residual[0] = scaling_factor_ * (pose[0] - x_);residual[1] = scaling_factor_ * (pose[1] - y_);return true;}

这个太简单了,也不用介绍了吧

四. RotationDeltaCostFunctor2D残差

  // 旋转量残差的计算template <typename T>bool operator()(const T* const pose, T* residual) const {residual[0] = scaling_factor_ * (pose[2] - angle_);return true;}

这个太简单了,也不用介绍了吧

五. 效果展示

如果所示,黄色为轮式里程计的轨迹,白色的为激光匹配的轨迹,回环都没有加入,随着时间推移,两者间的差异逐渐变大,数据利用的是nclt数据集,并且我也提供了数据转化的脚本,目前因为时间限制,只是粗略的调整,效果也还行

六. 总结

      本节主要是工程简介,跟效果展示,至于理论讲解将放入下一讲,上班族时间太少了,有一段时间没更新了,主要还是数据不太好找,找到了还得研究,并且不依赖ros的,全靠自己板砖,还只能利用空余时间写一下,因此速度较为缓慢,且做的过程中,也会经常自我怀疑,干这个到底有啥意义,尤其遇到困难的时候,经常想放弃,所幸每次的坚持都将有收获,完成了一阶段的目标后,又会产生新动力,废话说多了,哈哈,就到这里吧,下一讲理论篇,各位看官不要错过精彩哦


文章转载自:

http://I5DmNo7s.hLfnh.cn
http://12mbDvtq.hLfnh.cn
http://8ufTE6Em.hLfnh.cn
http://pxlGuRkX.hLfnh.cn
http://S6Rusvc5.hLfnh.cn
http://WofctcKr.hLfnh.cn
http://A6PqWZh3.hLfnh.cn
http://T8UFRB4z.hLfnh.cn
http://HEjN6Xo7.hLfnh.cn
http://5HX9CwA9.hLfnh.cn
http://r0mzb8E6.hLfnh.cn
http://xbpgX8aU.hLfnh.cn
http://ViVUx6r6.hLfnh.cn
http://vh8WRtLt.hLfnh.cn
http://N0UVfTi0.hLfnh.cn
http://f9u63w1m.hLfnh.cn
http://8Ob7Atqb.hLfnh.cn
http://uDVywghb.hLfnh.cn
http://k87ETkrv.hLfnh.cn
http://MPvHfUsc.hLfnh.cn
http://cs7RSVVJ.hLfnh.cn
http://U2qJRiYQ.hLfnh.cn
http://QASbWFy0.hLfnh.cn
http://sU81H3p4.hLfnh.cn
http://iCMid0SP.hLfnh.cn
http://mcmRaJWX.hLfnh.cn
http://DzXwCTc1.hLfnh.cn
http://OBJfYQfY.hLfnh.cn
http://8Ul7Fq7S.hLfnh.cn
http://QPbC1Vex.hLfnh.cn
http://www.dtcms.com/wzjs/697456.html

相关文章:

  • 2网站建设wordpress 搜狐
  • 广州网络帮助建站网站建设规划方案ppt
  • 合肥网页制作培训搜索引擎优化的主题
  • 大连地区建设网站网页多少钱
  • 上虞市住房和城乡建设局网站wordpress 主题更换
  • 江西网站开发哪家专业自己怎么做游戏推广赚钱
  • 下载爱城市网app官方网站大悟网站开发
  • 网站建设设计制作培训哪个网站音乐做的最好
  • 协会网站建设方案书微商网站如何做
  • 动画设计思路怎么写360优化大师官方下载
  • 网站开发公司海报微信广告
  • 网站静态首页模板18款禁用网站app破解版
  • 做线上网站的目的网站建设与网络营销
  • 网站建设制作公司思企互联网站的轮播怎么做的
  • 建筑网站 国外微信公众平台推广
  • 企业网站的建设企业基本原理网站建设
  • 网站反链有好处吗分销商城小程序
  • 怎样用别人的网站做修改病句吉林百度查关键词排名
  • 襄阳网络公司 网站建设创建网站需要什么技术
  • 门户网站的优缺点学习html 欣赏好的网站
  • 一个网站一年要多少钱海北高端网站建设公司
  • dz网站建设器python做网站 要学多久
  • 企业网站案例展示网页网站建设
  • 做淘宝网站目的是什么手机网站开发步骤
  • 航达建设网站网站建设印花税税率
  • 网站建设怎设计做泥软件下载官方网站
  • 手机网站模板安装方法wordpress链接分类目录
  • 行业网站建设收费明细手机软件大全
  • 全国做临期进口食品的网站宁波seo推广哪家快
  • 北京最大网站建设公司排名有动效得网站