Ask Your Question

How run few node from one package?

asked 2017-07-18 03:51:33 -0500

Ruslan-maniak gravatar image

Hi. I installed diferential_drive package. One node from this package run well. But if i running another one node from this package, ROS don't found this package.

$ rosrun differential_drive
[rospack] Error: package 'differential_drive' not found

How can I run few node frome one package? Thanks.

edit retag flag offensive close merge delete


Are you make sure you've have sourced the workspace setup.bash file? Maybe, you're trying to run it in another terminal that you didn't execute e.g: source ~/catkin_ws/setup.bash

marcoarruda gravatar image marcoarruda  ( 2017-07-18 08:06:43 -0500 )edit

Yes, i'm sure. I did source ~/catkin_ws/setup.bash. First node run is well. But after if i do "rospack list", then list no have differential_drive. If no one node is run from this package, rospack list have differential_drive. Why package is gone when i run node? Sorry for my English )

Ruslan-maniak gravatar image Ruslan-maniak  ( 2017-07-18 22:46:06 -0500 )edit

I try do "source ~/catkin_ws/devel/setup.bash" before every rosrun node from package in every terminal. And it's work. So that is right using?

Ruslan-maniak gravatar image Ruslan-maniak  ( 2017-07-18 23:10:06 -0500 )edit

Exactly! That's the way you have to use ROS. You should source the workspace devel/setup.bash file manually or in your .bashrc file. :)

marcoarruda gravatar image marcoarruda  ( 2017-07-24 21:58:07 -0500 )edit

1 Answer

Sort by » oldest newest most voted

answered 2017-07-19 09:02:28 -0500

So, if the "source ~/catkin_ws/devel/setup.bash" worked, that's because you didn't add it to your .bashrc file.

The ~/.bashrc file is "sourced" every time you open a new terminal. If you prefer, you can execute "source ~/catkin_ws/devel/setup.bash" for each terminal. But if you want to save some time, just write this command at the end of this .bashrc file.

Take a look again in the installation page, you'll see an explanation about this.

It's the Environment Setup section.

Hope it can help you!

edit flag offensive delete link more


Yes. You right. Thank you very much.

Ruslan-maniak gravatar image Ruslan-maniak  ( 2017-07-24 23:58:38 -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


Asked: 2017-07-18 03:51:33 -0500

Seen: 79 times

Last updated: Jul 19 '17