3_ROS学习

ROS-KINETIC安装步骤

一、安装操作系统

该工程使用的系统和ROS版本为:Ubuntu16.04+Kinetic

Unbutun16.04下载链接:http://www.ubuntu.org.cn/download/desktop

二、安装ROS

1、修改Ubutnu软件源

 

2、安装Kinetic版本的ROS

(1)打开终端添加安装源:

$ sudo sh -c '. /etc/lsb-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ $DISTRIB_CODENAME main" > /etc/apt/sources.list.d/ros-latest.list'

(2)添加Key

$ sudo apt-key adv --keyserver hkp://ha.pool.sks-keyservers.net:80 --recv-key 0xB01FA116

(3)更新

$ sudo apt-get update

(4)安装ros

 $ sudo apt-get install ros-kinetic-desktop-full

(5)解决依赖:

$ sudo rosdep init

$ rosdep update

(6)配置环境变量

$ source /opt/ros/kinetic/setup.bash

$ echo "source /opt/ros/kinetic/setup.bash" >> ~/.bashrc

(7)安装一些以后可能会用工具

$ sudo apt-get install python-rosinstall

$ sudo apt-get install python-rosdep python-wstool ros-kinetic-ros

转载于:https://www.cnblogs.com/OathKeeper/p/7770602.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
### 回答1: cartographer_ros是一个用于SLAM(Simultaneous Localization and Mapping)的开源软件包,可以在ROS(Robot Operating System)中使用。安装cartographer_ros需要以下步骤: 1. 安装ROS:在Ubuntu系统中,可以使用apt-get命令安装ROS。具体安装方法可以参考ROS官方网站的教程。 2. 安装cartographer_ros:可以使用apt-get命令安装cartographer_ros。具体命令如下: ``` sudo apt-get install ros-<distro>-cartographer-ros ``` 其中,`<distro>`是ROS的发行版名称,例如`melodic`或`noetic`。 3. 配置cartographer_ros:需要配置cartographer_ros的参数文件,以适应不同的机器人和环境。可以参考cartographer_ros官方文档中的说明进行配置。 4. 运行cartographer_ros:可以使用ROS的launch文件来启动cartographer_ros。具体命令如下: ``` roslaunch cartographer_ros <launch_file>.launch ``` 其中,`<launch_file>`是启动文件的名称,例如`demo_backpack_2d.launch`或`demo_revo_lds.launch`。 以上就是安装cartographer_ros的基本步骤。需要注意的是,安装和配置cartographer_ros需要一定的ROS和SLAM知识,建议在使用前先学习相关知识。 ### 回答2: Cartographer_ros是一种针对机器人定位、车辆导航、地图绘制的软件,它基于Google Cartographer和ros系统进行开发。这种软件的安装可以方便的实现地图制作与定位服务,从而实现机器人的移动与导航。 一、使用Cartographer_ros前需要的系统设置和准备 Cartographer_ros适用于Ubuntu 14.04/16.04 LTS版本操作系统,并且需要安装一些相应的软件包和工具,例如cmake, pkg-config和protobuf。安装方法如下: 1、cmake的安装 sudo apt-get install cmake 2、pkg-config的安装 sudo apt-get install pkg-config 3、protobuf的安装 sudo apt-get install protobuf-compiler 如果以上软件包和工具已经安装完毕,可以从Git托管库中下载和安装Cartographer_ros软件包。 二、在Ubuntu中使用Cartographer_ros Cartographer_ros可以通过下载和安装软件包来使用。以下是在Ubuntu中使用Cartographer_ros的具体步骤: 1、首先,需要在Ubuntu终端中安装Cartographer_ros的依赖项。具体方法如下: sudo apt-get install python-wstool python-rosdep ninja-build 2、创建一个新的catkin工作目录,并将Cartographer_ros的源代码下载到~/catkin_ws/src目录下。执行以下命令: mkdir -p ~/catkin_ws/src cd ~/catkin_ws/src wget https://github.com/cartographer-project/cartographer_ros/archive/master.zip unzip master.zip rm master.zip 3、运行源代码的更新和依赖项安装命令: # Run this once to fetch the code into your workspace. wstool init -j8 src cartographer_ros_https://github.com/cartographer-project/cartographer_ros.rosinstall # wstool can also install a specific version of cartographer_ros. wstool merge -t src cartographer_ros_https://github.com/cartographer-project/cartographer_ros.rosinstall # Use cartographer_ros_branch_name if you want switch to a specific release. wstool update -t src # Install deb dependencies. rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y 4、执行以下命令编译Cartographer_ros: # Build and install. catkin_make_isolated --install --use-ninja source install_isolated/setup.bash 5、执行以下命令启动Cartographer_ros: roslaunch cartographer_ros demo_backpack_2d.launch bag_filename:=${HOME}/Downloads/cartographer_paper_deutsches_museum.bag 6、通过rviz查看Cartographer_ros的地图。 以上是Cartographer_ros的安装和使用方法,需要注意的是在使用之前需要安装相应的依赖项,这样才能够正常运行地图和导航等功能。使用Cartographer_ros可以方便可靠的实现机器人的地图制作和导航等功能,大幅提高了机器人导航的效率和精度。 ### 回答3: cartographer_ros是一种在ROS中实现的开源SLAM算法,它可以使用激光雷达和深度相机将机器人的周围环境建模和定位。cartographer_ros的安装包含三个部分:安装依赖项、下载和编译cartographer、下载和编译cartographer_ros。 首先,安装依赖项。cartographer_ros需要安装一些依赖项,包括glog、gflag、protobuf、ceres-solver、numpy、matplotlib等。您可以使用以下命令安装这些依赖项: ```bash sudo apt-get update sudo apt-get install -y python-wstool python-rosdep ninja-build stow sudo rosdep init rosdep update cd ~/catkin_ws rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y ``` 注意:在上述命令中,~/catkin_ws是您的ROS workspace路径,${ROS_DISTRO}是您使用的ROS发行版名称(如kinetic、melodic等)。 接下来,下载和编译cartographer。您可以使用以下命令在src目录下克隆cartographer的源代码,并在catkin_ws目录下进行编译: ```bash cd ~/catkin_ws/src git clone https://github.com/googlecartographer/cartographer.git cd cartographer git checkout -b v1.0.0 git submodule update --init --recursive cd .. catkin_make_isolated --install --use-ninja ``` 注意:在上述命令中,v1.0.0是cartographer的版本号,您可以根据需要更改。此外,如果您使用的是ROS kinetic或更早的版本,则应使用catkin_make而不是catkin_make_isolated。 最后,下载和编译cartographer_ros。您可以使用以下命令在src目录下克隆cartographer_ros的源代码,并在catkin_ws目录下进行编译: ```bash cd ~/catkin_ws/src git clone https://github.com/googlecartographer/cartographer_ros.git cd .. catkin_make_isolated --install --use-ninja ``` 安装完成后,您可以在ROS中使用cartographer_ros来建立地图、定位机器人和规划路径。具体使用方法可以参考cartographer_ros的文档和教程。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值