ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Weird characters in the log file.

asked 2015-06-16 06:04:49 -0600

SR gravatar image

When I run roscore and redirect the logged output to a text file I can see weird characters:


where [ESC] and [BEL] are single characters within a small box (I could not add unicode to this question).

I suspect these codes come from colored ouput. How do I get rid of these characters?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted

answered 2015-06-22 17:15:30 -0600

SR gravatar image

I could get rid of the first character with the following regulary expression (made for Python's re engine): '[^[:ascii:]].;'.

The second character could be removed by discarding all \a characters.

edit flag offensive delete link more

answered 2015-06-16 07:47:35 -0600

gvdhoorn gravatar image

This has been answered before. See Unexpected heading and trailing symbols in logfile's string for example.

edit flag offensive delete link more


Ok, Thanks. I will have a look at these suggestions.

SR gravatar image SR  ( 2015-06-16 17:18:59 -0600 )edit

The problem remains. Using TERM=dumb doesn't help in my case. Also I did not find a sed command yet to strip these characters away. The mentioned characters are hard to get rid off, the normal color codes are way easier.

SR gravatar image SR  ( 2015-06-17 17:10:45 -0600 )edit

Could be that the ones in the line you copy/pasted are actually hard coded and not actually suppressed in a dumb terminal. If you find the location in the sources then it might be an idea to open an issue against the repository to get that fixed.

gvdhoorn gravatar image gvdhoorn  ( 2015-06-22 10:04:55 -0600 )edit

Question Tools

1 follower


Asked: 2015-06-16 06:04:49 -0600

Seen: 1,893 times

Last updated: Jun 22 '15