在ROS noetic上安装cartographer

ROS Noetic 下 Cartographer 2D SLAM 部署:室内20x20米地图构建误差低于0.3% 本文详细介绍了在ROS Noetic环境下使用Cartographer 2D SLAM算法实现20x20米室内高精度建图的完整流程。从硬件配置、传感器校准到Cartographer参数调优,逐步指导如何将地图构建误差控制在0.3%以内,特别适合机器人导航系统开发者参考实践。 阅读详情

在ROS noetic上安装cartographer


记录一下在ROS noetic上安装cartographer的过程。

官方ros文档,官方文档很详细,建议看着官方文档配置。

安装

  1. 首先需要安装好ros noetic:ros-noetic-desktop-full
sudo apt-get update
sudo apt-get install -y python3-wstool python3-rosdep ninja-build stow
  1. 新建一个catkin_ws,catkin_google_ws可以改成别的你想要的名字。如果raw.githubusercontent.com上不去的话,懂得都懂,或者可以修改/etc/hosts中的主机IP映射。
mkdir catkin_google_ws
cd catkin_google_ws
wstool init src
wstool merge -t src https://raw.githubusercontent.com/cartographer-project/cartographer_ros/master/cartographer_ros.rosinstall
wstool update -t src
  1. 下面的rosdep init可能会报错,如果无法执行的话可以,这一步出错的话进行第4步,否则直接跳到第5步。
sudo rosdep init
rosdep update
  1. 使用国内的rosdepc工具
sudo pip install rosdepc
sudo rosdepc init
rosdepc update

致谢:https://mp.weixin.qq.com/s/VGs8oWdhHH6XsHcx21lN4Q

  1. 安装abseil-cpp依赖,如果和ros的abseil产生冲突的话,执行第6步,否则跳到7
src/cartographer/scripts/install_abseil.sh
  1. 卸载ros的abseil
sudo apt-get remove ros-${ROS_DISTRO}-abseil-cpp
  1. build and install
catkin_make_isolated --install --use-ninja
source install_isolated/setup.bash #如果用zsh的话,把.bash替换成.zsh

测试

文件很大,测一个看看效果得了。如果demo能够运行起来,那么恭喜你已经完成了cartographer的安装。

下载并测试2d demo

wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_2d/cartographer_paper_deutsches_museum.bag
roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=${HOME}/Downloads/cartographer_paper_deutsches_museum.bag

下载并测试3d demo

wget -P ~/Downloads https://storage.googleapis.com/cartographer-public-data/bags/backpack_3d/with_intensities/b3-2016-04-05-14-14-00.bag
roslaunch cartographer_ros demo_backpack_3d.launch bag_filename:=${HOME}/Downloads/b3-2016-04-05-14-14-00.bag

更多测试。

在自己的环境中运行

cartographer的配置不像其他slam算法是通过launch文件来设置的,而是通过lua脚本来配置的。示例配置脚本的路径如下:

catkin_google_ws/src/cartographer_ros/cartographer_ros/configuration_files
backpack_2d.lua #如果想使用2d
backpack_3d.lua #如果想使用3d

把示例文件拷贝到你的工作区命名为my_robot.lua,之后编辑my_robot.lua文件来满足你自己的机器人的需要。

官方配置文档。

参数的含义,机翻的:

  • map_frame

    • The ROS frame ID to use for publishing submaps, the parent frame of poses, usually “map”.
    • 用于发布子图的 ROS 框架 ID,姿势的父框架,通常是“地图”。
  • tracking_frame

    • The ROS frame ID of the frame that is tracked by the SLAM algorithm. If an IMU is used, it should be at its position, although it might be rotated. A common choice is “imu_link”.
    • SLAM算法跟踪的帧的ROS帧ID。如果使用 IMU,它应该在它的位置,尽管它可能会被旋转。一个常见的选择是“imu_link”。
  • published_frame

    • The ROS frame ID to use as the child frame for publishing poses. For example “odom” if an “odom” frame is supplied by a different part of the system. In this case the pose of “odom” in the map_frame will be published. Otherwise, setting it to “base_link” is likely appropriate.
    • 用作发布姿势的子框架的 ROS 框架 ID。例如,如果“odom”框架由系统的不同部分提供,则为“odom”。在这种情况下,将发布 map_frame 中“odom”的位姿。否则,将其设置为“base_link”可能是合适的。
  • odom_frameodom_frame

    • Only used if provide_odom_frame is true. The frame between published_frame and map_frame to be used for publishing the (non-loop-closed) local SLAM result. Usually “odom”.
    • 仅在 provide_odom_frame 为真时使用。 published_frame 和 map_frame 之间的帧,用于发布(非闭环)本地 SLAM 结果。通常是“odom”。
  • provide_odom_frame

    • If enabled, the local, non-loop-closed, continuous pose will be published as the odom_frame in the map_frame.
    • 如果启用,本地的、非闭环的、连续的姿势将作为 odom_frame 发布在 map_frame 中。
  • publish_frame_projected_to_2d

    • If enabled, the published pose will be restricted to a pure 2D pose (no roll, pitch, or z-offset). This prevents potentially unwanted out-of-plane poses in 2D mode that can occur due to the pose extrapolation step (e.g. if the pose shall be published as a ‘base-footprint’-like frame)
    • 如果启用,发布的姿势将被限制为纯 2D 姿势(无滚动、俯仰或 z 偏移)。这可以防止在 2D 模式下由于姿势外推步骤而可能发生的潜在不想要的平面外姿势(例如,如果姿势应发布为类似“base-footprint”的帧)
  • use_odometry

    • If enabled, subscribes to nav_msgs/Odometry on the topic “odom”. Odometry must be provided in this case, and the information will be included in SLAM.
    • 如果启用,则订阅主题“odom”的 nav_msgs/Odometry。在这种情况下必须提供里程计,并且该信息将包含在 SLAM 中。
  • use_nav_sat

    • If enabled, subscribes to sensor_msgs/NavSatFix on the topic “fix”. Navigation data must be provided in this case, and the information will be included in the global SLAM.
    • 如果启用,订阅 sensor_msgs/NavSatFix 主题“fix”。在这种情况下必须提供导航数据,并且该信息将包含在全局 SLAM 中。
  • use_landmarks

    • If enabled, subscribes to cartographer_ros_msgs/LandmarkList on the topic “landmarks”. Landmarks must be provided, as cartographer_ros_msgs/LandmarkEntry within cartographer_ros_msgs/LandmarkList. If cartographer_ros_msgs/LandmarkEntry data is provided the information will be included in the SLAM accoding to the ID of the cartographer_ros_msgs/LandmarkEntry. The cartographer_ros_msgs/LandmarkList should be provided at a sample rate comparable to the other sensors. The list can be empty but has to be provided because Cartographer strictly time orders sensor data in order to make the landmarks deterministic. However it is possible to set the trajectory builder option “collate_landmarks” to false and allow for a non-deterministic but also non-blocking approach.如果启用,订阅主题“landmarks”的cartographer_ros_msgs/LandmarkList。
    • 必须提供地标,作为 cartographer_ros_msgs/LandmarkList 中的 cartographer_ros_msgs/LandmarkEntry。如果提供了 cartographer_ros_msgs/LandmarkEntry 数据,则该信息将包含在 SLAM 中,对应于 cartographer_ros_msgs/LandmarkEntry 的 ID。 cartographer_ros_msgs/LandmarkList 应以与其他传感器相当的采样率提供。该列表可以为空,但必须提供,因为 Cartographer 严格按时间排序传感器数据,以使地标具有确定性。然而,可以将轨迹构建器选项“collate_landmarks”设置为 false,并允许使用非确定性但也非阻塞的方法。
  • num_laser_scans

    • Number of laser scan topics to subscribe to. Subscribes to sensor_msgs/LaserScan on the “scan” topic for one laser scanner, or topics “scan_1”, “scan_2”, etc. for multiple laser scanners.
    • 要订阅的激光扫描主题数。订阅 sensor_msgs/LaserScan 的“scan”主题以获取一台激光扫描仪,或订阅“scan_1”、“scan_2”等主题以获取多台激光扫描仪。
  • num_multi_echo_laser_scans

    • Number of multi-echo laser scan topics to subscribe to. Subscribes to sensor_msgs/MultiEchoLaserScan on the “echoes” topic for one laser scanner, or topics “echoes_1”, “echoes_2”, etc. for multiple laser scanners.
    • 要订阅的多回波激光扫描主题数。订阅 sensor_msgs/MultiEchoLaserScan 关于“echoes”主题的一个激光扫描仪,或主题“echoes_1”、“echoes_2”等,用于多个激光扫描仪。
  • num_subdivisions_per_laser_scan

    • Number of point clouds to split each received (multi-echo) laser scan into. Subdividing a scan makes it possible to unwarp scans acquired while the scanners are moving. There is a corresponding trajectory builder option to accumulate the subdivided scans into a point cloud that will be used for scan matching.
    • 将每个接收到的(多回波)激光扫描分割成的点云数量。细分扫描可以解开扫描仪移动时获取的扫描。有一个相应的轨迹构建器选项可将细分扫描累积到将用于扫描匹配的点云中。
  • num_point_clouds

    • Number of point cloud topics to subscribe to. Subscribes to sensor_msgs/PointCloud2 on the “points2” topic for one rangefinder, or topics “points2_1”, “points2_2”, etc. for multiple rangefinders.
    • 要订阅的点云主题数。订阅一个测距仪的“points2”主题的sensor_msgs/PointCloud2,或多个测距仪的“points2_1”、“points2_2”等主题。
  • lookup_transform_timeout_sec

    • Timeout in seconds to use for looking up transforms using tf2.
    • 用于使用 tf2 查找转换的超时(以秒为单位)。
  • submap_publish_period_sec

    • Interval in seconds at which to publish the submap poses, e.g. 0.3 seconds.
    • 发布子图姿势的时间间隔(以秒为单位),例如0.3 秒。
  • pose_publish_period_sec

    • Interval in seconds at which to publish poses, e.g. 5e-3 for a frequency of 200 Hz.
    • 发布姿势的时间间隔(以秒为单位),例如对于 200 Hz 的频率,请参见 5e-3。
  • publish_to_tf

    • Enable or disable providing of TF transforms.
    • 启用或禁用提供 TF 转换。
  • publish_tracked_pose

    • Enable publishing of tracked pose as a geometry_msgs/PoseStamped to topic “tracked_pose”.
    • 启用将跟踪姿势作为geometry_msgs/PoseStamped 发布到主题“tracked_pose”。
  • trajectory_publish_period_sec

    • Interval in seconds at which to publish the trajectory markers, e.g. 30e-3 for 30 milliseconds.
    • 发布轨迹标记的时间间隔(以秒为单位),例如30e-3 持续 30 毫秒。
  • rangefinder_sampling_ratio

    • Fixed ratio sampling for range finders messages.
    • 范围查找器消息的固定比率采样。
  • odometry_sampling_ratio

    • Fixed ratio sampling for odometry messages.
    • 里程计消息的固定比率采样。
  • fixed_frame_sampling_ratio

    • Fixed ratio sampling for fixed frame messages.
    • 固定帧消息的固定比率采样。
  • imu_sampling_ratio

    • Fixed ratio sampling for IMU messages.
    • IMU 消息的固定比率采样。
  • landmarks_sampling_ratio

    • Fixed ratio sampling for landmarks messages.
    • 地标消息的固定比率采样。
Ubuntu 18.04 20.04 在 ROS 1 下安装 Cartographer 和 Cartographer_ROS【方法与避坑~】 环境版本:完全纯净的或。 阅读详情

相关推荐

ubuntu20.4下载ros-noetic+最新cartographer安装

1.关于安装ros-noetic按照官网教程即可: noetic/Installation/Ubuntu - ROS Wikihttp://wiki.ros.org/noetic/Installation/Ubuntu下面列出博主安装过程中出现的问题和解决方法: 1.1 rosdep update失败 rosdep update 在执行这一部分时报错执行超时,提供以下几种方法 (1)最常见的是因为网络问题,修改无限网为手机热点,多次尝试即可 (2)多次尝试仍然无法成功,参考以下博文即可成功解.

m0_58604270的博客 3208

ROS(Noetic) Cartographer 安装一遍过参考

ROS(Noetic) Cartographer 安装一遍过参考

infinitepxd的博客 3395

Cartographer ROS安装避坑全记录:从环境准备到2D Demo运行(Ubuntu 20.04 + ROS Noetic)

本文详细记录了在Ubuntu 20.04和ROS Noetic环境下安装Cartographer ROS的完整过程,包括环境准备、工作空间初始化、依赖安装、编译优化及2D Demo运行。重点解决了安装过程中的常见问题,如网络连接、依赖冲突等,并提供了性能调优和实际项目集成的实用技巧,帮助开发者高效部署这一强大的SLAM系统。

weixin_30876945的博客 324

ROS-Noetic安装Cartographer,复制粘贴流,方便快捷

方便快捷安装cartographer

weixin_42277529的博客 1807

Ubuntu 20.04 + ROS Noetic 下,手把手解决 Cartographer 安装的‘libabsl-dev’报错

本文详细介绍了在Ubuntu 20.04 + ROS Noetic环境下解决Cartographer安装过程中遇到的‘libabsl-dev’依赖错误的多种方法。从官方推荐安装到手动编译Abseil库,再到修改package.xml文件,提供了全面的解决方案和步骤指南,帮助开发者快速解决这一常见问题并优化SLAM系统性能。

weixin_30660027的博客 399

Ubuntu 20.04 + ROS Noetic 下,手把手搞定 Cartographer 安装与 2D 建图测试(附网络问题解决)

本文详细介绍了在Ubuntu 20.04和ROS Noetic环境下安装Cartographer并进行2D建图测试的完整流程。从环境准备、依赖安装到源码获取和编译,提供了详细的步骤和常见网络问题的解决方案,帮助开发者高效完成SLAM系统的部署与测试。

weixin_33735077的博客 513

【安装学习】安装Cartographer ROS(noetic)

网上使用noetic安装cartographer的比较少,所以将安装步骤记录下来

Howe_xixi的博客 1万+

Ros noetic Ubantu 20.04 rosdistro cartographer简单安装(上)

Ros noetic Ubantu 20.04 rosdistro cartographer简单安装

weixin_44025389的博客 1989

ubuntu20.04(ROS noetic版)安装cartographer

网上教程千奇百怪,还得是官方教程最为客观。不过,这次我重装了太多次系统才发现,最干净的系统做安装测试最为合适,其实就是我的pcl版本问题,不然的话早就成功了,唉...所以说,诸位仁兄,还得学习,还得不断尝试。哈哈哈...

qq_60640693的博客 2116

Ros noetic Ubantu 20.04 rosdistro cartographer简单安装(下)

这里承接上一篇的文字末尾,继续开始攀爬路途 3.安装cartographer_ros的依赖项 完成了上一篇文章的时候已经可以完全操作该指令 先使用rosdep安装所需的软件包。此处我们之前已经运行过 sudo rosdep init,故这里将显示错误,可以忽略(因为初始化的文件已经存在,无需再次初始化。不放心错误的话可以删除初始化文件重新初始化。 这里在之前上面安装基本工具(wstool,rosdep,ninja)这里安装的是python3-rosdep //这里可能提示没有安装ro...

weixin_44025389的博客 763

【SpringBoot香樟转转】debugDay01

在学黑马程序员的苍穹外卖项目,刚开始学,想用maven编译一下代码,结果报错,找不到符号。本着先理解原则,看着能找到这个变量呀。

m0_72696598的博客 1737

最新cartographer安装:使用ubuntu20.04 + ROS Noetic

本文使用ubuntu20.04版本操作系统 一、安装ROS Noetic 参考官方链接: http://wiki.ros.org/cn/noetic/Installation/Ubuntu 参考链接 https://blog.youkuaiyun.com/Leslie___Cheung/article/details/109591426 https://blog.youkuaiyun.com/weixin_42525601/article/details/112198438 1.更新软件源 打开一个终端(快捷键 .

yqziqian2的博客 1万+

慕课软件质量保证与测试(习题集)

慕课金陵科技学院.软件质量保证与测试.期末复习.习题汇总0 总目录1 绪论1.1 软件质量保证与测试的产生与发展1.2 软件缺陷,软件错误,软件故障1.3 软件质量保证与测试的意义,原则和挑战1.4 单元测试1.5 课后作业2 软件测试策略2.1 软件测试的模型,过程和生命周期2.2 软件测试的方法和技术2.3 单元测试2.4 课后作业3 黑盒测试3.1 黑盒测试概述3.2 等价类划分测试3.3 边界值测试3.4 错误推测法3.5 判定表驱动法3.6 因果图法3.7 场景法3.8 正交实验法3.9 单元测试

weixin_42473228的博客 5万+

ROS noetic 安装编译Cartographer踩坑记录

ubuntu20.04+ROS noetic编译运行cartographer踩坑记录,记录下来踩坑过程中的错误和错误原因,有报ERROR: Rosdep cannot find all required resources to answer your query Missing resource ——from-paths等错误的可以来看看,希望可以帮助到一些朋友。

Moresweet 猫甜 4586

基于rms包的限制性立方样条回归(RCS)R代码实现

RCS

2301_79584199的博客 2万+

Python自动化办公:5分钟搞定钉钉群文件自动发送(附完整代码)

本文详细介绍了如何利用Python实现钉钉群文件的自动化发送。通过结合钉钉企业内部应用与群机器人API,构建了包含智能令牌管理、文件上传与消息发送的完整工作流。文章提供了可直接复用的完整代码,并分享了定时任务、目录监听等进阶实战方案,帮助职场人士高效解决重复性文件发送难题,实现办公自动化。

7z8x2c4v6b9的博客 320

Ubuntu20.04+ ros-noetic 安装cartographer

libabsl-dev

QQ3545325613的博客 2314

Win11大版本更新失败:系统保留分区空间不足的终极解决方案

本文针对Windows 11大版本更新时遇到的“系统保留分区空间不足”错误,提供了详细的诊断与解决方案。核心问题在于EFI系统分区(ESP)空间过小,导致更新失败。文章重点介绍了使用傲梅分区助手等第三方工具安全扩展EFI分区的完整步骤,并提供了手动清理、使用安装介质修复等替代方案,帮助用户彻底解决更新障碍,顺利完成Win11升级。

weixin_29280219的博客 944

ROS-noetic环境下cartographer安装使用教程

ros-noetic版本安装使用cartographer

2302_76303402的博客 673

ABAP CURR Data Type 深度解析与实战案例

CURR 数据类型是 SAP ABAP 中为处理货币金额而设计的一种特殊数据类型。CURR 数据类型能够自动根据关联的货币代码字段(例如 WAERS)确定小数位数,从而保证金额数据的精度与正确性。CURR 类型通常在 SAP 数据字典中使用,常见于各类业务数据表中,如会计凭证、销售订单等场景中,用于存储货币金额。CURR 数据类型底层实现上类似于 DEC 数据类型,但其特别之处在于与货币代码字段的绑定,这使得金额的格式化和显示可以自动匹配相应的货币规则。

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 875

2024年CSP-X复赛真题题解(T1:购物)

2024年CSP-X复赛真题题解(T1:购物)

王老师青少年编程 1176

Ubuntu20.04下noetic安装ROS及cartographer安装及出现问题解决

Ubuntu20.04下noetic安装ROS及cartographer安装及出现问题解决

weixin_58477062的博客 4186

【实战篇】【硅基流动API+Cherry Studio搭建个人知识库全流程解析:从零到精通的超详细指南】

在人工智能技术高速发展的今天,基于大语言模型的知识库已成为开发者提效的必备工具。然而云端服务存在响应延迟、数据隐私、硬件依赖等痛点。通过硅基流动API与的深度整合,我们既能享受大模型的强大能力,又能实现本地化部署与高效管理。本文将从环境配置到高阶调优,手把手带你构建企业级知识库系统。

商务合作|问题讨论|交流学习 请联系作者微信,加微信请务必注明来意,博客主页有联系方式 1081

Cartographer安装与编译(Ubuntu20.04+ROS Noetic)

在Ubuntu 20.04上安装和使用Cartographer的流程包括安装依赖项、Abseil库、Ceres库、Protobuf3,以及Cartographer本身。首先,通过sudo apt-get install命令安装必要的依赖项。接着,克隆并构建Abseil库和Ceres库,分别使用git clone和cmake命令。然后,安装Protobuf3,同样通过克隆和构建完成。最后,克隆Cartographer及其ROS接口,使用catkin_make_isolated进行编译。建图时,使用公开数据集并

2301_80738981的博客 507

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

大中型超市收银系统(可直接运行)

光步前台收银系统系统功能:商品销售、商品退货、挂单、收银员权限、会员销售、单品取消、整单取消、商品查询、脱机销售、脱机数据上传,基本资料下载,开钱箱、小票打印、收款结算,支持多币种付款方式(现金、储值卡、礼券、微信等),支持多种促销。运行环境:.net 4.0登陆信息用户名:1001 密码:123456内置商品信息,商品编码可输入00001000 - 00010000,测试效果相关功能键F5 结算 F9挂单 F11商品查询 F8退货 Insert单品取消 Del整单取消 F12开钱箱F2 会员 Ctrl+Z退出系统 Home 锁屏 相关源码待公开

cartographer安装,ros版本noetic+ununtu20.04

cartographer安装,ros版本noetic+ununtu20.04

m0_63715549的博客 1106

NTscan扫描工具

ntscan是一个扫描器,可以扫描没有密码和弱密码的共享,先到配置文件中填写猜测的用户名和密码,扫描过程中右侧出现的是扫描日志。

Ubuntu20.04 安装ROS1(noetic)+ cartographer

更新系统包并添加ROS包源。

CJN199811的博客 706

数学建模模型总结

这是本人在两年内准备参加数学建模竞赛搜集到的模型资料,已经经过了本人的筛选和整理,希望能够对准备参加数学建模竞赛的学弟学妹们提供一些帮助!

上一篇: Dubins路径的计算和Python&Julia实现
下一篇: MPC-模型预测控制-公式推导
limitKLmin
博客等级 码龄7年 624粉丝 21原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值