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

Node not found after being initialized

asked 2018-05-15 22:19:44 -0600

updated 2018-05-16 00:45:38 -0600

I run this code below with a python interpreter. Then I type rosnode list from terminal. But I cannot see the node "hello". I only see "/rosout". Why?

import rospy
rospy.init_node("hello")
edit retag flag offensive close merge delete

Comments

What do you see?

jayess gravatar image jayess  ( 2018-05-15 23:35:11 -0600 )edit

I only see "/rosout" in the list.

Zhoulai Fu gravatar image Zhoulai Fu  ( 2018-05-16 00:46:20 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-05-16 02:24:45 -0600

updated 2018-05-18 02:17:50 -0600

I figured it out.

The node is created. Then it disappears because the node program terminates. I should have put rospy.spin() at the end of the program.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-05-15 22:19:44 -0600

Seen: 562 times

Last updated: May 18 '18