Ask Your Question
2

Why can't roslaunch or rosrun find my executable?

asked 2014-04-17 15:17:24 -0500

blakeh gravatar image

I'm trying to build a little package which sends commands from the keyboard to turtlesim. The examples are rosbuild based and I'm trying to do it in hydro/catkin.

I've got it building and putting a binary in catkin_ws/install/lib/PROJECTNAME/ How do I specify in the .launch file that ROS should look in /install/lib/PROJECTNAME ?? If I copy the binary from /build/PROJECTNAME to /src/PROJECTNAME it runs. Should I just copy it over every time? There must be a better way!

Thanks

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2014-04-18 01:54:47 -0500

demmeln gravatar image

updated 2014-04-18 04:02:52 -0500

Have you sourced the install space of your workspace before trying to launch the node? In general it should be working exactly as you want it to: No manual moving of files required.

PS: When you say "I've got it building and putting a binary in catkin_ws/install/lib/PROJECTNAME/ ", you are not moving that binary manualy, but with catkin_make install, right?

Edit: There are two different things. For one, you need source /opt/ros/hydro/setup.bash before building your workspace with catkin_make. You do that in your .bashrc and that is ok.

After you built your package, you need to source the install or devel space of your workspace in order to use it. It is best that you have two terminal. One to build, and one to rosrun/roslaunch.

So after building your package, open a new terminal and execute source catkin_ws/install/setup.bash. Now in this terminal, rosrun/roslaunch should be able to find the node you compiled.

PS2: It is best to update your question with more details (use the "edit" function) rather than posting answers that do not actually answer your question.

edit flag offensive delete link more

Comments

Many thanks for the newbie hand holding!!

blakeh gravatar imageblakeh ( 2014-04-18 04:44:11 -0500 )edit

However, that procedure didn't work: `~/Projects/Ros/catkin_ws$ !roslaunch roslaunch turtle_fsm turtle_fsm.launch [turtle_fsm.launch] is neither a launch file in package [turtle_fsm] nor is [turtle_fsm] a launch file name ` (my package name is `turtle_fsm')

blakeh gravatar imageblakeh ( 2014-04-18 04:46:24 -0500 )edit

did you execute this in the shell after `source ~/Projects/Ros/catkin_ws/install/setup.bash`? Does the file `turtle_fsm.launch` exist inside your package?

demmeln gravatar imagedemmeln ( 2014-04-18 07:14:54 -0500 )edit

Thanks I'll try that.

blakeh gravatar imageblakeh ( 2014-04-22 06:15:11 -0500 )edit
0

answered 2014-04-18 03:53:43 -0500

blakeh gravatar image

Thanks for answer!

I'm pretty new so I guess I need the specific command for your first suggestion. I have sourced the /opt/ros/.../.bashrc in my own ~/.bashrc.

Yes, i built the package with catkin_make install. (I didn't use --, OK?)

Blake

edit flag offensive delete link more

Comments

1

Hey Blake, I can tell you're still getting used to this style forum. It technically looks like this comment is an answer to your question when you really meant to comment on @demmein's post. I strongly recommend that you copy this content and paste it as a comment to his answer. Best!

jacksonkr_ gravatar imagejacksonkr_ ( 2016-04-22 10:29:57 -0500 )edit

Your Answer

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

Add Answer

Question Tools

1 follower

Stats

Asked: 2014-04-17 15:17:24 -0500

Seen: 10,067 times

Last updated: Apr 18 '14