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

rosrun beginner_tutorials listener.py results in no output

asked 2017-12-07 06:56:24 -0600

shivak singh gravatar image

HI All

I'm using ubuntu 16/04 along with python for writing nodes.

I just have few hours experience on ROS.

I pushed rosrun beginner_tutorials listener.py after defining the source but this resulted in no output ust the cursor blinking for few times then stagnant.

I rechecked the CMakeLists.txt but couldn't find any any dependencies in it with reference to tutorials (I'm not sure though)

Sincerely

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
2

answered 2017-12-07 10:43:24 -0600

jayess gravatar image

updated 2017-12-07 19:55:31 -0600

I'm assuming that you're doing the subscriber/publisher tutorial for rospy. Are you running the talker node? The listener node will only do something if there's a node publishing (i.e.,callback functions are only called when they receive data on a topic). Try running both nodes and see what happens.

edit flag offensive delete link more

Comments

To add-on, run another terminal (e.g: control +shift + o) and rosrun beginner_tutorials talker.py

okkewei gravatar image okkewei  ( 2020-10-14 15:12:47 -0600 )edit
2

answered 2017-12-07 11:42:19 -0600

Gayan Brahmanage gravatar image

You need to publish the topic what you have configured for subscribing. If the topic is not being published, your subscriber callback function is not called.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2017-12-07 06:55:29 -0600

Seen: 1,046 times

Last updated: Dec 07 '17