반응형
문제 현상
https://github.com/ros-teleop/teleop_twist_keyboard
위 링크의 teleop_twist_keboard를 다른 ros package와 같이 launch하면
아래와 같이 터미널이 정상적으로 출력되지 않음
currently: speed 0.22 turn 0.187
currently: speed 0.242 turn 0.2057
currently: speed
currently: speed 0.322102 turn 0.2737867
currently: speed 0.3543122 turn 0.30116537
curre
977
currently: speed 0.4715895382 turn 0.40085110747
currently: speed 0.51874849202 turn
urn 0.533532824043
currently: speed 0.690454242879 turn 0.586886106447
currently: speed 0.75949
currently: speed 0.835449633883 turn 0.710132188801
currently: speed 0.918994597271 turn
urn 0.945185943294
currently: speed 1.22318180897 turn 1.03970453762
currently: speed 1.34549
해결방법
https://github.com/ros-teleop/teleop_twist_keyboard/blob/master/teleop_twist_keyboard.py
위 파일의 175번줄
tty.setraw(sys.stdin.fileno())를
tty.setcbreak(sys.stdin.fileno())으로 수정
ref.
https://stackoverflow.com/questions/52780783/issue-printing-out-to-terminal-with-correct-format
반응형