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

How run few node from one package?

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

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 twist_to_motors.py
[rospack] Error: package 'differential_drive' not found

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

edit retag flag offensive close merge delete

Comments

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 -0600 )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 -0600 )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 -0600 )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 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

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

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. http://wiki.ros.org/kinetic/Installat...

Hope it can help you!

edit flag offensive delete link more

Comments

Yes. You right. Thank you very much.

Ruslan-maniak gravatar image Ruslan-maniak  ( 2017-07-24 23:58:38 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 176 times

Last updated: Jul 19 '17