0


ubuntu22.04 安装 ros1

ubuntu22.04 安装 ros1

概要

原先只知道ros1 noetic 只支持到ubuntu20.04。现在系统必须升级到ubuntu22.04。

尝试一

Ubuntu22.04 apt 安装 ROS1 ROS Noetic Ninjemys
按照这个教程,

echo"deb [trusted=yes arch=amd64] http://deb.repo.autolabor.com.cn jammy main"|sudotee /etc/apt/sources.list.d/autolabor.list

sudoapt update

sudoaptinstall ros-noetic-autolabor

安装后,发现没有opencv,安装

sudo apt install libopencv-dev

后拷贝到 /usr/local/include/opencv,编译还是报错

报错一

/usr/include/log4cxx/boost-std-configuration.h:10:18: error: ‘shared_mutex’ in namespace ‘std’ does not name a type
   10 |     typedef std::shared_mutex shared_mutex;|                  ^~~~~~~~~~~~
/usr/include/log4cxx/boost-std-configuration.h:10:13: note: ‘std::shared_mutex’ is only available from C++17 onwards
   10 |     typedef std::shared_mutex shared_mutex;|             ^~~
/usr/include/log4cxx/boost-std-configuration.h:12:30: error: ‘shared_lock’ in namespace ‘std’ does not name a template type
   12 |using shared_lock = std::shared_lock<T>;|                              ^~~~~~~~~~~
/usr/include/log4cxx/boost-std-configuration.h:12:25: note: ‘std::shared_lock’ is only available from C++14 onwards
   12 |using shared_lock = std::shared_lock<T>;

编译器设置为c++17还是无效,故放弃。

尝试二

Ubuntu 22.04安装和使用ROS1可行吗

sudoaptinstall ros-desktop-full-dev

安装后,版本为Debian,1.15.14

$: roscore

SUMMARY
========

PARAMETERS
 * /rosdistro: Debian
 * /rosversion: 1.15.14

NODES

编译与报错一一致
尝试方法

#修改文件sudo gedit /usr/include/log4cxx/boost-std-configuration.h 

#将以下代码#define STD_SHARED_MUTEX_FOUND 1#define Boost_SHARED_MUTEX_FOUND 0#修改为#define STD_SHARED_MUTEX_FOUND 0#define Boost_SHARED_MUTEX_FOUND 1

编译通过

标签: ubuntu c++

本文转载自: https://blog.csdn.net/qq_35547879/article/details/141190696
版权归原作者 语音余音 所有, 如有侵权,请联系我们删除。

“ubuntu22.04 安装 ros1”的评论:

还没有评论