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

Weird characters in the log file.

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

SR gravatar image

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

 SC]]2;roscore[BEL]

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
0

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

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
1

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

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

Comments

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

SR gravatar image SR  ( 2015-06-16 17:18:59 -0500 )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 -0500 )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 -0500 )edit

Question Tools

1 follower

Stats

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

Seen: 1,942 times

Last updated: Jun 22 '15