Ask Your Question

[solved] rosrun beginner_tutorials has no effect

asked 2018-08-12 07:11:22 -0500

loic gravatar image

updated 2018-08-15 13:53:35 -0500

I apply the WritingPublisherSubscriber(python) tutorial page.

I copy/paste the code of (error on wget)

I execute

$ catkin_make

roscore is runing

Then I execute

$ rosrun --debug beginner_tutorials
[rosrun] Looking in catkin libexec dirs: /home/pi/catkin_ws/devel/share/beginner_tutorials
[rosrun] Looking in rospack dir: /home/pi/catkin_ws/src/beginner_tutorials
[rosrun] Searching for with permissions /111
[rosrun] Running /home/pi/catkin_ws/src/beginner_tutorials/scripts/

Not more output. After 1 sec or less, I return to the prompt. Nothing in rqt_console.

Could anyone help me?

edit retag flag offensive close merge delete


Two questions:

1 - after catkin_make did you source the setup file("source devel/setup.bash")?

2 - Did you restart roscore after catkin_make?

billy gravatar image billy  ( 2018-08-12 13:37:53 -0500 )edit

Thanks for questions. 1. Not before your question. Yes now. Without more result. 2. Yes.

loic gravatar image loic  ( 2018-08-12 13:56:54 -0500 )edit

Did you try "rostopic list" to see if the talker is talking?

billy gravatar image billy  ( 2018-08-12 15:06:38 -0500 )edit

Thanks. If I start, I have:

$ rostopic list

Good. Next step :

$ rostopic type /chatter 
$ rostopic hz /chatter 
subscribed to [/chatter]
no new messages
no new messages
loic gravatar image loic  ( 2018-08-13 15:02:46 -0500 )edit

If I run only and not, I have:

$ rostopic list -v

Published topics:
 * /rosout_agg [rosgraph_msgs/Log] 1 publisher

Subscribed topics:
 * /rosout [rosgraph_msgs/Log] 1 subscriber
loic gravatar image loic  ( 2018-08-13 15:19:18 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2018-08-15 13:51:17 -0500

loic gravatar image

I have found the issue.

It was a problem of indentation in the script (the conditional part of script was put in the def part.)

Thanks to the helpers.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2018-08-12 06:20:42 -0500

Seen: 483 times

Last updated: Aug 15 '18