ARM TK1 安装ROS- indigo

本文详细介绍了如何在Ubuntu ARM设备上安装ROS Indigo,包括配置软件源、设置本地环境、安装ROS基础包及额外组件的过程,并提供了安装大小、初始化rosdep、设置环境变量等关键步骤。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

之前安装不成功是因为校园网无法访问源的问题。

 

Ubuntu ARM install of ROS Indigo

There are currently builds of ROS for Ubuntu Trusty armhf. These builds include most but not all packages, and save a considerable amount of time compared to doing a full source-based installation.

Supported/Tested Platforms

If this install works for your platform, please list it here:

 

Installation

 

Configure your Ubuntu repositories

Configure your Ubuntu repositories to allow "restricted," "universe," and "multiverse." You can follow the Ubuntu guidefor instructions on doing this.

 

Set your Locale

Boost and some of the ROS tools require that the system locale be set. You can set it with:

  • sudo update-locale LANG=C LANGUAGE=C LC_ALL=C LC_MESSAGES=POSIX

 

Setup your sources.list

Setup your computer to accept software from the ARM mirror on packages.ros.org.

Due to limited resources, there are only active builds for Trusty armhf (14.04), since this is the stable, long-term Ubuntu release and is the most-requested distribution in conjunction with ROS Indigo.

  • Ubuntu 14.04 (Trusty armhf)

    • sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu trusty main" > /etc/apt/sources.list.d/ros-latest.list'

 

Set up your keys

  • wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add -

 

Installation

First, make sure your Debian package index is up-to-date:

  • sudo apt-get update

There are many different libraries and tools in ROS - not all compile fully on ARM. You can also install ROS packages individually.

  • ROS-Base: (Bare Bones) ROS package, build, and communication libraries. No GUI tools.

    • sudo apt-get install ros-indigo-ros-base

 

Add Individual Packages
  • You can install a specific ROS package (replace underscores with dashes of the package name):
    • sudo apt-get install ros-indigo-PACKAGE
      • e.g.
      sudo apt-get install ros-indigo-navigation

To find available packages, use:

 

apt-cache search ros-indigo

The Ubuntu ARM package status is available here

 

Install Sizes

Base Package

Total Install Size

407 MB

572 MB

 

Initialize rosdep

Before you can use ROS, you will need to install and initialize rosdeprosdep enables you to easily install system dependencies for source you want to compile and is required to run some core components in ROS.

 

sudo apt-get install python-rosdep
sudo rosdep init
rosdep update

 

 

Environment setup

It's convenient if the ROS environment variables are automatically added to your bash session every time a new shell is launched:

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

If you have more than one ROS distribution installed, ~/.bashrc must only source the setup.bash for the version you are currently using.

If you just want to change the environment of your current shell, you can type:

source /opt/ros/indigo/setup.bash

If you use zsh instead of bash you need to run the following commands to set up your shell:

echo "source /opt/ros/indigo/setup.zsh" >> ~/.zshrc
source ~/.zshrc

 

Getting rosinstall

rosinstall is a frequently used command-line tool in ROS that is distributed separately. It enables you to easily download many source trees for ROS packages with one command.

To install this tool on Ubuntu, run:

 

sudo apt-get install python-rosinstall

 

Verifying OS name

Make sure your OS name defined at /etc/lsb-release is as the following. Since ros does not recognize Linaro as an OS, this is necessary. The following is for Ubuntu 14.04, trusty. Modify the release number and name as per your target.

 

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04"

 

Build farm status

The packages that you installed were built by ROS build farm. You can check the status of individual packages here.

 

Tutorials

Now, to test your installation, please proceed to the ROS Tutorials.

Obtain source code of the installed packages

If you know the location of the repository of each package, you know you can obtain all the code there. But it's often hard even for experienced developers to reach the correct maintained repository of certain packages. Also, in some situations you just want to get the source of the released, installed version of a package. The methods described here the best for these cases.

  • In earlier days of ROS (supposedly electric or earlier) you can obtain by the way noted in this question.

  • Now just apt-get source (sudo not needed) as following. You don't even need to explicitly specify deb-src entry etc. This downloads from the server all the files in the released version of the package (i.e. things not installed in the installation rule (e.g. CMakeLists.txt) are also included).

    $ apt-get source ros-hydro-laser-pipeline
    Drawback might be that you have to specifify a single, exact package name (asterisk doesn't work).

 

Using RVIZ

It is not recommended to run rviz on most ARM-based CPUs. They're generally too slow, and the version of OpenGL that is provided by the software (mesa) libraries it not new enough to start rviz.

'IF' you have a powerful board with a GPU and vendor-supplied OpenGL libraries, it might be possible to run rviz. The IFC6410 and the NVidia Jetson TK1 are two such boards where rviz will run, although neither is fast enough for graphics-heavy tasks such as displaying pointclouds.

Note that rviz will segfault if you have the GTK_IM_MODULE environment variable set, so it's best to unset it in your ~/.bashrc:

 

 

转载于:https://www.cnblogs.com/CZM-/p/5939607.html

<think>好的,我现在需要帮助用户解决如何卸载ROS Indigo安装Melodic版本的问题。首先,我得回忆一下相关的步骤,确保操作正确,避免用户系统出现问题。根据用户提供的引用,特别是引用3和5,里面提到了卸载ROS的方法以及版本对应关系。 首先,卸载ROS Indigo。用户可能已经安装Indigo,现在需要彻底移除它。我记得在Linux中卸载软件包通常使用apt-get purge命令,这样可以删除软件及其配置文件。根据引用3提到的卸载步骤,可能需要运行sudo apt-get purge ros-indigo-*,这会删除所有Indigo相关的包。但用户需要注意,如果之前用其他方式安装过,可能需要手动清理残留文件,比如在/opt/ros/indigo目录下的文件。此外,用户可能还需要检查环境变量,比如.bashrc中的source /opt/ros/indigo/setup.bash,需要删除或注释掉这一行,避免后续冲突。 接下来是安装Melodic。根据引用5,Melodic对应Ubuntu 18.04,所以用户需要确保他们的系统是18.04,否则可能不兼容。用户需要添加Melodic的软件源,这通常包括设置sources.list和密钥。然后更新软件包列表,安装完整版的ros-melodic-desktop-full。安装完成后,初始化rosdep,并配置环境变量,这涉及到在.bashrc中添加source /opt/ros/melodic/setup.bash。 在过程中,用户可能会遇到依赖问题,这时候rosdep install命令可能会有帮助,如引用2中提到的安装单个包的依赖。但安装完整版通常已经包含大部分依赖,不过如果有特定包需要,可能需要单独处理。 需要注意的潜在问题包括:旧版本未完全卸载导致冲突,环境变量未正确更新,或者Ubuntu版本与ROS版本不匹配。例如,如果用户尝试在Ubuntu 16.04上安装Melodic,这是不行的,因为根据引用5,Melodic需要18.04。因此,用户必须确认他们的系统版本是否正确。 此外,在卸载过程中,用户可能误删其他依赖包,导致系统问题。建议用户在操作前备份重要数据,或者使用虚拟机进行测试。安装完成后,测试是否成功,比如运行roscore,或者运行小海龟示例,如引用3提到的测试方法。 总结步骤应该是:卸载Indigo→清理残留→添加Melodic源→安装→初始化→配置环境→测试。需要确保每一步都正确执行,尤其版本匹配和依赖安装。可能用户还需要处理之前项目中的工作空间,如果之前有catkin工作区,可能需要重新配置或重新编译,特别是如果从Indigo升级到Melodic,API可能有变化,需要调整代码。</think>### 如何卸载ROS Indigo安装ROS Melodic? #### **1. 卸载ROS Indigo** **步骤说明:** - **卸载所有ROS Indigo软件包** 通过以下命令彻底移除ROS Indigo及其依赖项: ```bash sudo apt-get purge ros-indigo-* ``` 此命令会删除所有与Indigo相关的软件包和配置文件[^3]。 - **清理残留依赖项** 移除未被其他软件包使用的依赖项: ```bash sudo apt-get autoremove ``` - **手动删除残留文件** 检查并删除ROS Indigo安装目录(如果存在): ```bash sudo rm -rf /opt/ros/indigo ``` - **更新环境变量** 编辑用户主目录下的`.bashrc`文件,移除或注释以下行: ```bash # source /opt/ros/indigo/setup.bash ``` 保存后执行: ```bash source ~/.bashrc ``` --- #### **2. 安装ROS Melodic** **前提条件:** - **确认Ubuntu版本** ROS Melodic仅支持**Ubuntu 18.04**(查看系统版本命令:`lsb_release -a`)[^5]。 **安装步骤:** 1. **添加ROS Melodic软件源** 配置APT源并添加密钥: ```bash sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654 ``` 2. **更新软件包列表** ```bash sudo apt-get update ``` 3. **安装完整版ROS Melodic** ```bash sudo apt-get install ros-melodic-desktop-full ``` 4. **初始化rosdep** ```bash sudo rosdep init rosdep update ``` 5. **配置环境变量** 在`.bashrc`中添加以下行: ```bash source /opt/ros/melodic/setup.bash ``` 保存后执行: ```bash source ~/.bashrc ``` 6. **验证安装** 运行`roscore`,若成功启动则说明安装完成[^3]。 --- #### **注意事项** 1. **版本兼容性** ROS Melodic依赖Ubuntu 18.04,若系统版本不符需先升级操作系统。 2. **依赖冲突处理** 若安装过程中出现依赖问题,可通过以下命令修复: ```bash sudo apt-get -f install ``` 3. **残留配置处理** 如果之前通过源码编译安装ROS,需手动删除相关目录(如`~/catkin_ws`)。 ---
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值