当前位置: 首页 > news >正文

苏州前几天网站建设网络营销师官网

苏州前几天网站建设,网络营销师官网,品牌网站建设优化公司,web调用wordpressUbuntu22.04上源码构建ROS noetic 起因准备环境创建工作目录并下载源码安装编译依赖包安装ros_comm和rosconsole包的两个补丁并修改pluginlib包的CMakeLists的编译器版本编译安装ROS noetic和ros_test验证 起因 最近在研究VINS-Mono从ROS移植到ROS2,发现在编写feat…

Ubuntu22.04上源码构建ROS noetic

  • 起因
  • 准备环境
  • 创建工作目录并下载源码
  • 安装编译依赖包
  • 安装ros_comm和rosconsole包的两个补丁并修改pluginlib包的CMakeLists的编译器版本
  • 编译安装ROS noetic和ros_test
  • 验证

起因

最近在研究VINS-Mono从ROS移植到ROS2,发现在编写feature_tracker的CMakeList.txt后,会出现找不到包含文件的问题,于是向先用ROS把VINS编译跑一下看看,便有了在Ubuntu 22.04虚拟机上再构建一个ROS的环境的想法,本来是想按照官网一步一步做就行了,然而到ROS的官方下载地址发现没有Ubuntu 22.04(jammy)版本和对应的Debian 12(Bookworm)的仓库。
在这里插入图片描述
所以按照ros官网安装步骤,在sudo apt update 这一步就止步了,原因就是Ros Noetic主要针对Ubuntu 20.04,并且不正式支持任何更新的发布了。
在这里插入图片描述
所以通过Google找到一个源码安装的方法,亲自验证后,在此分享给大家。

准备环境

  • 安装docker
  • 安装python3
  • 安装pip3
  • 安装git
  • 下载ROS Noetic基础包源码(此次可能需要借助梯子)

创建工作目录并下载源码

mkdir -p ~/ros_noetic_base_2204/catkin_ws/src

在src目录下执行脚本,下载ROS 包

#!/bin/bash
git clone https://github.com/ros/actionlib.git -b 1.14.0
git clone https://github.com/ros/bond_core.git -b 1.8.6
git clone https://github.com/ros/catkin.git -b 0.8.10
git clone https://github.com/ros/class_loader.git -b 0.5.0
git clone https://github.com/ros/cmake_modules.git -b 0.5.0
git clone https://github.com/ros/common_msgs.git -b 1.13.1
git clone https://github.com/ros/dynamic_reconfigure.git -b 1.7.3
git clone https://github.com/ros/gencpp.git -b 0.7.0
git clone https://github.com/jsk-ros-pkg/geneus.git -b 3.0.0
git clone https://github.com/ros/genlisp.git -b 0.4.18
git clone https://github.com/ros/genmsg.git -b 0.6.0
git clone https://github.com/RethinkRobotics-opensource/gennodejs.git -b 2.0.1
git clone https://github.com/ros/genpy.git -b 0.6.16
git clone https://github.com/ros/message_generation.git -b 0.4.1
git clone https://github.com/ros/message_runtime.git -b 0.4.13
git clone https://github.com/ros/nodelet_core.git -b 1.10.2
git clone https://github.com/ros/pluginlib.git -b 1.13.0
git clone https://github.com/ros/ros.git -b 1.15.8
git clone https://github.com/ros/ros_comm.git -b 1.16.0
git clone https://github.com/ros/ros_comm_msgs.git -b 1.11.3
git clone https://github.com/ros/ros_environment.git -b 1.3.2
git clone https://github.com/ros/rosbag_migration_rule.git -b 1.0.1
git clone https://github.com/ros/rosbag_migration_rule.git -b 1.0.1
git clone https://github.com/ros/rosconsole.git -b 1.14.3
git clone https://github.com/ros/rosconsole_bridge.git -b 0.5.4
git clone https://github.com/ros/roscpp_core.git -b 0.7.2
git clone https://github.com/ros/roslisp.git -b 1.9.25
git clone https://github.com/ros/rospack.git -b 2.6.2
git clone https://github.com/ros/std_msgs.git -b 0.5.13
git clone https://github.com/ros/angles.git
git clone https://github.com/ros/geometry.git 

返回到ros_noetic_base_2204目录,下载catkin_pkg和rospkg源码

git clone https://github.com/ros-infrastructure/catkin_pkg.git -b 0.5.2
git clone https://github.com/ros-infrastructure/rospkg.git -b 1.5.0

最后目录结构如下:
在这里插入图片描述

安装编译依赖包

sudo apt install -y cmake build-essential libboost-thread-dev libboost-system-dev libboost-filesystem-dev libboost-regex-dev libboost-program-options-dev libconsole-bridge-dev libpoco-dev libtinyxml2-dev liblz4-dev libbz2-dev uuid-dev liblog4cxx-dev libgpgme-dev libgtest-dev python3-setuptools python3-nose python3-pycryptodome python3-defusedxml python3-mock python3-netifaces python3-gnupg python3-numpy python3-psutil

安装ros_comm和rosconsole包的两个补丁并修改pluginlib包的CMakeLists的编译器版本

  • 在~/ros_noetic_base_2204/catkin_ws/src/ros_comm目录下新建一个ros_comm.patch的文件,将ros_comm的补丁包的内容拷贝到该文件里(如果用wget直接下载该文件,需要在最后一行末尾加个回车,否则会报错error: corrupt patch at line 22)。
    在这里插入图片描述
    在该目录下执行git apply --ignore-whitespace ros_comm.patch 更新ros_comm包。
  • 在~/ros_noetic_base_2204/catkin_ws/src/rosconsole目录下用同样的方法将rosconsole.patch内容写到该目录的文件里,在该目录下执行git apply --ignore-whitespace rosconsole.patch 更新rosconsole.patch包。
  • 把pluginlib的CMakeList.txt文件中${PROJECT_NAME}_unique_ptr_test的C++编译器版本11改为17。
    在这里插入图片描述
diff --git a/pluginlib/CMakeLists.txt b/pluginlib/CMakeLists.txt
index 289c5af..1776c02 100644
--- a/pluginlib/CMakeLists.txt
+++ b/pluginlib/CMakeLists.txt
@@ -24,12 +24,12 @@ if(CATKIN_ENABLE_TESTING)endif()include(CheckCXXCompilerFlag)
-  check_cxx_compiler_flag("-std=c++11" COMPILER_SUPPORTS_CXX11)
-  if(COMPILER_SUPPORTS_CXX11)
+  check_cxx_compiler_flag("-std=c++17" COMPILER_SUPPORTS_CXX17)
+  if(COMPILER_SUPPORTS_CXX17)catkin_add_gtest(${PROJECT_NAME}_unique_ptr_test test/unique_ptr_test.cpp)if(TARGET ${PROJECT_NAME}_unique_ptr_test)target_link_libraries(${PROJECT_NAME}_unique_ptr_test ${TinyXML2_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES})
-      set_target_properties(${PROJECT_NAME}_unique_ptr_test PROPERTIES COMPILE_FLAGS -std=c++11 LINK_FLAGS -std=c++11)
+      set_target_properties(${PROJECT_NAME}_unique_ptr_test PROPERTIES COMPILE_FLAGS -std=c++17 LINK_FLAGS -std=c++17)add_dependencies(${PROJECT_NAME}_unique_ptr_test test_plugins)endif()endif()

编译安装ROS noetic和ros_test

cd ~/ros_noetic_base_2204/catkin_pkg && python3 setup.py install
cd ~/ros_noetic_base_2204/rospkg && python3 setup.py install
cd ~/ros_noetic_base_2204/catkin_ws
./src/catkin/bin/catkin_make install \-DCMAKE_BUILD_TYPE=Release \-DPYTHON_EXECUTABLE=/usr/bin/python3./src/catkin/bin/catkin_make install \-DCMAKE_BUILD_TYPE=Release \-DPYTHON_EXECUTABLE=/usr/bin/python3 \run_tests

验证

重新打开一个终端,输入如下命令验证。

source ~/ros_noetic_base_2204/catkin_ws/devel/setup.bash
roscore

在这里插入图片描述
参考:
Building ROS Noetic on Ubuntu 22.04

http://www.dt0577.cn/news/30.html

相关文章:

  • 鞋行业的网站建设长春网站建设公司哪家好
  • 淮南网站建设好的公司专业seo优化公司
  • 做的网站怎样评估价值云南最新消息
  • 企业电话查询google seo 优化
  • 个人网站网页模板友情链接交换群
  • 深圳做网站的爱情独白智能搜索引擎
  • 哪个网站可以做相册阿里云搜索
  • 网站如何做微信支付宝支付宝支付济南疫情最新情况
  • 如何建设简易网站seo的培训网站哪里好
  • 用群晖做网站网站统计哪个好用
  • 手机网站效果图做多大的推广管理
  • 做一个电商网站多少钱纯注册app拉新平台
  • 安徽网站定制seo电商运营是什么意思
  • 电话销售-网站建设-开场白网站建设的系统流程图
  • 建设专业网站价格曲靖seo
  • 网站设计与网页建设新东方考研班收费价格表
  • wordpress调用会员等级广告投放优化师
  • 如何做网站页面免费的什么是优化师
  • 四大门户网站现状网站seo优化方案设计
  • wordpress 显示word文档win7优化大师官方网站
  • 网站开发有哪些方式东莞网站建设公司
  • 丹阳网站建设咨询百度网址安全检测中心
  • 淘宝网站建设的主要工作深圳专业建站公司
  • 点击立即进入正能量网站网站手机版排名seo
  • 微做网站百度推广获客成本大概多少
  • 用vue做的网站seo教学
  • 建设厅网站账号密码忘记怎么办关键词如何确定
  • 电子商务免费网站建设长春seo外包