Ask Your Question
2

How to change $ROS_PACKAGE_PATH

asked 2012-03-27 08:33:53 -0500

xHenrYx14 gravatar image

updated 2014-01-28 17:11:45 -0500

ngrennan gravatar image

Hi, there.. I'm new using ROS and I'm doing the tutorial for creating a package (http://www.ros.org/wiki/ROS/Tutorials/CreatingPackage). I tried to do "roscreate-pkg" and I got this

 jesus@ubuntu:~/ros_workspace$ roscreate-pkg prueba1
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
WARNING: current working directory is not on ROS_PACKAGE_PATH!
Please update your ROS_PACKAGE_PATH environment variable.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Created package directory /home/jesus/ros_workspace/prueba1
Created package file /home/jesus/ros_workspace/prueba1/Makefile
Created package file /home/jesus/ros_workspace/prueba1/manifest.xml
Created package file /home/jesus/ros_workspace/prueba1/CMakeLists.txt
Created package file /home/jesus/ros_workspace/prueba1/mainpage.dox

Please edit prueba1/manifest.xml and mainpage.dox to finish creating your package
jesus@ubuntu:~/ros_workspace$ echo $ROS_PACKAGE_PATH
/opt/ros/electric/stacks

So I realized that my path is placed in root and I want to move it to "/home/jesus/ros_workspace" How can I do this? Thanks

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
4

answered 2012-03-27 13:13:47 -0500

Add this line to your ~/.bashrc directly under the call to /opt/ros/distro/setup.bash:

export ROS_PACKAGE_PATH=~/ros_workspace:${ROS_PACKAGE_PATH}
edit flag offensive delete link more
2

answered 2012-03-27 09:14:31 -0500

Lorenz gravatar image

updated 2012-03-27 09:18:59 -0500

The best way to change ROS_PACKAGE_PATH is to create an overlay. See this answer (still for diamondback). For electric, just replace all occurrences of diamondback with electric. Also, you can skip the roslocate step at the end since you don't want to install bosch_drivers.

edit flag offensive delete link more

Comments

Thanks Lorenz ..

Atom ( 2012-03-27 09:23:26 -0500 )edit
0

answered 2012-04-05 10:20:03 -0500

xHenrYx14 gravatar image

Lorenz I created the overlay but I still have the same warning, the only difference is that now my folder ~/ros_workspace has a setup.bash, setup.sh and setup.zsh, and I replaced source /opt/ros/electric/setup.bash for source ~/ros_workspace/setup.bash thanks for the answers!!

edit flag offensive delete link more

Comments

I did what allenh1 said and now the $ROS_PACKAGE_PATH variable changed and I've no more warnings, thanks!

xHenrYx14 ( 2012-04-06 12:43:28 -0500 )edit

Your Answer

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

Add Answer

[hide preview]

Question Tools

Follow
1 follower

Stats

Asked: 2012-03-27 08:33:53 -0500

Seen: 6,643 times

Last updated: Apr 05 '12