当前位置:网站首页>Some records during the development of ros2/ros1
Some records during the development of ros2/ros1
2022-07-29 02:38:00 【zhangrelay】
Actually , It's going on ROS2/ROS1 When programming , You usually need to start many nodes , Sometimes greater than 60+ Nodes are also very common .
that , You need to schedule these nodes . Different nodes work at different frequencies , Some are 10Hz Can , Some need 1000Hz.
Basic concepts :
- taskset
- isolcpus
taskset Used in a given pid Set or retrieve the of the running process CPU Affinity , Or start with a given CPU The new command of affinity . CPU Affinity is a scheduler property , It will make the process “ binding ” To a set of given on the system CPU. Linux The scheduler will follow the given CPU Affinity , And the process will not be in any other CPU Up operation . Please note that ,Linux The scheduler also supports natural CPU Affinity : For performance reasons , The scheduler will try to keep the process in the same CPU On , As long as it works . therefore , Force specific CPU Affinity is only useful in some applications .
CPU Affinity is expressed as a bit mask , The lowest bit corresponds to the first logic CPU, The highest bit corresponds to the last logic CPU. Not all CPU Can exist on a given system , But the mask may specify more than existing CPU. The retrieved mask will only reflect the physical CPU The corresponding bit . If an invalid mask is given ( namely , It corresponds to that there is no valid CPU The mask of ), It will return an error . Masks are usually given in hexadecimal . for example ,
- 0x00000001 It's the processor #0
- 0x00000003 It's the processor #0 and #1
- 0xFFFFFFFF Yes, all processors (#0 To #31)
When the task set returns , It can ensure that the given program has been dispatched to a legal CPU On .
isolcpus We need to pay attention to amd and intel The difference , If it is arm or nVidia……
In extreme cases, the performance is unstable , perhaps CPU completely fill .
use "events executor", This is in ROS 2 Humble You can use it directly , Other previous versions need to compile the corresponding source code .
Callback function or time
FastDDS It needs to be configured before using , This is better .
otherwise , Sometimes FastDDS Cannot list nodes after restarting nodes while other nodes are running / The theme .
Specific to see discovery_server; Or switch to CycloneDDS
If you choose CycloneDDS, Configuration is also required , Instead of using default parameters directly .
ROS_DOMAIN_ID The same configuration will make the network overburdened in the case of a large number of network needs or multiple robots ……
colcon build It's best to add some parameters, otherwise it's not easy to use .
边栏推荐
- 关于高并发,我想聊一聊。
- FPGA skimming memory (Verilog implementation of ram and FIFO)
- 聊聊 Feign 的实现原理
- Explanation of engineering economics terms
- 当我看源码的时候,我在想什么?
- Object based real-time spatial audio rendering - Dev for dev column
- After 4 years of testing experience, I finally entered Alibaba. Two months later, I chose to resign naked
- 远离才会思念
- Esbuild Bundler HMR
- 如果非要在多线程中使用 ArrayList 会发生什么?
猜你喜欢

Esbuild Bundler HMR

物联网组件

FPGA skimming memory (Verilog implementation of ram and FIFO)

Transform okhttp cache with retrofit

Understanding service governance in distributed development

I want to talk about high concurrency.
![[quality] code quality evaluation standard](/img/33/2c2256fd98b908ddaf5573f644ad7f.png)
[quality] code quality evaluation standard

Polygon point test

ES6详解 快速上手!

Servlet三种实现方式
随机推荐
What should I do if excel opens a CSV file containing Chinese characters and there is garbled code?
[golang learning notes 2.2] map, structure and interface
I want to talk about high concurrency.
4年测试经验,好不容易进了阿里,两个月后我选择了裸辞...
3d智能工厂工艺流转可视化交互展示应用优点
[upload pictures can be cut-1]
HTTP breakpoint resume and cache problems
MySQL和Redis的双写一致性
ECCV 2022 | AirDet:无需微调的小样本目标检测方法
HTTP断点续传以及缓存问题
7/28 高斯消元解线性方程组+高斯消元解异或线性方程组 +求组合数ii
6年测试经验,教大家测试~如何把控项目
聊聊 Feign 的实现原理
CUDA details GPU architecture
Where, having, group by, order by, is null, not in, subquery, delete, date function
如何利用 RPA 实现自动化获客?
HTTP缓存
C语言实现三子棋游戏
代码实现 —— 多项式的最大公因式(线性代数)
redis为什么快,消息队列,单线程