Ask Your Question
0

Launching teleop_twist_keyboard from launch file along with other nodes messes up the logs in the terminal

asked 2021-09-28 03:40:10 -0600

thanasis_t gravatar image

Hello,

I am launching the teleop_twist_keyboard node along with some other nodes from a launch file. In all nodes, I have set the "output" argument to "log" so that they do not log into the terminal except for one node (not the teleop_twist_keyboard one). However, the logs in the terminal are messed up, namely there are a lot of extra spaces which makes it very difficult to read them. I found out that this issue is caused by the teleop_twist_keyboard node even though I have set the "output" to "log", because when I am not launching it from the launch file but instead I am rosrun-ing it from another terminal, the logs of the launch file are correct.

Has anyone else encountered this issue and know how to resolve it? Thanks in advance!!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2021-09-28 04:45:25 -0600

gvdhoorn gravatar image

I wouldn't necessarily call this an "issue", but more an unfortunate consequence of how teleop_twist_keyboard is implemented and how that interacts with the way roslaunch coordinates / starts things.

In summary: teleop_twist_keyboard uses certain bits of infrastructure to be able to read your keyboard presses from the terminal it was started in. roslaunch wraps stdin, stdout and stderr and then changes the way these interact with the terminal.

To work-around this you could start teleop_twist_keyboard in a separate terminal. You can do this with a launch prefix. Something like xterm -e should work.

edit flag offensive delete link more

Comments

Ok thank you a lot for your help!!

thanasis_t gravatar image thanasis_t  ( 2021-09-29 04:15:21 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2021-09-28 03:40:10 -0600

Seen: 19 times

Last updated: Sep 28 '21