☰
【ROS】ROS(十一): rosclean的用法
2026/10/23 7:00:50 网站建设 项目流程

学习ROS也有一段时间了,今天早上启动ROS master的时候出现了以下的WARNING:

felaim@felaim-PC:~$ cd catkin_ws/ felaim@felaim-PC:~/catkin_ws$ roscore ... logging to /home/felaim/.ros/log/c6072cec-6d12-11e8-8346-b01041523dc7/roslaunch-felaim-PC-2591.log Checking log directory for disk usage. This may take awhile. Press Ctrl-C to interrupt WARNING: disk usage in log directory [/home/felaim/.ros/log] is over 1GB. It's recommended that you use the 'rosclean' command. started roslaunch server http://felaim-PC:33793/ ros_comm version 1.11.21 SUMMARY ======== PARAMETERS * /rosdistro: indigo * /rosversion: 1.11.21 NODES auto-starting new master process[master]: started with pid [2603] ROS_MASTER_URI=http://felaim-PC:11311/ setting /run_id to c6072cec-6d12-11e8-8346-b01041523dc7 process[rosout-1]: started with pid [2616] started core service [/rosout]

后来在WIKI上查了一下,发现还有一个rosclean的命令,使用如下命令进行检查:

felaim@felaim-PC:~/catkin_ws$ rosclean check //输出如下,检查log文档的使用情况 1.1G ROS node logs 140K rosmake logs //移除对应的log文档 rosclean purge //输出如下 PLEASE BE CAREFUL TO VERIFY THE COMMAND BELOW! Okay to execute: rm -rf /home/felaim/.ros/log (y/n)? y Purging rosmake logs. PLEASE BE CAREFUL TO VERIFY THE COMMAND BELOW! Okay to execute: rm -rf /home/felaim/.ros/rosmake (y/n)? y //再次运行roscore roscore //输出就会如下,WARNING没了 Done checking log file disk usage. Usage is <1GB.

OK,周一早上解决个小问题O(∩_∩)O哈哈~

需要专业的网站建设服务?

联系我们获取免费的网站建设咨询和方案报价,让我们帮助您实现业务目标

立即咨询