当前位置:网站首页>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 .
边栏推荐
- 无线振弦采集系统工作流程
- What are the TCP retransmission mechanisms?
- Explain the four asynchronous solutions of JS in detail: callback function, promise, generator, async/await
- Altium designer outputs Gerber and other production documents
- KBxxxxxx不一定是补丁,也可能是某个问题解决方案的描述
- Three expiration strategies
- time_wait和close_wait产生原因
- Time pit in MySQL driver
- 平凡的快乐
- Mqtt routine
猜你喜欢

Ten methods to prevent blackmail software from attacking data

Quickly master nodejs installation and getting started

如何快速设计一套支持渲染富文本内容的跨端组件

How awesome is the architecture of "12306"?

On Multithreading

新版海螺影视主题模板M3.1全解密版本多功能苹果CMSv10后台自适应主题开源全解密版
![[mqtt from introduction to improvement series | 09] Wireshark packet capturing and analyzing mqtt messages](/img/dd/c7ad9addb0d15611d996db87bf469f.png)
[mqtt from introduction to improvement series | 09] Wireshark packet capturing and analyzing mqtt messages

NPM install reports an error: eperm: operation not permitted, rename

When synchronized encounters this thing, there is a big hole, so be careful

多边形点测试
随机推荐
Multimodal Unsupervised Image-to-Image Translation多通道无监督图像翻译
Understand the evolution of redis architecture in one article
九宫格心形拼图小程序源码/带流量主微信小程序源码
物联网组件
Esbuild Bundler HMR
Others' happiness
How to migrate thinkphp5 projects to Alibaba cloud function computing to cope with traffic peaks?
How does the Devops team defend against API attacks?
MySQL基本操作和基于MySQL基本操作的综合实例项目
Mqtt routine
工程经济学名词解释
Master-slave replication and its principle
Kbxxxxx is not necessarily a patch, but also a description of a solution to a problem
2022/07/28 learning notes (day18) common APIs
白马过隙的时光
VR safety training of mine mining virtual reality improves employees' vigilance and protection awareness
工程经济学简答题
聊聊接口性能优化的11个小技巧
MySQL驱动中关于时间的坑
Object based real-time spatial audio rendering - Dev for dev column