当前位置:网站首页>Ros2 learning notes (VII) tools for learning ros2 from turnlesim
Ros2 learning notes (VII) tools for learning ros2 from turnlesim
2022-04-22 12:29:00 【Xicheng Xiaokai】
Preface
Study ROS2 Way , Not through learning ROS1 Instead of , because ROS2 Of “ kernel ” differ ROS1, We must seriously start from scratch and learn again .
Ubuntu edition :20.04
ROS edition :Foxy
Review of study notes
- ROS2 Learning notes ( One ) Get document
- ubuntu20.04 install ROS2 and ROS1 coexistence
- ROS2 Learning notes ( Two ) from turtlesim Study ROS2 node
- ROS2 Learning notes ( 3、 ... and ) from turtlesim Study ROS2 The theme
- ROS2 Learning notes ( Four ) from turtlesim Study ROS2 service
- ROS2 Learning notes ( 5、 ... and ) from turtlesim Study ROS2 Parameters
- ROS2 Learning notes ( 6、 ... and ) from turtlesim Study ROS2 action
1.rqt_console Tools
rqt_console It's a graphical tool , For viewing ROS2 Log messages in . In general , All log messages will be refreshed in the terminal . By using rqt_console Tools , You can collect log messages more clearly , More conditioning to view and save logs , And you can play back the saved file data .
2. start-up rqt_console Tools
$ ros2 run rqt_console rqt_console
The interface is as follows :

The interface is divided into three boxes , The above section is used to display log messages in the system .
The middle part is used to select the severity level to filter log messages . You can also add more filters through the plus sign on the right .
The following section is used to highlight the log message containing the string I entered .
3. Start the little turtle Simulator
$ ros2 run turtlesim turtlesim_node
4. Send instructions for turtle movement
Now we send the movement instructions to the turtle , Let the turtle hit the boundary of the simulator , This generates log messages .
$ ros2 topic pub -r 1 /turtle1/cmd_vel geometry_msgs/msg/Twist "{linear: {x: 2.0, y: 0.0, z: 0.0}, angular: {x: 0.0,y: 0.0,z: 0.0}}"
After sending the command , The little turtle will keep hitting the wall , This will receive... At a steady rate Warn Log information :

Turn off the sending command terminal .
5. Log severity level
ROS2 Your log has a severity rating :
Fatal # Indicates that the system will terminate , To prevent yourself from being hurt
Error # Indicates that the problem is significant , But it doesn't necessarily damage the system , But it will prevent the program from running
Warn # Indicates a warning problem , There may be unexpected or deeper problems , But it won't completely damage the function
Info # A hint indicating the event message , The system operates as expected
Debug # It shows the whole step-by-step process of system implementation
6. Set the log default severity
It can be run /turtlesim, By remapping, set the default severity to Warn:
$ ros2 run turtlesim turtlesim_node --ros-args --log-level WARN
At this time , I won't see Info The question of rank , Only Warn More serious problems .
summary
Learn how to use rqt_console View log messages , It can help you locate the problem faster .
Reference:
https://docs.ros.org/en/foxy/Tutorials/Rqt-Console/Using-Rqt-Console.html
Conclusion
This paper is also based on the author's learning and use experience , Strong subjectivity , If there is anything wrong or unclear , Welcome to leave a message in the comments area ~
In order to further discuss the problem with the readers , Set up a wechat group , It's convenient to answer your questions , You can also discuss problems together .
Add group links
版权声明
本文为[Xicheng Xiaokai]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/04/202204221223330329.html
边栏推荐
猜你喜欢

Free trial for the first three months! Borui data alarm platform onealert is in progress

matlab 桥梁跨径组合问题GUI图形界面完成

MySQL 5.0安装教程图解详细教程
![【深入理解TcaplusDB技术】删除列表所有数据接口说明——[List表]](/img/ed/cccd5dee09d2f0a3e6c788bd265b36.png)
【深入理解TcaplusDB技术】删除列表所有数据接口说明——[List表]

刷了一千道选择题,我总结了这些C语言易错点【第二弹】

【并发编程054】多线程的状态及转换过程?

matlab 自动选择不标准桥梁跨径代码(源代码完全版)

基于STM32F103C8T6+ESP8266温室大棚远程监控系统

栈的概念和操作

ORB_SLAM3学习:Tracking 线程介绍
随机推荐
Tell your girlfriend easily: the internal principle of thread pool
JS基础11
What role does RF chip play in mobile phone?
LeetCode 695、岛屿的最大面积
Meaning of C language% 7.2d, --7d,% 7.2f,% 0.2f
What are the main mobile camera chips?
智能家居的新想法(2022)
4.21学习记录 DP记录路径(LCS)树上背包(选课)一般树形DP(没有上司的舞会)
STM32F429BIT6 SD卡模拟U盘
分享一个最近遇到的标签<iframe>
分享一下自己最近写的一个移动端项目积累的一些实用技巧
手机刷新率越高越好吗?
matlab 自动选择不标准桥梁跨径代码(源代码完全版)
JS基础7
Research shows that young people are more and more reluctant to change their mobile phones. What are the hardware updates of the next generation of smart phones that will make you have the impulse to
JS native code to achieve three-level linkage effect
Whether l3-010 is complete binary search tree (30 points)
JS基础9
After brushing a thousand multiple-choice questions, I summarized these error prone points of C language [the second bullet]
redis 不能添加数据