ERROR

[error] termios.error: (25, 'Inappropriate ioctl for device')

mle21 2023. 5. 17. 06:00
반응형

[문제]

ros2 run 파일인 'teleop_twist_keyboard.py'를 launch 파일로 만들어 실행할때 에러 발생, ex) teleop_twist_keyboard.launch.py

from launch import LaunchDescription
form launch.actions import ExecuteProcess

def generate_launch_description():
    return LaunchDescription(
        [ExecuteProcess(
            cmd=['ros2', 'run', 'teleop_twist_keyboard', 'teleop_twist_keyboard'],
            output='screen'
            )
        ]
    )

[예상 원인]

정확하게 파악 못 했음

 

[해결 방법]

prefix='gnome-terminal --' 추가하기 ('xterm -e' 추가해도 되나 터미널이 안이쁨)

from launch import LaunchDescription
form launch.actions import ExecuteProcess

def generate_launch_description():
    return LaunchDescription(
        [ExecuteProcess(
            cmd=['ros2', 'run', 'teleop_twist_keyboard', 'teleop_twist_keyboard'],
            output='screen',
            prefix='gnome-terminal --'
            #prefix='xterm -e'
            )
        ]
    )
728x90