Ubuntu22.04_如何调试ROS2_humble的源代码

这里的源码,是指的ros2 humble的官方源码。如果是自己手撸的节点或相关源码,请参考本人以前的贴子,

Ubuntu20.04+vscode快速调试ROS通用程序_ubuntu20.04vscode那个版本和ros 兼容_高精度计算机视觉的博客-CSDN博客

Ubuntu20.04+gdb/vscode调试ROS(VINS-Mono)程序_ros gdb用terminal_高精度计算机视觉的博客-CSDN博客

第一步,安装ROS2_humble源码

======================================

这一步,只编译debug模式,但不要安装到/usr/bin下,

本来这里不需要贴出来,但由于官方老是更新,所以为了直接反映当前的情况,我直接贴到下面,

https://docs.ros.org/en/humble/Installation/Alternatives/Ubuntu-Development-Setup.html

Ubuntu (source)

Table of Contents

  • System requirements

  • System setup

    • Set locale

    • Add the ROS 2 apt repository

    • Install development tools and ROS tools

  • Get ROS 2 code

  • Install dependencies using rosdep

  • Install additional DDS implementations (optional)

  • Build the code in the workspace

  • Environment setup

    • Source the setup script
  • Try some examples

  • Next steps after installing

  • Using the ROS 1 bridge

  • Additional RMW implementations (optional)

  • Alternate compilers

    • Clang
  • Stay up to date

  • Troubleshooting

  • Uninstall

System requirements

The current Debian-based target platforms for Humble Hawksbill are:

  • Tier 1: Ubuntu Linux - Jammy (22.04) 64-bit

  • Tier 3: Ubuntu Linux - Focal (20.04) 64-bit

  • Tier 3: Debian Linux - Bullseye (11) 64-bit

Other Linux platforms with varying support levels include:

  • Arch Linux, see alternate instructions

  • Fedora Linux, see alternate instructions

  • OpenEmbedded / webOS OSE, see alternate instructions

As defined in REP 2000.

System setup

Set locale

Make sure you have a locale which supports UTF-8.
If you are in a minimal environment (such as a docker container), the locale may be something minimal like POSIX.
We test with the following settings. However, it should be fine if you’re using a different UTF-8 supported locale.

locale # check for UTF-8

sudo apt update && sudo apt install locales
sudo locale-gen en_US en_US.UTF-8
sudo update-locale LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8
export LANG=en_US.UTF-8
locale # verify settings

Add the ROS 2 apt repository

You will need to add the ROS 2 apt repository to your system.

First ensure that the Ubuntu Universe repository is enabled.

sudo apt install software-properties-common
sudo add-apt-repository universe

Now add the ROS 2 GPG key with apt.

sudo apt update && sudo apt install curl -y
sudo curl -sSL https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -o /usr/share/keyrings/ros-archive-keyring.gpg

Then add the repository to your sources list.

echo “deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/ros-archive-keyring.gpg] http://packages.ros.org/ros2/ubuntu $(. /etc/os-release && echo $UBUNTU_CODENAME) main” | sudo tee /etc/apt/sources.list.d/ros2.list > /dev/null

Install development tools and ROS tools

Install common packages.

sudo apt update && sudo apt install -y
python3-flake8-docstrings
python3-pip
python3-pytest-cov
ros-dev-tools

Install packages according to your Ubuntu version.

sudo apt install -y
python3-flake8-blind-except
python3-flake8-builtins
python3-flake8-class-newline
python3-flake8-comprehensions
python3-flake8-deprecated
python3-flake8-import-order
python3-flake8-quotes
python3-pytest-repeat
python3-pytest-rerunfailures

Get ROS 2 code

Create a workspace and clone all repos:

mkdir -p ~/ros2_humble/src
cd ~/ros2_humble
vcs import --input https://raw.githubusercontent.com/ros2/ros2/humble/ros2.repos src

Install dependencies using rosdep

ROS 2 packages are built on frequently updated Ubuntu systems.
It is always recommended that you ensure your system is up to date before installing new packages.

sudo apt upgrade

sudo rosdep init
rosdep update
rosdep install --from-paths src --ignore-src -y --skip-keys “fastcdr rti-connext-dds-6.0.1 urdfdom_headers”

Note:
If you’re using a distribution that is based on Ubuntu (like Linux
Mint) but does not identify itself as such, you’ll get an error message
like Unsupported OS [mint]. In this case append --os=ubuntu:jammy to the above command.

Install additional DDS implementations (optional)

If you would like to use another DDS or RTPS vendor besides the default, you can find instructions here.

Build the code in the workspace

If you have already installed ROS 2 another way (either via Debians
or the binary distribution), make sure that you run the below commands
in a fresh environment that does not have those other installations
sourced.
Also ensure that you do not have source /opt/ros/${ROS_DISTRO}/setup.bash in your .bashrc.
You can make sure that ROS 2 is not sourced with the command printenv | grep -i ROS.
The output should be empty.

More info on working with a ROS workspace can be found in this tutorial.

cd ~/ros2_humble/
colcon build --symlink-install

Note:
if you are having trouble compiling all examples and this is preventing
you from completing a successful build, you can use COLCON_IGNORE in the same manner as CATKIN_IGNORE to ignore the subtree or remove the folder from the workspace.
Take for instance: you would like to avoid installing the large OpenCV library.
Well then simply run touch COLCON_IGNORE in the cam2image demo directory to leave it out of the build process.

Environment setup

Source the setup script

Set up your environment by sourcing the following file.

Replace “.bash” with your shell if you’re not using bash

Possible values are: setup.bash, setup.sh, setup.zsh

. ~/ros2_humble/install/local_setup.bash

Try some examples

In one terminal, source the setup file and then run a C++ talker:

. ~/ros2_humble/install/local_setup.bash
ros2 run demo_nodes_cpp talker

In another terminal source the setup file and then run a Python listener:

. ~/ros2_humble/install/local_setup.bash
ros2 run demo_nodes_py listener

You should see the talker saying that it’s Publishing messages and the listener saying I heard those messages.
This verifies both the C++ and Python APIs are working properly.
Hooray!

Next steps after installing

Continue with the tutorials and demos to configure your environment, create your own workspace and packages, and learn ROS 2 core concepts.

Using the ROS 1 bridge

The ROS 1 bridge can connect topics from ROS 1 to ROS 2 and vice-versa. See the dedicated documentation on how to build and use the ROS 1 bridge.

Additional RMW implementations (optional)

The default middleware that ROS 2 uses is Fast DDS, but the middleware (RMW) can be replaced at runtime.
See the guide on how to work with multiple RMWs.

Alternate compilers

Using a different compiler besides gcc to compile ROS 2 is easy. If you set the environment variables CC and CXX to executables for a working C and C++ compiler, respectively, and retrigger CMake configuration (by using --force-cmake-config or by deleting the packages you want to be affected), CMake will reconfigure and use the different compiler.

Clang

To configure CMake to detect and use Clang:

sudo apt install clang
export CC=clang
export CXX=clang++
colcon build --cmake-force-configure

Stay up to date

See Maintain source checkout to periodically refresh your source installation.

Troubleshooting

Troubleshooting techniques can be found here.

Uninstall

  1. If you installed your workspace with colcon as instructed above,
    “uninstalling” could be just a matter of opening a new terminal and not
    sourcing the workspace’s setup file.
    This way, your environment will behave as though there is no Humble install on your system.

  2. If you’re also trying to free up space, you can delete the entire workspace directory with:

rm -rf ~/ros2_humble

第二步,编译

======================================

《colcon-build-ros2-humble》

cd ~/ros2_humble/

当然,你可以使用官方的指令,不过编译出来默认是Release,不能进行源码调试,

colcon build --symlink-install

https://autowarefoundation.github.io/autoware-documentation/pr-278/how-to-guides/advanced-usage-of-colcon/

实际这里要使用下面的Debug模式,因为要调试,

colcon build --cmake-args -DCMAKE_BUILD_TYPE=Debug

colcon build --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo

colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release

然后,如果下面的命令可以成功执行,就说明编译成功了,

. ~/ros2_humble/install/local_setup.bash
ros2 run demo_nodes_cpp talker

. ~/ros2_humble/install/local_setup.bash
ros2 run demo_nodes_py listener

因为ROS2在ubuntu下面的编译几乎没什么难度,所以这里不展开了。

第三步,拷贝测试代码并进行编译

======================================

为了避免修改源码,这里我把

/home/matthew/ros2_humble/src/ros2/demos/demo_nodes_cpp,

/home/matthew/ros2_humble/src/ros2/examples,

等测试文件夹直接拷贝到这里,

/home/matthew/test/src/demo_nodes_cpp

然后test就相当于workspace,教程上一般会用ros2_ws这样的目录,本质上是一样的,其下一定要有src目录,方便管理。

cd ~/test
colcon build --cmake-args -DCMAKE_BUILD_TYPE=Debug

一切正常的话就会生成debug版本的talker等一系列可执行文件,其中talker的位置在这里,

/home/matthew/test/install/demo_nodes_cpp/lib/demo_nodes_cpp

其他应用程序都是一样的原理,因为实际生成的可执行文件比较多,这里就不列出来了,后面我会调试talker和publisher_member_function进行调试。

第四步,VSCODE准备工作

======================================

用VSCODE打开文件夹,

/home/matthew/test/

然后通过vscode的运行调试按钮添加launch.json(这里只调试talker),内容如下,

{// Use IntelliSense to learn about possible attributes.// Hover to view descriptions of existing attributes.// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387"version": "0.2.0","configurations": [{"name": "(gdb) Launch","type": "cppdbg","request": "launch","program": "${workspaceFolder}/install/demo_nodes_cpp/lib/demo_nodes_cpp/talker","args": [],"stopAtEntry": false,"cwd": "${workspaceFolder}","environment": [],"externalConsole": false,"MIMode": "gdb","setupCommands": [{"description": "Enable pretty-printing for gdb","text": "-enable-pretty-printing","ignoreFailures": true}]}]
}

快捷键ctrl+shift+p,找到Tasks:Configure Task,添加tasks.json文件;

{"version": "2.0.0","tasks": [{"type": "cppbuild","label": "C/C++: clang-14 生成活动文件","command": "/usr/bin/clang-14","args": ["-fcolor-diagnostics","-fansi-escape-codes","-g","${file}","-o","${fileDirname}/${fileBasenameNoExtension}"],"options": {"cwd": "${fileDirname}"},"problemMatcher": ["$gcc"],"group": "build","detail": "编译器: /usr/bin/clang-14"}]
}

快捷键ctrl+shift+p,找到C/C++ :Edit configurations (JSON),添加c_cppproperties.json文件,

{"configurations": [{"name": "testconfig","includePath": ["${workspaceFolder}/**","${workspaceFolder}/src/demo_nodes_cpp_native/include","${workspaceFolder}/src/demo_nodes_cpp/include","/usr/include/**","/home/matthew/ros2_humble/installed/include/**","/home/matthew/ros2_humble/installed/include/rclcpp/**","/home/matthew/ros2_humble/installed/include/rclcpp/**","/home/matthew/ros2_humble/installed/include/rclcpp/**","/home/matthew/ros2_humble/installed/include/actionlib_msgs/**","/home/matthew/ros2_humble/installed/include/action_msgs/**","/home/matthew/ros2_humble/installed/include/action_tutorials_interfaces/**","/home/matthew/ros2_humble/installed/include/ament_index_cpp/**","/home/matthew/ros2_humble/installed/include/benchmark/**","/home/matthew/ros2_humble/installed/include/builtin_interfaces/**","/home/matthew/ros2_humble/installed/include/camera_calibration_parsers/**","/home/matthew/ros2_humble/installed/include/camera_info_manager/**","/home/matthew/ros2_humble/installed/include/class_loader/**","/home/matthew/ros2_humble/installed/include/composition_interfaces/**","/home/matthew/ros2_humble/installed/include/dds/**","/home/matthew/ros2_humble/installed/include/ddsc/**","/home/matthew/ros2_humble/installed/include/diagnostic_msgs/**","/home/matthew/ros2_humble/installed/include/example_interfaces/**","/home/matthew/ros2_humble/installed/include/examples_rclcpp_cbg_executor/**","/home/matthew/ros2_humble/installed/include/fastcdr/**","/home/matthew/ros2_humble/installed/include/fastdds/**","/home/matthew/ros2_humble/installed/include/fastrtps/**","/home/matthew/ros2_humble/installed/include/foonathan_memory/**","/home/matthew/ros2_humble/installed/include/geometry_msgs/**","/home/matthew/ros2_humble/installed/include/gmock/**","/home/matthew/ros2_humble/installed/include/gtest/**","/home/matthew/ros2_humble/installed/include/iceoryx/**","/home/matthew/ros2_humble/installed/include/idl/**","/home/matthew/ros2_humble/installed/include/idlc/**","/home/matthew/ros2_humble/installed/include/image_tools/**","/home/matthew/ros2_humble/installed/include/image_transport/**","/home/matthew/ros2_humble/installed/include/interactive_markers/**","/home/matthew/ros2_humble/installed/include/intra_process_demo/**","/home/matthew/ros2_humble/installed/include/kdl_parser/**","/home/matthew/ros2_humble/installed/include/keyboard_handler/**","/home/matthew/ros2_humble/installed/include/laser_geometry/**","/home/matthew/ros2_humble/installed/include/libstatistics_collector/**","/home/matthew/ros2_humble/installed/include/libyaml_vendor/**","/home/matthew/ros2_humble/installed/include/lifecycle_msgs/**","/home/matthew/ros2_humble/installed/include/logging_demo/**","/home/matthew/ros2_humble/installed/include/map_msgs/**","/home/matthew/ros2_humble/installed/include/mcap_vendor/**","/home/matthew/ros2_humble/installed/include/message_filters/**","/home/matthew/ros2_humble/installed/include/mimick/**","/home/matthew/ros2_humble/installed/include/moodycamel/**","/home/matthew/ros2_humble/installed/include/nav_msgs/**","/home/matthew/ros2_humble/installed/include/OGRE/**","/home/matthew/ros2_humble/installed/include/osrf_testing_tools_cpp/**","/home/matthew/ros2_humble/installed/include/pendulum_msgs/**","/home/matthew/ros2_humble/installed/include/performance_test_fixture/**","/home/matthew/ros2_humble/installed/include/pluginlib/**","/home/matthew/ros2_humble/installed/include/qt_gui_cpp/**","/home/matthew/ros2_humble/installed/include/rcl/**","/home/matthew/ros2_humble/installed/include/rcl_action/**","/home/matthew/ros2_humble/installed/include/rclcpp/**","/home/matthew/ros2_humble/installed/include/rclcpp_action/**","/home/matthew/ros2_humble/installed/include/rclcpp_components/**","/home/matthew/ros2_humble/installed/include/rclcpp_lifecycle/**","/home/matthew/ros2_humble/installed/include/rcl_interfaces/**","/home/matthew/ros2_humble/installed/include/rcl_lifecycle/**","/home/matthew/ros2_humble/installed/include/rcl_logging_interface/**","/home/matthew/ros2_humble/installed/include/rcl_yaml_param_parser/**","/home/matthew/ros2_humble/installed/include/rcpputils/**","/home/matthew/ros2_humble/installed/include/rcutils/**","/home/matthew/ros2_humble/installed/include/resource_retriever/**","/home/matthew/ros2_humble/installed/include/rmw/**","/home/matthew/ros2_humble/installed/include/rmw_connextdds/**","/home/matthew/ros2_humble/installed/include/rmw_dds_common/**","/home/matthew/ros2_humble/installed/include/rmw_fastrtps_cpp/**","/home/matthew/ros2_humble/installed/include/rmw_fastrtps_dynamic_cpp/**","/home/matthew/ros2_humble/installed/include/rmw_fastrtps_shared_cpp/**","/home/matthew/ros2_humble/installed/include/robot_state_publisher/**","/home/matthew/ros2_humble/installed/include/ros2cli_test_interfaces/**","/home/matthew/ros2_humble/installed/include/rosbag2_compression/**","/home/matthew/ros2_humble/installed/include/rosbag2_compression_zstd/**","/home/matthew/ros2_humble/installed/include/rosbag2_cpp/**","/home/matthew/ros2_humble/installed/include/rosbag2_interfaces/**","/home/matthew/ros2_humble/installed/include/rosbag2_storage/**","/home/matthew/ros2_humble/installed/include/rosbag2_storage_default_plugins/**","/home/matthew/ros2_humble/installed/include/rosbag2_storage_mcap_testdata/**","/home/matthew/ros2_humble/installed/include/rosbag2_test_common/**","/home/matthew/ros2_humble/installed/include/rosbag2_transport/**","/home/matthew/ros2_humble/installed/include/rosgraph_msgs/**","/home/matthew/ros2_humble/installed/include/rosidl_runtime_c/**","/home/matthew/ros2_humble/installed/include/rosidl_runtime_cpp/**","/home/matthew/ros2_humble/installed/include/rosidl_typesupport_c/**","/home/matthew/ros2_humble/installed/include/rosidl_typesupport_cpp/**","/home/matthew/ros2_humble/installed/include/rosidl_typesupport_fastrtps_c/**","/home/matthew/ros2_humble/installed/include/rosidl_typesupport_fastrtps_cpp/**","/home/matthew/ros2_humble/installed/include/rosidl_typesupport_interface/**","/home/matthew/ros2_humble/installed/include/rosidl_typesupport_introspection_c/**","/home/matthew/ros2_humble/installed/include/rosidl_typesupport_introspection_cpp/**","/home/matthew/ros2_humble/installed/include/rqt_gui_cpp/**","/home/matthew/ros2_humble/installed/include/rttest/**","/home/matthew/ros2_humble/installed/include/rviz_common/**","/home/matthew/ros2_humble/installed/include/rviz_default_plugins/**","/home/matthew/ros2_humble/installed/include/rviz_rendering/**","/home/matthew/ros2_humble/installed/include/rviz_visual_testing_framework/**","/home/matthew/ros2_humble/installed/include/sensor_msgs/**","/home/matthew/ros2_humble/installed/include/shape_msgs/**","/home/matthew/ros2_humble/installed/include/statistics_msgs/**","/home/matthew/ros2_humble/installed/include/std_msgs/**","/home/matthew/ros2_humble/installed/include/std_srvs/**","/home/matthew/ros2_humble/installed/include/stereo_msgs/**","/home/matthew/ros2_humble/installed/include/test_msgs/**","/home/matthew/ros2_humble/installed/include/tf2/**","/home/matthew/ros2_humble/installed/include/tf2_bullet/**","/home/matthew/ros2_humble/installed/include/tf2_eigen/**","/home/matthew/ros2_humble/installed/include/tf2_eigen_kdl/**","/home/matthew/ros2_humble/installed/include/tf2_geometry_msgs/**","/home/matthew/ros2_humble/installed/include/tf2_kdl/**","/home/matthew/ros2_humble/installed/include/tf2_msgs/**","/home/matthew/ros2_humble/installed/include/tf2_ros/**","/home/matthew/ros2_humble/installed/include/tf2_sensor_msgs/**","/home/matthew/ros2_humble/installed/include/tlsf/**","/home/matthew/ros2_humble/installed/include/tlsf_cpp/**","/home/matthew/ros2_humble/installed/include/tracetools/**","/home/matthew/ros2_humble/installed/include/trajectory_msgs/**","/home/matthew/ros2_humble/installed/include/turtlesim/**","/home/matthew/ros2_humble/installed/include/unique_identifier_msgs/**","/home/matthew/ros2_humble/installed/include/urdf/**","/home/matthew/ros2_humble/installed/include/urdfdom/**","/home/matthew/ros2_humble/installed/include/urdfdom_headers/**","/home/matthew/ros2_humble/installed/include/urdf_parser_plugin/**","/home/matthew/ros2_humble/installed/include/visualization_msgs/**"],"defines": [],"compilerPath": "/usr/bin/clang-14","cStandard": "c17","cppStandard": "c++17","intelliSenseMode": "linux-clang-x64"}],"version": 4
}

这里面,为什么include path会这么多,因为官方的源码是把所有的include合并到一个文件夹中的,我这里就不合并了,只是把所有的install下面的include文件夹拷贝到/home/matthew/test/installed下面去了;子目录非常多,我是通过脚本自动添加的这些路径。

脚本的办法五花八门,我自己喜欢用NotePad++结合Linux下几个常用的指令,参考如下,

find . -type d > output.txt

or tree

tree -d > output.txt

or,

ls > list.txt

然后通过文本处理器Notepad++替换添加一顿操作弄好之后,直接贴到include path里就OK了。

第五步,VSCODE调试运行ros2-humble源码

======================================

到这里,一切准备就绪,vscode里打开一个terminal,输入,

$ cd ~/test
$ . ~/ros2_humble/install/setup.bash
$ . ./install/setup.bash

这里要注意 ,一定是要在左边已经选择(gdb) Launch的情况 下,在右侧的cppdbg:publisher_member_function窗口中输入setup.bash指令 ,不是bash窗口,如下图的右下角所示,否则会找不到librclcpp.so等库文件 而无法调试。

然后,就可以在member_function里随便打断点,进入ros2 humble的源码了,截图如下所示,

在这里插入图片描述可以看到,成功进入了ros2 humble的源码了,
在这里插入图片描述本文结束

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/81403.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

HTML 知识扫盲

写在前面 HTML 是一门超文本标记语言,不管你听没听说过 HTML,但在网上冲浪的途中你无时不刻都在与它接触,他遍布在每个你看得到的互联网的角落。其实对于笔者而言,我已经断断续续地学习过这门语言,经过时间的磋磨&…

利用cms主题构造木马(CVE-2022-26965)

简介 CVE-2022-26965是Pluck CMS 4.7.16版本存在一个远程shell上传执行漏洞。 攻击者可利用此漏洞通过构造恶意的主题包进行上传并执行,未经授权访问服务器,造成潜在的安全隐患。 过程 1.打开环境,查看源码,发现login.php 2.进…

带你熟练使用list

🎈个人主页:🎈 :✨✨✨初阶牛✨✨✨ 🐻强烈推荐优质专栏: 🍔🍟🌯C的世界(持续更新中) 🐻推荐专栏1: 🍔🍟🌯C语言初阶 🐻推荐专栏2: 🍔…

使用jupyter运行sympy库

1.首先下载sympy插件: (1)在下图这里输入cmd (2)pip install sympy 若出现不信任此资源错误,改成pip install sympy--trusted-host pypi.tuna.tsinghua.edu.cn (3)检查是否安装成功 python import sympy sympy.__version__&#…

GemBox.Bundle 47.0.1227 Crack

GemBox.Document 35.0.1480 GemBox.Email 17.0.1147 GemBox.Imaging 10.0.1096 GemBox.Pdf 17.0.1404 GemBox.Presentation 25.0.1526 GemBox.Spreadsheet 49.0.1454 GemBox.Spreadsheet 从 .NET 应用程序读取、写入、转换和打印 XLSX、XLS、XLSB、CSV、HTML 和 ODS 电子表…

Git使用方法与IDEA集成Git

1.Git介绍 1.1版本控制(理解) 无论是代码编写,还是文档编写,我们都会遇到对文档内容反复修改的情况。 1.2开发中存在的问题(理解) 程序员小明负责的模块就要完成了,就在即将提交发布之前的一瞬间,电脑突然蓝屏,硬盘…

解决three.js中加载纹理贴图时,初次渲染不显示的问题

效果: 解决方法:主要是将一些构建网格对象的操作放在了textureLoader.load()方法中,加载图片也用了require init() {// 1, 创建场景对象this.scene new this.$three.Scene();// 2, 创建立方缓冲几何体this.geometry new this.$three.BoxGe…

Promethus(普罗米修斯)安装与配置(亲测可用)

1. 普罗米修斯概述 Prometheus(是由go语言(golang)开发)是一套开源的监控&报警&时间序列数 据库的组合。适合监控docker容器。 Prometheus是最初在SoundCloud上构建的开源系统监视和警报工具包 。自2012年成立以来,许多公司和组织都采用了Prometheus&#…

电压源与电流源简介

文章目录 电压源与电流源简介1.电压源的本质2.电流源的本质3.Q&A 推荐学习 电压源与电流源简介 1.电压源的本质 无论带什么样的负载,输出电压保持不变的电路才是电压源。 一个电路想要输出电压不变,那它必须有强有力的输出电流能力,而不…

idea在同一窗口打开多个项目

ieda中同一窗口打开多个项目操作如下: 1.点击文件中的项目结构 2.点击模块,选择号 3.点击想要加入的模块,点击下一步确定等,最后点击应用,确定。变成如下图所示,这样方便多个项目代码的阅读

EdgeX Foundry MQTT设备服务

一、部署edgex 1.运行命令行,进入放置docker-compose-fuji-no-secty.yml文件的路径下 下载到本地的docker-compose文件 执行: docker-compose -f docker-compose-fuji-no-secty.yml pull 拉取相关镜像,这里默认将文件中没有注释的服务镜像全部…

27、Flink 的SQL之SELECT (SQL Hints 和 Joins)介绍及详细示例(2-1)

Flink 系列文章 1、Flink 部署、概念介绍、source、transformation、sink使用示例、四大基石介绍和示例等系列综合文章链接 13、Flink 的table api与sql的基本概念、通用api介绍及入门示例 14、Flink 的table api与sql之数据类型: 内置数据类型以及它们的属性 15、Flink 的ta…

HarmonyOS开发环境搭建

一 鸿蒙简介: 1.1 HarmonyOS是华为自研的一款分布式操作系统,兼容Android,但又区别Android,不仅仅定位于手机系统。更侧重于万物物联和智能终端,目前已更新到4.0版本。 1.2 HarmonyOS软件编程语言是ArkTS&#xff0c…

Flutter快速入门学习(一)

目录 前言 新建项目 项目入口 Dart的入口(项目的入口) 布局 视图组件 Container(容器) Text(文本) Image(图片) Row(水平布局)和Column&#xff08…

C++ 算法学习 之 vector assign

参考c官方手册 vector::assign是C标准模板库中的一个函数&#xff0c;它的主要功能是给vector容器重新赋值。具体来说&#xff0c;vector::assign函数会删除vector中的所有元素&#xff0c;并根据用户提供的参数重新填充。 这个函数有三种形式&#xff1a; template <cla…

P2P协议的传输艺术

TP 采用两个 TCP 连接来传输一个文件。 控制连接&#xff1a;服务器以被动的方式&#xff0c;打开众所周知用于 FTP 的端口 21&#xff0c;客户端则主动发起连接。该连接将命令从客户端传给服务器&#xff0c;并传回服务器的应答。常用的命令有&#xff1a;list——获取文件目…

随机抽样一致RANSAC

文章目录 RANSAC简介RANSAC算法Ransac在3D视觉中的用法直线拟合单应性矩阵拟合RANSAC的优缺点RANSAC的优点RANSAC的缺点RANSAC在弯曲场景中的缺点:RANSAC适用场景RANSAC简介 RANSAC是 RANdom SAmple Consensus 的缩写,中文翻译叫随机采样一致。它可以从一组观测数据中,找出…

【ROS】Ubuntu20.04+ROS Noetic 配置PX4-v1.12.2和Gazebo11联合仿真环境【教程】

【ROS】Ubuntu20.04ROS Noetic 配置PX4-v-v1.12.2和Gazebo11联合仿真环境【教程】 文章目录 【ROS】Ubuntu20.04ROS Noetic 配置PX4-v-v1.12.2和Gazebo11联合仿真环境【教程】0. 安装UbuntuROS1. 安装依赖2. 安装QGC地面站3. 配置PX4-v1.12.23.1 安装PX43.2 测试PX4是否成功安装…

hive工具-zeppelin部署

zeppelin部署 解压安装包至/opt/soft 并改名 /etc/proofile中配置环境变量并source生效 #ZEPPELIN export ZEPPELIN_HOME/opt/soft/zeppelin010 export PATH$ZEPPELIN_HOME/bin:$PATH &#xff08;1&#xff09;conf目录下拷贝一份初始配置文件 [rootkb129 conf]# pwd /opt/s…