ROS清理log文件,解决WARNING: disk usage in log directory [/home/sjh/.ros/log] is over 1GB.问题

在使用ros的过程中,程序长时间运行后,会产生大量的日志文件,再次运行新程序时,会有红色警告:

WARNING: disk usage in log directory [/home/sjh/.ros/log] is over 1GB.
It's recommended that you use the 'rosclean' command.

这个警告是ROS(Robot Operating System)的一个常见问题,它表示ROS日志文件夹中的磁盘使用量已经超过1GB,建议使用'rosclean'命令来清理这些日志文件。

到指定目录下查看,确实已经很多文件了

ROS清理log文件,解决WARNING: disk usage in log directory [/home/sjh/.ros/log] is over 1GB.问题_第1张图片

ROS清理log文件,解决WARNING: disk usage in log directory [/home/sjh/.ros/log] is over 1GB.问题_第2张图片

解决方法:

rosclean check # 查看

rosclean purge # 删除

ROS清理log文件,解决WARNING: disk usage in log directory [/home/sjh/.ros/log] is over 1GB.问题_第3张图片

然后再次运行程序就不会有这种报错了

但其实,这只是一个警告而已,假如你的电脑空间足够,就像我还空着七八百GB,这个警告大可以忽略

你可能感兴趣的:(python,linux)