ctrl-c wont shutdown python talker.py node when run with sudo

asked 2016-03-20 00:33:55 -0600

ryanhowarth gravatar image

Using a Raspberry Pi 2 with Ubuntu 14.04, I can't stop the talker.py example python node) with ctrl-c when run with sudo. This is terminal output when I press ctrl-c. It appears that the node will stop but just keeps on looping.

[INFO] [WallTime: 1458450996.047358] hello world 1458450996.05
[INFO] [WallTime: 1458450997.047340] hello world 1458450997.05
[INFO] [WallTime: 1458450998.047373] hello world 1458450998.05
^C[talker-2] killing on exit
[rosout-1] killing on exit
[master] killing on exit
shutting down processing monitor...
... shutting down processing monitor complete
done
ubuntu@ubuntu:~/catkin_ws$ [INFO] [WallTime: 1458450999.047300] hello world 1458450999.05
[INFO] [WallTime: 1458451000.047296] hello world 1458451000.05
[INFO] [WallTime: 1458451001.047229] hello world 1458451001.05
The process will stop cleanly if I run.
rosnode kill talker
The node is started with a simple launch file.
    <node name="talker" pkg="rasp_pi_test" type="talker.py" output="screen" launch-prefix="sudo -E"/>

Obviously, this example does not need to be run with sudo. A more complicated example with the same problem that involves fast gpio access does need to be run with sudo. Any help is greatly appreciated.

edit retag flag offensive close merge delete

Comments

Hi ryanhowarth, just add required="true" in your tag.

Akhilesh gravatar image Akhilesh  ( 2016-12-28 01:17:31 -0600 )edit

I have the same problem as ryanhowarth and adding the tag required didn't seems to solve the problem

GuillaumeB gravatar image GuillaumeB  ( 2018-06-17 15:10:58 -0600 )edit