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

ROS subscriber example (C++)

asked 2015-12-26 08:36:21 -0500

Terry Su gravatar image

Hello every ROS users,

I followed the example as following link : Writing a Simple Publisher and Subscriber (C++)

But it not works when I type the command "rosrun beginner_tutorials", and it shows the message as this:

rosrun will locate PACKAGE and try to find
an executable named EXECUTABLE in the PACKAGE tree.
If it finds it, it will run it with ARGS.
Does someone know the problem? I would be thankful that anyone can help me. Thank you very much.

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2015-12-26 14:17:03 -0500

ahendrix gravatar image

The next tutorial in that sequence describes how to use rosrun to run the executable you're created: http://wiki.ros.org/ROS/Tutorials/Exa...

edit flag offensive delete link more

Comments

Thank you so much!

Terry Su gravatar image Terry Su  ( 2015-12-27 03:46:19 -0500 )edit
1

answered 2015-12-26 09:52:23 -0500

kramer gravatar image

The command is:

rosrun <PACKAGE> <EXECUTABLE> [ARGS]
where angle and square brackets indicate required and optional items, respectively. According to what you've written, you've only done:
rosrun <PACKAGE>
and are missing the executable. You should be able to "tab-complete" (hit the TAB key twice in rapid succession) to get a list of valid executables.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2015-12-26 08:36:21 -0500

Seen: 365 times

Last updated: Dec 26 '15