Raspberrypi4+openEuler 源码安装catkin

Raspberrypi4+openEuler 源码安装catkin记录

本文主要记录自己在新的树莓派上的openEuler 21.03系统上安装catkin的过程和遇到的问题。

环境

  • 操作系统:openEuler 20.03 LTS
  • 硬件:raspberrypi4+16G SSD

安装前准备

  • 系统镜像
    下载链接:https://repo.openeuler.org/openEuler-21.03/raspi_img/openEuler-21.03-raspi-aarch64.img
  • 新安装的openEuler 21.03需要安装一些常用的软件,比如:git、tar、wget等
    dnf install git tar wget
    

安装catkin

源码安装catkin的理想安装流程如下,一般会在编译过程遇到各种问题。后面也介绍本人在安装过程中遇到的问题及解决办法。

# 安装依赖
dnf install cmake python-catkin-pkg python-empy python-nose python-setuptools libgtest-dev build-essential
#下载源码
git clone https://github.com/ros/catkin
# 进入源码目录
cd catkin
# 编译安装
mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release ../ && make && sudo make install

问题记录

问题1

安装依赖时提示无法安装 python-catkin-pkg、python-empy

No match for argument: python-catkin-pkg
No match for argument: python-empy
Package python-setuptools-44.1.1-2.oe1.noarch is already installed.
No match for argument: libgtest-dev
No match for argument: build-essential
Error: Unable to find a match: python-catkin-pkg python-empy libgtest-dev build-essential

解决办法

  • 至少需要安装catkin_pkg和empy
cd
git clone https://github.com/ros-infrastructure/catkin_pkg.git
cd catkin_pkg/
python3 setup.py build
python3 setup.py install
cd
wget https://files.pythonhosted.org/packages/3b/95/88ed47cb7da88569a78b7d6fb9420298df7e99997810c844a924d96d3c08/empy-3.3.4.tar.gz
tar -xzvf empy-3.3.4.tar.gz
cd empy-3.3.4/
python3 setup.py install

问题2

CMake Error: CMake was unable to find a build program corresponding to "Unix Makefiles".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.

解决办法

缺少make,安装即可。

dnf install make

问题3

CMake Error at cmake/empy.cmake:30 (message):
  Unable to find either executable 'empy' or Python module 'em'...  try
  installing the package 'python3-empy'

解决办法

缺少 empy ,源码安装。

cd
wget https://files.pythonhosted.org/packages/3b/95/88ed47cb7da88569a78b7d6fb9420298df7e99997810c844a924d96d3c08/empy-3.3.4.tar.gz
tar -xzvf empy-3.3.4.tar.gz
cd empy-3.3.4/
python3 setup.py install

注意

  • 1 openEuler 21.03 自带的是python3。
  • 2 系统安装参考罗老师的 安装教程 即可。
  • 3 本文是安装完系统后直接源码安装catkin的,所以需要提前安装一些常用的软件。

参考

  1. https://gitee.com/yunxiangluo/ros_openeuler
  2. http://wiki.ros.org/catkin

你可能感兴趣的:(Linux,openEuler,Raspberrypi4,linux)