ros / ros_tutorials

Code used in tutorials found on ROS wiki
http://wiki.ros.org/ros_tutorials
805 stars 540 forks source link

[ros2 turtlesim] SIGINT signal on parent not terminated Turtlesim GUI application #160

Open ionutnechita-intel opened 10 months ago

ionutnechita-intel commented 10 months ago

Bug report

SIGINT signal on parent not terminated Turtlesim GUI application

Required Info:

Steps to reproduce issue

Execute command:

  1. Execute in terminal: " ros2 run turtlesim turtlesim_node & "
  2. Search parent process ID(PID).
  3. Send SIGINT(2) signal turtlesim_node parent process ID to terminate application.

Expected behavior

No error on output terminal. GUI Application is stopped completly.

Actual behavior

Application is not stopped.

Turtlesim version:

dpkg -l | grep turtlesim ii ros-humble-turtlesim 1.4.2-1jammy.20231117.205321 amd64 turtlesim is a tool made for teaching ROS and ROS packages.

ros2 run turtlesim turtlesim_node &
[1] 34134
$ [INFO] [1701706328.680594516] [turtlesim]: Starting turtlesim with node name /turtlesim
   [INFO] [1701706328.682257037] [turtlesim]: Spawning turtle [turtle1] at x=[5,544445], y=[5,544445], theta=[0,000000]

kill -2 34134

34134  0.0  0.1  29232 17288 pts/0    S    18:12   0:00 /usr/bin/python3 /opt/ros/humble/bin/ros2 run turtlesim turtlesim_node
34440  0.0  0.0  12084  2544 pts/1    S+   18:13   0:00 grep --color=auto 34134

Turtlesim GUI application is not stopped.

34134  0.0  0.1  29232 17288 pts/0    S    18:12   0:00 /usr/bin/python3 /opt/ros/humble/bin/ros2 run turtlesim turtlesim_node
34135  0.7  0.6 615320 98808 pts/0    Sl   18:12   0:01 /opt/ros/humble/lib/turtlesim/turtlesim_node
34442  0.0  0.0  12084  2616 pts/1    S+   18:15   0:00 grep --color=auto ros

When using: kill -2 -34134, application is terminated. But i used minus on parent ID. And this is not correctly.