0
$\begingroup$

Rosanswers logo

Hi there, I have the following problem when I try to add more than one path to my ROS_PACKAGE_PATH in my .bashrc. Like this it won't cause any problems

export ROS_PACKAGE_PATH=/home/alonsoj1/ros_workspace/:$ROS_PACKAGE_PATH

but when I try to include more than one, f.i.:

export ROS_PACKAGE_PATH=/home/alonsoj1/ros_workspace/:/home/alonsoj1/ros/

it doesn't work and this is the kind of messages I get when I try to rosmake something:

alonsoj1@aut-228:~/ros_workspace/beginner_tutorials$ rosrun beginner_tutorials talker.py Traceback (most recent call last): File "/home/alonsoj1/ros_workspace/beginner_tutorials/nodes/talker.py", line 2, in import roslib; roslib.load_manifest('beginner_tutorials') File "/opt/ros/electric/ros/core/roslib/src/roslib/launcher.py", line 75, in load_manifest sys.path = prefix + _generate_python_path(package_name, [], os.environ) + sys.path File "/opt/ros/electric/ros/core/roslib/src/roslib/launcher.py", line 131, in _generate_python_path raise roslib.packages.InvalidROSPkgException("While loading package '%s': %s"%(d.package, str(e))) roslib.packages.InvalidROSPkgException: While loading package 'std_msgs': Cannot locate installation of package std_msgs: [rospack] couldn't find package [std_msgs]. ROS_ROOT[/opt/ros/electric/ros] ROS_PACKAGE_PATH[/home/alonsoj1/ros/stacks:/home/alonsoj1/ros_workspace]

Also, when I try to self-complete (with TAB, I mean), I get something like this (FIXED, I had two trailing slashes at the end of the paths, I would have never guessed it would have mattered):

roscd beg[rospack] warning: trailing slash found in ROS_PACKAGE_PATH [rospack] warning: trailing slash found in ROS_PACKAGE_PATH [rosstack] warning: trailing slash found in ROS_PACKAGE_PATH [rosstack] warning: trailing slash found in ROS_PACKAGE_PATH

Any ideas? Thanks!


Originally posted by jlo on ROS Answers with karma: 385 on 2011-10-07

Post score: 0

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

It is important that you keep the original value of ROS_PACKAGE_PATH, i.e. never omit the trailing :$ROS_PACKAGE_PATH when redefining the variable:

export ROS_PACKAGE_PATH=/home/alonsoj1/ros_workspace:/home/alonsoj1/ros:$ROS_PACKAGE_PATH

Also, your paths should not end with a slash, i.e. write /home/alonsoj1/ros instead of /home/alonsoj1/ros**/**


Originally posted by roehling with karma: 1951 on 2011-10-07

This answer was ACCEPTED on the original site

Post score: 7


Original comments

Comment by Lorenzo Riano on 2011-10-07:
Nice, same answer 3 minutes apart!

$\endgroup$
0
$\begingroup$

Rosanswers logo

You should try:

export ROS_PACKAGE_PATH=/home/alonsoj1/ros_workspace:/home/alonsoj1/ros:$ROS_PACKAGE_PATH

this will do it


Originally posted by Lorenzo Riano with karma: 1342 on 2011-10-07

This answer was NOT ACCEPTED on the original site

Post score: 5


Original comments

Comment by Lorenzo Riano on 2011-10-07:
And simultaneous commenting!

Comment by roehling on 2011-10-07:
Seems we have a talent for simultaneous answering. :-)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.