-
背景条件:debian11,arm64
-
安装ROS1(noetic)
-
设置软件源信息(以下特意改为内网地址,若可连外围,则自行修改为原版):
-
系统软件源改为内网的
进入/etc/apt sudo gedit sources.list #若提示没有gedit,则使用命令安装gedit sudo apt install gedit #将其中链接改为国内源(如清华源)
-
ROS软件源及版本信息
sudo sh -c '. /etc/os-release && echo "deb http://mirrors.ustc.edu.cn/ros/ubuntu/ `lsb_release -cs` main" > /etc/apt/sources.list.d/ros-latest.list'
-
key的获取
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key C1CF6E31E6BADE8868B172B4F42ED6FBAB17C654
-
更新
sudo apt update ####报错(此处错误不理会) Err:4 http://mirrors.ustc.edu.cn/ros/ubuntu bullseye/main arm64 Packages 404 Not Found [IP: 202.141.176.110 80] W: The repository 'http://mirrors.ustc.edu.cn/ros/ubuntu bullseye Release' does not have a Release file. N: Data from such a repository can't be authenticated and is therefore potentially dangerous to use. N: See apt-secure(8) manpage for repository creation and user configuration details. E: Failed to fetch http://mirrors.ustc.edu.cn/ros/ubuntu/dists/bullseye/main/binary-arm64/Packages 404 Not Found [IP: 202.141.160.110 80] E: Some index files failed to download. They have been ignored, or old ones used instead. sudo apt upgrade
-
-
由于ros官方没有给noetic做debian11的支持,所以只能从源码开始编译出适配的ros系统,如下
-
安装一些编译工具
-
python3-rosdep
注意不要安装了debian11默认推荐的python3-rosdep2
sudo pip install -U rosdep
-
python3-vcstool
curl -s https://packagecloud.io/install/repositories/dirk-thomas/vcstool/script.deb.sh | sudo bash sudo apt-get update sudo apt-get install python3-vcstool
-
其他
sudo apt-get install python3-rosinstall-generator python3-vcstools build-essential
-
-
获取ros系统自身各个package的源码
sudo rosdep init #若不能连外网,在`/etc/ros/rosdep/sources.list.d/20-default.list`中的所有github地址前添加`https://ghproxy.com/` #还有xxx/dist-packages/rosdep2/gbpdistro_support.py #还有xxx/dist-packages/rosdep2/rep3.py #还有xxx/dist-packages/rosdistro/__init__.py #由于不同系统的目录有所差异,所以只能自行搜索 #sudo find / -name *gbpdistro_support.py* #文件__init__.py可能存在多处,但我们只需要修改与其他文件一致的目录的那一份 rosdep update #报错的话多试几次 (前几次几分钟居成功了,有一次试了2个小时才成功,这个东西感觉随缘,和网络有关) mkdir ~/ros_catkin_ws cd ~/ros_catkin_ws #todo,若改为安装完全版desktop_full,会额外产生一些异常,未处理 rosinstall_generator desktop --rosdistro noetic --deps --tar > noetic-desktop.rosinstall ###若显示time out,多试几次即可,是否成功打开(noetic-desktop.rosinstall文件查看里面是否有内容) mkdir ./src vcs import --input noetic-desktop.rosinstall ./src #注意vcs运行期间,终端提示的应该全是.....,不能出现E,否则重新运行(若出现E较少,参考后面一段解决方法),重新运行前删除src文件夹生成的所有文件 #若很多EEEEEE,出现这样的情况,要打开noetic-desktop.rosinstall⽂件,将https://ghproxy.com/添加到所有github⽹址的前⾯,使用指令sed -i 's/uri: \(https:\/\/.*\)/uri: https:\/\/ghproxy.com\/\1/g' 文件名 ..................例如第一条加入后为:uri: https://ghproxy.com/https://github.com/ros-gbp/actionlib-release/archive/release/noetic/actionlib/1.14.0-1.tar.gz,可能可以解决(不出现E),但我加入后还是出现....E.....E....,但运行结束后只有个别的E,可以用https://ghproxy.com(github代理加速)网页下载报错为E的软件包,在noetic-desktop.rosinstall⽂件中找到(ctrl+f查找)对应出现E包的名称,并随之在目录中找到这个空的文件夹(noetic-desktop.rosinstall中的local-name行代码即为本应该下载下来文件所放的地方)(虽然下载失败但是在src中还是生成了一个该下载失败名称的文件夹),将软件包粘贴到该目录,并使用解压命令:tar zxvf FileName.tar.gz(输入tar zxcf 后使用TAB键补全) ,之后将解压后的文件重命名为空的文件的名称,从而代替下载出现E生成的空文件。
-
获取这些package源码所需的第三方依赖
#尝试自动安装依赖, rosdep install --from-paths ./src --ignore-packages-from-source --rosdistro noetic -y -r #同样,由于官方不支持这样的版本配对,所以会有一些依赖无法找到,并会将缺失内容列出来,多运行几次,有的是网络问题出现错误,到最后运行结果固定6个错误。 apt: command [sudo -H apt-get install -y libpoco-dev] failed apt: command [sudo -H apt-get install -y python3-rospkg-modules] failed apt: command [sudo -H apt-get install -y libssl-dev] failed apt: command [sudo -H apt-get install -y python3-catkin-pkg-modules] failed apt: command [sudo -H apt-get install -y python3-rosdep-modules] failed apt: command [sudo -H apt-get install -y libcurl4-openssl-dev] failed #需要根据提示的缺失内容,手动下载安装各种第三方库及第三方ros包 解决libpoco-dev sudo apt install libpoco-dev #上述命令执行后报错 libmariadb-dev : Depends: libmariadb3 (= 1:10.5.19-0+deb11u2) but 1:10.5.15-0+deb11u1 is to be installed 解决方法: 安装上面提示的版本 sudo apt install libmariadb3=1:10.5.19-0+deb11u2 (#注意,等号两头没有空格!) 解决libssl-dev sudo apt install libssl-dev #报错(可能不会报错) libssl-dev : Depends: libssl1.1 (= 1.1.1n-0+deb11u5) but 1.1.1n-0+deb11u3 is to be installed 解决方法: 卸载已经安装的版本不对应的软件包:sudo apt-get remove libssl1.1 安装正确版本的libssl1.1:sudo apt-get install libssl1.1=1.1.1n-0+deb11u5 解决libcurl4-openssl-dev sudo apt install libcurl4-openssl-dev #报错 The following packages have unmet dependencies:libcurl4-openssl-dev : Depends: libcurl4 (= 7.74.0-1.3+deb11u7) but 7.74.0-1.3+deb11u3 is to be installed 解决方法: 卸载已安装的与libcurl4-openssl-dev冲突的软件包: sudo apt-get remove libcurl4 又报错 cmake : Depends: libcurl4 (>= 7.16.2) but it is not going to be installed curl : Depends: libcurl4 (= 7.74.0-1.3+deb11u3) but it is not going to be installed libgphoto2-6 : Depends: libcurl4 (>= 7.16.2) but it is not going to be installed E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages. 解决方法: sudo apt-get update sudo apt-get install --reinstall libcurl4 curl libgphoto2-6 #解决以上报错后还剩报错如下 ERROR: the following rosdeps failed to install apt: command [sudo -H apt-get install -y python3-rospkg-modules] failed apt: command [sudo -H apt-get install -y python3-catkin-pkg-modules] failed apt: command [sudo -H apt-get install -y python3-rosdep-modules] failed #对于apt install不能直接找到的资源,一般可从如下网址找到版本兼容的deb安装包,或源码 #http://packages.ros.org/ros/ubuntu/pool/main/ #https://index.ros.org/ #其中,需要注意: #若提示缺少libogre,不要安装libogre的1.11.3以上版本,有变更,会导致编译冲突 sudo apt install libogre-1.9-dev #接下来的步骤都忽略这个缺失项,因实际上已经安装好,只是名字不匹配、没被识别出来。 #各项依赖都找到后,再次执行rosdep应能成功(不再提示其他缺失项目,并自动将能找到的依赖安装好) 下面手动安装这三个包,这三个包到网上手动下载 http://packages.ros.org/ros/ubuntu/pool/main/p/python3-catkin-pkg-modules/ 下载 python3-catkin-pkg-modules_0.5.2-1_all.deb 2022-05-27 19:50 42K 0 下载后安装 sudo dpkg -i --force-overwrite xxx 之后先安装rospkg,再安装rosdep 下面同理可以解决第三个python3-rosdep-modules的问题 #报错 没有安装python3-rosdistro-modules #网站同理下载其包安装即可(不是用sudo apt install安装) ##下面错误可能出现,没出现则跳过 安装提示信息: rosdep-modules: python3-rosdep-modules conflicts with python3-rosdep2 python3-rosdep2 (version 0.20.0-1) is present and installed. dpkg: error processing archive python3-rosdep-modules_0.22.2-1_all.deb (-- install): conflicting packages - not installing python3-rosdep-modules Errors were encountered while processing: python3-rosdep-modules_0.22.2-1_all.deb 这里表示我们要装的python3-rosdep-modules_0.22.2-1_all.deb因为包含python3-rosdep-modules模 块,而python3-rosdep-modules模块和已经安装的python3-rosdep2有冲突。 所以先卸载python3-rosdep2,命令: sudo dpkg -r python3-rosdep2 卸载之后重新安装python3-rosdep-modules_0.22.2-1_all.deb ############################################安装这3个包之后,重新执行rosdep install指令,报错 ERROR: the following packages/stacks could not have their rosdep keys resolved to system dependencies: rviz: No definition of [libogre] for OS version [bullseye] Continuing to install resolvable dependencies... All required rosdeps installed successfully 解决办法: #其中,需要注意: #若提示缺少libogre,不要安装libogre的1.11.3以上版本,有变更,会导致编译冲突 sudo apt install libogre-1.9-dev #接下来的步骤都忽略这个缺失项,因实际上已经安装好,只是名字不匹配、没被识别出来。
-
编译ros源码
sudo ./src/catkin/bin/catkin_make_isolated --install -DCMAKE_BUILD_TYPE=Release --install-space /opt/ros/noetic echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc ########编译成功后显示 <== Finished processing package [184 of 184]: 'xacro' 在~/ros_catkin_ws文件下执行命令: catkin_make #报错 catkin_make: command not found 解决办法: source /opt/ros/noetice/setup.bash echo "source /opt/ros/noetic/setup.bash" >> ~/.bashrc source ~/.bashrc #解决上述问题后重新catkin_make时报错(测试要生成的文件名与其中存在的文件名相同) CMake Error at catkin/cmake/test/gtest.cmake:180 (add_executable): add_executable cannot create target "test_transform_datatypes" because another target with the same name already exists. The existing target is an executable created in source directory "/home/linaro/ros_catkin_ws/src/geometry2/tf2". See documentation for policy CMP0002 for more details. Call Stac (most recent call first): catkin/cmake/test/gtest.cmake:89 (_catkin_add_executable_with_google_test) catkin/cmake/test/gtest.cmake:37 (_catkin_add_google_test) geometry/tf/CMakeLists.txt:86 (catkin_add_gtest) CMake Error at geometry/tf/CMakeLists.txt:87 (target_link_libraries): Attempt to add link library "tf" to target "test_transform_datatypes" which is not built in this directory. This is allowed only when policy CMP0079 is set to NEW. -- Configuring incomplete, errors occurred! See also "/home/linaro/ros_catkin_ws/build/CMakeFiles/CMakeOutput.log". See also "/home/linaro/ros_catkin_ws/build/CMakeFiles/CMakeError.log". Invoking "cmake" failed #########解决办法,打开src/geometry2/tf2/CMakeLists.txt文件,并将三处地方进行修改 修改 catkin_add_gtest 命令中的第一个参数,即测试二进制文件的名称,将其更改为你想要的名称: catkin_add_gtest(<new_test_name> test/test_transform_datatypes.cpp) 在 target_link_libraries 命令中将 <old_test_name> 更改为 <new_test_name>,以确保测试程序正确地链接到相应的库。 target_link_libraries(<new_test_name> tf2 ${console_bridge_LIBRARIES}) 在 add_dependencies 命令中将 <old_test_name> 更改为 <new_test_name>,以确保测试程序正确地链接到依赖项。 add_dependencies(<new_test_name> ${catkin_EXPORTED_TARGETS}) 修改后catkin_make成功编译
-
-
-
IMU (LPMS-BE2)
-
lpresearch / lpmsig1opensourcelib — Bitbucket 跟着这个网站安装
$ cd ~ $ git clone https://bitbucket.org/lpresearch/lpmsig1opensourcelib $ cd lpmsig1opensourcelib $ mkdir build $ cd build $ cmake .. $ make #报错 In file included from /home/linaro/lpmsig1opensourcelib/SerialPortLinux.cpp:2: /home/linaro/lpmsig1opensourcelib/SerialPort.h:22:10: fatal error: libudev.h: No such file or directory 22 | #include <libudev.h> 解决办法:sudo apt-get install libudev-dev #报错 The following packages have unmet dependencies: libudev-dev : Depends: libudev1 (= 247.3-7+deb11u2) but 247.3-7+deb11u1 is to be installed 解决办法:打开https://deb.debian.org/debian/pool/main/s/systemd/找到对应的包下载 ###之后报了很多错误,此处未记录,但是好像执行下面3条后就好了 sudo apt-mark unhold udev sudo apt-get update sudo apt-get install -f 然后 sudo apt-get install libudev-dev 就好了?????? $ make package $ sudo dpkg -i libLpmsIG1_OpenSource-x.y.z-Linux.deb ##这里的x.y.z要修改成对应的文件版本号 2.编译示例程序 ##若测试的是RK3588内部自带的IMU,则打开LpmsBEx_SimpleExample.cpp文件, ##修改串口号 string comportNo = "/dev/ttyS0"; ##修改波特率 int baudrate = 115200; $ cd linux_example $ mkdir build $ cd build $ cmake .. $ make $ ./LpmsBEx_SimpleExample #####因为装的是BE2,所以这里修改网站的代码为BEx_,此时若连接成功,终端输入 c:连接传感器,d:断开传感器,0:进入命令模式,1:进入命令模式,h:重置传感器航向 ,i:查看传感器信息,s:查看传感器设置,p:查看传感器输出数据,a:转换使能/禁能自动连接,q:结束 3.编写ROS示例程序 # Create ROS workspace. (若放在你自己的工作空间下,可能会报错有重名) $ mkdir -p ~/catkin_ws/src $ cd ~/catkin_ws/src # We suggest to create a symbolic link to ros_example folder instead of copying $ ln -s ~/lpmsig1opensourcelib/ros_example lpms_ig1_ros_example # Compiling ROS example programs $ cd ~/catkin_ws $ catkin_make ##报错说找不到tf文件(也有可能没有报错),以及环境没有刷新 解决办法:在/home/linaro/catkin_ws/src/lpms_ig1_ros_example的CMakeLists.txt文件中的find_package中添加tf,添加后为 find_package( roscpp tf std_msgs message_generation ) ###在/home/linaro中使用ctrl+h,找到bashrc文件,在文件末端添加 source ~/catkin_ws/devel/setup.bash $ source ./devel/setup.bash ##若测试的是RK3588内部自带的IMU,则打开lpmsbe1.launch文件, ##修改串口号(port):value="/dev/ttyS0" ##修改波特率(baudrate): value="115200" 打开一个新的终端窗口并运行 roscore $ roscore 启动BE的launch文件 roslaunch lpms_ig1 lpmsbe1.launch
-
-
安装SLAM相关驱动
#因为debian11目前还不支持ros1,前面安装ros1是使用源码编译,所以在安装指令ros-noetic这种会定位不到ROS软件包,只能使用源码安装,按照slam.sh一步一步安装即可
#tf2*前面安装ROS已经安装好,跳过即可
sudo apt-get install libsdl-image1.2-dev -y
#报错Depends: libwebp6 (= 0.6.1-2.1+deb11u1) but 0.6.1-2.1 is to be installed Depends: libwebpmux3 (= 0.6.1-2.1+deb11u1) but 0.6.1-2.1 is to be installed Depends: libwebpdemux2 (= 0.6.1-2.1+deb11u1) but 0.6.1-2.1 is to be installed E: Unable to correct problems, you have held broken packages.
解决办法:http://security.debian.org/debian-security/pool/main/libw/libwebp/
下载对应的依赖libwebp6=0.6.1-2.1+deb11u1;libwebpmux3=0.6.1-2.1+deb11u1;libwebpdemux2=0.6.1-2.1+deb11u1
使用sudo dpkg -i 解压对应的几个deb文件即可
重新
sudo apt-get install libsdl-image1.2-dev -y
成功安装
#ros-noetic-camera-info-manager安装包
解决办法:
在catkin_ws/src 工作空间下
git clone https://github.com/ros-perception/image_common.git
1.进入/image_common/camera_calibration_parsers
使用如下指令安装
mkdir build cd build
运行CMake生成构建系统:
cmake ..
- 使用make命令编译源码:
make
- 最后,使用以下命令将
camera_info_manager
安装到系统中:
sudo make install
2.退出到catkin_ws
catkin_make
3.进入camera_info_manager同上述步骤安装即可
#ros-noetic-diagnostic-updater 软件包
解决办法:在catkin_ws/src 工作空间下
git clone https://github.com/ros/diagnostics.git -b noetic-devel
进入 diagnostics_update
mkdir build cd build cmake .. make sudo make install
#ros-noetic-map-msgs 软件包
解决办法:在catkin_ws/src 工作空间下
git clone https://github.com/ros-planning/navigation_msgs.git
同上编译安装
报错Traceback (most recent call last): File “/opt/ros/noetic/share/genmsg/cmake/…/…/…/lib/genmsg/genmsg_check_deps.py”, line 41, in from genmsg import EXT_MSG, EXT_SRV, MsgContext ModuleNotFoundError: No module named ‘genmsg’ make[2]: *** [CMakeFiles/_map_msgs_generate_messages_check_deps_SaveMap.dir/build.make:76: CMakeFiles/_map_msgs_generate_messages_check_deps_SaveMap] Error 1 make[1]: *** [CMakeFiles/Makefile2:1345: CMakeFiles/_map_msgs_generate_messages_check_deps_SaveMap.dir
解决办法:
sudo apt-get install python3-genmsg sudo make install
#ros-noetic-laser-geometry 软件包
解决办法:
git clone https://github.com/ros-perception/laser_geometry.git
同上编译安装
#ros-noetic-gmapping 软件包
解决办法:
git clone https://github.com/ros-perception/slam_gmapping.git
同上编译安装
#报错Could NOT find openslam_gmapping (missing: openslam_gmapping_DIR) – Could not find the required component ‘openslam_gmapping’. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found. CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by “openslam_gmapping” with any of the following names: openslam_gmapppingConfig.cmake openslam_gmapping-config.cmake Add the installation prefix of “openslam_gmapping” to CMAKE_PREFIX_PATH or set “openslam_gmapping_DIR” to a directory containing one of the above files. If “openslam_gmapping” provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): CMakeLists.txt:4 (find_package)
解决办法:
git clone https://github.com/ros-perception/openslam_gmapping.git
同上编译之后需要catkin_make一下
再回到gmapping中同上编译即可
#laser-filters 软件包
git clone https://github.com/ros-perception/laser_filters.git -b noetic-devel
同上
#robot-localization 软件包(此软件包安装时连续出现报错,依次安装对应包即可)
git clone https://github.com/cra-ros-pkg/robot_localization.git -b noetic-devel
同上
#报错Could NOT find geographic_msgs (missing: geographic_msgs_DIR) – Could not find the required component ‘geographic_msgs’. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found. CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by “geographic_msgs” with any of the following names: geographic_msgsConfi.cmake geographic_msgs-config.cmake Add the installation prefix of “geographic_msgs” to CMAKE_PREFIX_PATH or set “geographic_msgs_DIR” to a directory containing one of the above files. If “geographic_msgs” provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): CMakeLists.txt:9 (find_package)
git clone https://github.com/ros-geographic-info/geographic_info.git
同上
#报错Could NOT find uuid_msgs (missing: uuid_msgs_DIR) – Could not find the required component ‘uuid_msgs’. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found. CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by “uuid_msgs” with any of the following names: uuid_msgsConfig.cmake uuid_msgs-config.cmake Add the installation prefix of “uuid_msgs” to CMAKE_PREFIX_PATH or set “uuid_msgs_DIR” to a directory containing one of the above files. If “uuid_msgs” provides a separate development package or SDK, be sure it has been installed. Call Stack (most recent call first): CMakeLists.txt:4 (find_package)
git clone https://github.com/ros-geographic-info/unique_identifier.git
catkin_make报错 GeographicLib缺失
sudo apt-get install geographiclib-tools libgeographic-dev
重新catkin_make即可
回到/src/unique_identifier/uuid_msgs文件
同上编译安装
回到/geographic_info/geographic_msgs
同上编译安装
回到/robot_localization/
同上编译安装
catkin_make
#报错catkin_make时报错
Multiple packages found with the same name “lpms_ig1”: - lpms_ig1_ros_example - software/lpmsig1opensourcelib/ros2_example - software/lpmsig1opensourcelib/ros_example
删除ros2_example,ros_example
删除lpms_ig1_ros_example
sudo apt-get install mlocate sudo updatedb
#测试
打开路径catkin_ws/src/install_isolated/share/motor/launch
roslaunch motor bringup.launch
#报错Resource not found: rosbridge_server ROS path [0]=/opt/ros/noetic/share/ros ROS path [1]=/home/linaro/catkin_ws/src ROS path [2]=/opt/ros/noetic/share The traceback for the exception was written to the log file
解决办法:
git clone https://github.com/RobotWebTools/rosbridge_suite.git -b ros1
同上编译安装
测试:
catkin_ws工作空间下使用命令
catkin_make
#报错:
Multiple packages found with the same name “lpms_ig1”: - software/lpmsig1opensourcelib/ros2_example - software/lpmsig1opensourcelib/ros_example
#解决办法,删除ros2_example,并将ros_example移到工作空间外部
catkin_make
1.测试
roslaunch motor bringup.launch
提示节点都找不到
2.单个launch文件测试:
打开bringup.launch文件,测试static_tf_demo.launch文件
在install_isolated目录下打开一个命令行(或者在bachrc文件下添加source /home/linaro/catkin_ws/src/install_isolated/setup.bash)
source setup.bash
roslaunch telpo_static_tf static_tf_demo.launch
#报错
/home/linaro/install_isolated/lib/telpo_static_tf/static_tf_node: error while loading shared libraries: libboost_thread.so.1.71.0: cannot open shared object file: No such file or directory
使用指令查看
dpkg --get-selections | grep libboost-thread
提示版本为1.74,不符合1.71
libboost-thread-dev:arm64 install libboost-thread1.74-dev:arm64 install libboost-thread1.74.0:arm64 install
#卸载boost1.74版本
sudo apt remove 'libboost-*1.74*' sudo apt-get remove libboost-dev sudo apt-get remove libboost-tools-dev libboost1.74-dev libboost1.74-tools-dev
下载boost1.71版本 网站:https://sourceforge.net/projects/boost/files/boost/1.71.0.beta1/,下载后使用以下指令安装
sudo ./bootstrap.sh ./b2 sudo ./b2 install sudo apt install libboost-all-dev (这里装回了1.74,不太懂,但是后面launch成功了) source setup.bash (在install_isolated文件夹下) roslaunch telpo_static_tf static_tf_demo.launch (测试成功)
3.测试第二个 main_server.launch
#报错 /home/linaro/catkin_ws/src/install_isolated/lib/server_simple/main_socket: error while loading shared libraries: libecl_threads.so: cannot open shared object file: No such file or directory
#解决办法
git clone -b release/0.62-noetic https://github.com/stonier/ecl_core.git sudo apt install build-essential libffi-dev libgc-dev libgmp-dev libffi-dev
同上安装libecl_threads
#cmake …时报错
– Could NOT find ecl_build (missing: ecl_build_DIR) – Could not find the required component ‘ecl_build’. The following CMake error indicates that you either need to install the package with the same name or change your environment so that it can be found. CMake Error at /opt/ros/noetic/share/catkin/cmake/catkinConfig.cmake:83 (find_package): Could not find a package configuration file provided by “ecl_build” with any of the following names: ecl_buildConfig.cmake ecl_build-config.cmake Add the installation prefix of “ecl_build” to CMAKE_PREFIX_PATH or set “ecl_build_DIR” to a directory containing one of the above files. If “ecl_build” provides a separate development package or SDK, be sure it has been installed.
#解决办法
git clone -b release/0.61-noetic https://github.com/stonier/ecl_tools.git
同上安装ecl_build
之后重新安装libecl_threads又报错缺少ecl_Config
git clone -b release/0.61-noetic https://github.com/stonier/ecl_lite.git
同上安装
并将ecl_errors(ecl_lite文件夹中)、ecl_type_traits(ecl_core文件夹中)等,反正elc_thread/build文件下使用cmake …报错什么就去安装对应即可
#catkin_make报错CMake Error at ecl_core/ecl_linear_algebra/CMakeLists.txt:22 (find_package): By not providing “FindSophus.cmake” in CMAKE_MODULE_PATH this project has asked CMake to find a package configuration file provided by “Sophus”, but CMake did not find one. Could not find a package configuration file provided by “Sophus” with any of the following names: SophusConfig.cmake sophus-config.cmake Add the installation prefix of “Sophus” to CMAKE_PREFIX_PATH or set “Sophus_DIR” to a directory containing one of the above files. If “Sophus” provides a separate development package or SDK, be sure it has been installed.
下载
git clone https://github.com/strasdat/Sophus.git
安装
又报错缺少fmt,下载
git clone https://github.com/fmtlib/fmt.git
安装
在Sophus文件下Cmake文件添加include_directories(path/to/fmt/include)(path/to改为对应路径)
重新安装即可
#安装libecl_threads又报错缺少ecl_utilitiesConfig
安装ecl_utilities,并在bashrc文件末尾添加
export CMAKE_PREFIX_PATH=/usr/local:$CMAKE_PREFIX_PATH
之后重新安装libecl_threads
pkg-config --variable=prefix ecl_threads(看安装的路径)
pkg-config --modversion ecl_threads(看安装的版本)roslaunch server_simple main_server.launch
#报错error while loading shared libraries: libecl_threads.so: cannot open shared object file: No such file or directory process[main_socket-2]: started with pid [55590]
locate libecl_threads.so
在bashrc文件末尾添加
export LD_LIBRARY_PATH=/home/linaro/catkin_ws/devel_isolated/ecl_threads/lib:$LD_LIBRARY_PATH
(此处路径为上面定位的路径)
roslaunch server_simple main_server.launch
报错/home/linaro/catkin_ws/src/install_isolated/lib/server_simple/main_socket: error while loading shared libraries: libglog.so.0: cannot open shared object file: No such file or directory
-
解决办法:下载
libglog
源代码:sudo apt-get install libgoogle-glog-dev
重新launch报错/home/linaro/catkin_ws/src/install_isolated/lib/server_simple/main_socket: error while loading shared libraries: libjsoncpp.so.1: cannot open shared object file: No such file or directory
解决办法:下载
libjsoncpp
sudo apt-cache search libjsoncpp
首先,你可以确认一下该库文件的具体位置:
ls -l /usr/lib/libjsoncpp.so.1.9.5
然后在 .bashrc 文件末尾添加以下行(将路径修改为正确的库文件路径):
export LD_LIBRARY_PATH=/usr/lib:${LD_LIBRARY_PATH}
保存文件并重启终端,使路径生效。
如果问题仍然存在,你可以尝试将库文件链接到 /usr/lib 目录下,命令如下:
sudo ln -s /usr/lib/libjsoncpp.so.1.9.5 /usr/lib/libjsoncpp.so.1
然后再次尝试运行 roslaunch 命令。
#报错/home/linaro/catkin_ws/src/install_isolated/lib/server_simple/main_socket: error while loading shared libraries: libGraphicsMagick+±Q16.so.12: cannot open shared object file: No such file or directory
sudo apt install libgraphicsmagick++-q16-12
然后再次尝试运行 roslaunch 命令。
#报错
/home/linaro/catkin_ws/src/install_isolated/lib/server_simple/main_socket: /usr/lib/libuuid.so.1: no version information available (required by /lib/aarch64-linux-gnu/libapr-1.so.0) /home/linaro/catkin_ws/src/install_isolated/lib/server_simple/main_socket: symbol lookup error: /home/linaro/catkin_ws/src/install_isolated/lib/server_simple/main_socket: undefined symbol: ZN4Json5ValueaSES0
sudo rm /usr/lib/libuuid.so.1 sudo ln -s /lib/aarch64-linux-gnu/libuuid.so /usr/lib/libuuid.so.1
然后再次尝试运行 roslaunch 命令。
#报错/home/linaro/catkin_ws/src/install_isolated/lib/server_simple/main_socket: symbol lookup error: /home/linaro/catkin_ws/src/install_isolated/lib/server_simple/main_socket: undefined symbol: ZN4Json5ValueaSES0
sudo apt-get install libfmt-dev catkin_make_isolated catkin_make_isolated --install --install-space /home/linaro/catkin_ws/install_isolated
修改bashrc文件,将devel改为devel_isolated
catkin_make_isolated
报错make[2]: *** [CMakeFiles/analyzer_loader.dir/build.make:147: /home/linaro/catkin_ws/devel_isolated/diagnostic_aggregator/lib/diagnostic_aggregator/analyzer_loader] Error 1 make[1]: *** [CMakeFiles/Makefile2:482: CMakeFiles/analyzer_loader.dir/all] Error 2 make: *** [Makefile:160: all] Error 2 <== Failed to process package ‘diagnostic_aggregator’: Command ‘[’/home/linaro/catkin_ws/devel_isolated/camera_calibration_parsers/env.sh’, ‘make’, ‘-j8’, ‘-l8’]’ returned non-zero exit status 2. Reproduce this error by running: ==> cd /home/linaro/catkin_ws/build_isolated/diagnostic_aggregator && /home/linaro/catkin_ws/devel_isolated/camera_calibration_parsers/env.sh make -j8 -l8
我把diagnostic_aggregator删了,因为好像没有什么用,之前是因为需要安装dianostics文件里面的diagnostic_updater
重新编译
catkin_make_isolated
###测试第三个websocket.launch
报错
ERROR: cannot launch node of type [rosbridge_server/rosbridge_websocket]: rosbridge_server ROS path [0]=/opt/ros/noetic/share/ros ROS path [1]=/home/linaro/catkin_ws/src/install_isolated/share ROS path [2]=/opt/ros/noetic/share ERROR: cannot launch node of type [rosapi/rosapi_node]: rosapi ROS path [0]=/opt/ros/noetic/share/ros ROS path [1]=/home/linaro/catkin_ws/src/install_isolated/share ROS path [2]=/opt/ros/noetic/share
进入rosapi文件夹进行安装
mkdir build cd build cmake .. make sudo make install
将export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/path/to/rosbridge_suite添加到bashrc文件末尾
sudo pip3 install twisted sudo pip3 install pyOpenSSL sudo pip3 install autobahn sudo pip3 install service_identity
重新roslaunch rosbridge_server rosbridge_websocket.launch
#测试lpmsbe1.launch,修改lpmsbe1.launch文件里面的串口号和波特率对应自己的板子即可,rk3588连接IMU的串口号是ttyS0,波特率是115200
修改后运行launch文件,成功
#测试lt-r1.launch,成功
#测试bringup_jh.launch
报错process[telpo_blackbox_masternode-2]: started with pid [79257] /home/linaro/catkin_ws/src/install_isolated/lib/telpo_blackbox_masternode/telpo_blackbox_masternode: error while loading shared libraries: libpcap.so.1: cannot open shared object file: No such file or directory process[telpo_base_node-3]: started with pid [79258] /home/linaro/catkin_ws/src/install_isolated/lib/telpo/telpo_base_node: error while loading shared libraries: libpcap.so.1: cannot open shared object file: No such file or directory
将export LD_LIBRARY_PATH=/usr/lib/aarch64-linux-gnu:$LD_LIBRARY_PATH加入到bash.rc文件末尾
sudo apt-get install libpcap-dev sudo updatedb locate libpcap.pc 输出/usr/lib/aarch64-linux-gnu/pkgconfig/libpcap.pc sudo ln -s /path/to/libpcap.so.1.10.0 /usr/lib/aarch64-linux-gnu/libpcap.so.1 重新launch
测试结果ERROR: Service [/imu/reset_heading] is not available. mkdir: cannot create directory ‘/home/jh’: Permission denied begin mkdir: /home/jh/update/SaveUpdatePath [ INFO] [1688028174.257147861]: Opening success of serial /dev/ttyS0… [ERROR] [1688028174.372140552]: epoll error or timeout
#运行roslaunch bringup.launch (launch总的文件)
报错Resource not found: rosbridge_server ROS path [0]=/opt/ros/noetic/share/ros ROS path [1]=/home/linaro/catkin_ws/src/install_isolated/share ROS path [2]=/opt/ros/noetic/share The traceback for the exception was written to the log file
export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:/path/to/rosbridge_suite
debian11源码编译ros noetic
最新推荐文章于 2025-03-21 11:30:17 发布