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

roscd and roslaunch problem

asked 2013-07-10 23:03:50 -0500

Albert K gravatar image

updated 2013-07-11 00:18:55 -0500

When I use roscd and roslaunch and press tab, I got the following error msgs:

rospack: error while loading shared libraries: librospack.so: cannot open shared object file: No such file or directory
rosstack: error while loading shared libraries: librospack.so: cannot open shared object file: No such file or directory

the same condition happen when I do roslaunch.

I've already source the setup.bash in my bashrc. But if I source /opt/ros/groovy/setup.bash again manually, everything works fine. I've never met with this problem in other computers. All I need to do is just source the setup.bash in bashrc and then roscd and roslaunch works fine in every new terminal.

My platform is Ubuntu 12.10 , ROS Groovy, and install using apt-get install ros-groovy-desktop-full

edit retag flag offensive close merge delete

Comments

I don't understand : did you add this line in your bashrc before you got the error and your problem is that apparently the sourcing failed or did you add it to your bashrc after, when you noticed it solved your problem (and then your problem is solved) ?

Lucile gravatar image Lucile  ( 2013-07-10 23:59:21 -0500 )edit

I already add this line in my bashrc. And then I try to use roscd and roslaunch, I got the error. But if I source the setup.bash again, it works. In other computer I don't have to source it manually again in every new terminal. I just need to add this line and then roscd and roslaunch work fine.

Albert K gravatar image Albert K  ( 2013-07-11 00:14:15 -0500 )edit

You must have something else in you bashrc file which manipulates the environment or not source the file in the bashrc file correctly. Otherwise there is no rational why sourcing it twice would make a difference.

Dirk Thomas gravatar image Dirk Thomas  ( 2013-07-11 06:25:34 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
8

answered 2013-07-11 00:21:36 -0500

130s gravatar image

updated 2013-07-11 00:24:07 -0500

Make sure that environment variable LD_LIBRARY_PATH contains /opt/ros/groovy/lib (where the related dynamic library files are stored). If not, check all setup scripts you're using to see if LD_LIBRARY_PATH gets overwritten after ROS' setup.bash is called.

edit flag offensive delete link more

Comments

1

Yeah, it's overwritten by other settings! May I ask that what is the purpose of these setup.bash files? I have to source it in /opt/ros/groovy when I install ROS, and when I create a catkin worksapce I have to source the one in devel, and even when I create an overlay workspace I have to source it.

Albert K gravatar image Albert K  ( 2013-07-11 00:52:50 -0500 )edit

That's worth a whole new question (esp. to get better answers than what I could offer).

130s gravatar image 130s  ( 2013-07-17 23:52:03 -0500 )edit
1

In ~/.bashrc I had used export LD_LIBRARY_PATH=/some/path when I should have used export LD_LIBRARY_PATH=/some/path:$LD_LIBRARY_PATH

jacksonkr_ gravatar image jacksonkr_  ( 2016-04-21 09:42:57 -0500 )edit

Question Tools

Stats

Asked: 2013-07-10 23:03:50 -0500

Seen: 9,925 times

Last updated: Jul 11 '13