0
$\begingroup$

Rosanswers logo

Hello,

I am new to ROS and currently I'm following the tutorial of ROS. Everything went smooth till now. I am at tutorial: http://www.ros.org/wiki/ROS/Tutorials/UnderstandingNodes

At about in the middle you have to execute the command rosrun turtlesim turtlesim_node. Which will starte a node called turtlesim, because no other name is provided. Then you have to run rosrun turtlesim turtlesim_node __name:=my_turtle and execute the command rosnode list.

In the tutorial there is a note below the laste command saying

Note: If you still see /turtlesim in the list, it might mean that you don't have $ROS_HOSTNAME environment variable defined as described in Network Setup - Single Machine Configuration.

Now I still see /turtlesim in the list, even after I try to kill it using rosnode kill turtlesim. I however, believe, have the correct settings for Network Setup. After echoing the variables ROS_HOSTNAME (which value is localhost) and ROS_MASTER_URI (which value is http://localhost:11311)

Now can I just ignore this that /turtlesim was still in the list, even when it was closed? Because the ROS_HOSTNAME is definitly set correct.

-edit- maybe this can give some light on the matter at hand?

[22:54|0] $ roscore
... logging to /home/<user>/.ros/log/b4b75b6a-c61a-11e1-ab73-00216b29721e/roslaunch-<user>-29448.log
Checking log directory for disk usage. This may take awhile.
Press Ctrl-C to interrupt
Done checking log file disk usage. Usage is <1GB.

started roslaunch server http://localhost:56819/
ros_comm version 1.8.10

SUMMARY
========

PARAMETERS
 * /rosdistro
 * /rosversion

NODES

auto-starting new master
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[master]: started with pid [29464]
ROS_MASTER_URI=http://localhost:11311/

setting /run_id to b4b75b6a-c61a-11e1-ab73-00216b29721e
Exception AttributeError: AttributeError("'_DummyThread' object has no attribute '_Thread__block'",) in <module 'threading' from '/usr/lib/python2.7/threading.pyc'> ignored
process[rosout-1]: started with pid [29477]
started core service [/rosout]

Originally posted by WG- on ROS Answers with karma: 109 on 2012-07-04

Post score: 7

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

How did you close the turtlesim?

When I did the tutorial I noticed that if I close the turtlesim with Ctrl+C from the console the node still remains open and is listed in 'rosnode list'. If you close the turtlesim by closing the window with the simulation, it properly closes (no more node listed in rosnode).

It could be that the process dies to fast when you use Ctrl+C so it does not perform the cleanup routines. I've seen similar behavior with other nodes as well, when they are killed with Ctrl+C but don't handle that properly.


Originally posted by Felix Kaser with karma: 318 on 2012-07-04

This answer was ACCEPTED on the original site

Post score: 8

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.