0
$\begingroup$

Rosanswers logo

I followed the Tutorials and built a talker.cpp and listener.cpp

http://wiki.ros.org/cn/ROS/Tutorials/WritingPublisherSubscriber%28c%2B%2B%29

but when i run the command:$ rosrun beginner_tutorials talker, the output likes that:

[ INFO] [1446193944.614306315]: hello world 0
[ INFO] [1446193944.714341871]: hello world 1
[ INFO] [1446193944.814325116]: hello world 2
[ INFO] [1446193944.914325682]: hello world 3
[ INFO] [1446193945.014323803]: hello world 4
[ INFO] [1446193945.114317734]: hello world 5
[ INFO] [1446193945.214318579]: hello world 6
[ INFO] [1446193945.314322916]: hello world 7
[ INFO] [1446193945.414319291]: hello world 8
[ INFO] [1446193945.514289057]: hello world 9
[ INFO] [1446193945.614313089]: hello world 10
[ INFO] [1446193945.714288023]: hello world 11
[ INFO] [1446193945.814288449]: hello world 12
[ INFO] [1446193945.914288596]: hello world 13
[ INFO] [1446193946.014314654]: hello world 14
[ INFO] [1446193946.114281486]: hello world 15
[ INFO] [1446193946.214334433]: hello world 16
[ INFO] [1446193946.314335348]: hello world 17
[ INFO] [1446193946.414329558]: hello world 18
[ INFO] [1446193946.514324047]: hello world 19
[ INFO] [1446193946.614327756]: hello world 20
[ INFO] [1446193946.714328811]: hello world 21
[ INFO] [1446193946.814324557]: hello world 22
[ INFO] [1446193946.914328894]: hello world 23
[ INFO] [1446193947.014327924]: hello world 24
[ INFO] [1446193947.114329677]: hello world 25
[ INFO] [1446193947.214324585]: hello world 26
[ INFO] [1446193947.314323614]: hello world 27
[ INFO] [1446193947.414327044]: hello world 28
[ INFO] [1446193947.514330682]: hello world 29
[ INFO] [1446193947.614354505]: hello world 30
[ INFO] [1446193947.714330766]: hello world 31
[ INFO] [1446193947.814328468]: hello world 32
[ INFO] [1446193947.914337625]: hello world 33
[ INFO] [1446193948.014337632]: hello world 34 

and continue...not until i pressed ctrl+c did it stop.

i want know why and how to solve it.thank you very much.


Originally posted by xuao on ROS Answers with karma: 5 on 2015-10-30

Post score: 0


Original comments

Comment by Akif on 2015-10-30:
Your code is working as it is supposed to.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

i want know why and how to solve it.thank you very much.

As far as I can tell, that is normal output for that tutorial: it has two nodes talker and listener. talker sends out strings of the form hello world N (with N a positive integer). listener (which you didn't start I believe), receives those messages and would print I heard: [Hello world N] (with N a positive integer).

Do you feel something else should happen?


Originally posted by gvdhoorn with karma: 86574 on 2015-10-30

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by xuao on 2015-10-30:
hahaha, i got it.Maybe i misunderstood it before, thank you for your explanation.

Comment by gvdhoorn on 2015-10-30:
No problem. Glad I could help.

$\endgroup$

Your Answer

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