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

Using roslaunch with gdb gives error 'tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device'

asked 2012-11-11 22:38:59 -0500

Benoit Larochelle gravatar image

I'm trying to debug my node with gdb but I consistently get two errors, and I don't know if they are related.

First of all, I added launch-prefix="gdb -ex run --args" to my node as instructed in the tutorial.

Now, when I launch my node, I get this error about 30 times during the initialization phase: tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device.

Also, when I try to close the node, it stops a few threads but seems to hang and not stop the other threads. I do not normally have threading problems.

Are these problems related? I know that the error that I got was reported with Gazebo in the past, but here it has nothing to do with it.

edit retag flag offensive close merge delete

Comments

I'm not quite sure why you are getting the tcsetpgrp errors but maybe the terminal roslaunch provides does not support all features gdb wants.

Lorenz gravatar image Lorenz  ( 2012-11-12 00:20:35 -0500 )edit

I used this option: `launch-prefix="gdb --args" ` to launch gdb in my terminal however I got the same error: [tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device] each time I hit or continue from a break point.

yuquan gravatar image yuquan  ( 2013-01-21 02:47:55 -0500 )edit

Hello All,

I have the same problem... launch file is below (followed as above and changed the launch_prefix):

<launch>

<arg name="debug" default="false"/> <arg unless="$(arg debug)" name="launch_prefix" value=""/> <arg if="$(arg debug)" name="launch_prefix" value="xterm -e gdb --args"/>

<arg name="config" default="false"/> <arg unless="$(arg config)" name="command_args" value=""/> <arg if="$(arg config)" name="command_args" value="-d $(find inmoov6_moveit_config)/launch/moveit.rviz"/>

<node name="$(anon rviz)" launch-prefix="$(arg launch_prefix)" pkg="rviz" type="rviz" respawn="false" args="$(arg command_args)" output="screen"> <rosparam command="load" file="$(find inmoov6_moveit_config)/config/kinematics.yaml"/> </node>

</launch>

but I still get the same error message: tcsetpgrp failed in terminal_inferior: Inappropriate ioctl for device

Please advice on what I need to do specifically? to resolve it,

bot777 gravatar image bot777  ( 2021-09-19 02:07:33 -0500 )edit

2 Answers

Sort by ยป oldest newest most voted
3

answered 2014-07-07 10:03:22 -0500

Benny gravatar image
edit flag offensive delete link more
3

answered 2015-09-27 15:01:53 -0500

Faced same thing. But I just did launch-prefix="xterm -e gdb --args" instead of launch-prefix="gdb -ex run --args". The former opens gdb in a different xterm window, and you can type in "run". That worked for me

edit flag offensive delete link more

Comments

Thank you! This works.

curi_ROS gravatar image curi_ROS  ( 2019-01-30 06:55:37 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2012-11-11 22:38:59 -0500

Seen: 8,780 times

Last updated: Sep 27 '15