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

How to change $ROS_PACKAGE_PATH [closed]

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

xHenrYx14 gravatar image

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

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 reopen merge delete

Closed for the following reason question is not relevant or outdated by allenh1
close date 2015-06-25 12:20:25.248037

3 Answers

Sort by ยป oldest newest most voted
5

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

allenh1 gravatar image

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

Lorenz gravatar image

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

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 gravatar image Atom  ( 2012-03-27 09:23:26 -0600 )edit
0

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

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 gravatar image xHenrYx14  ( 2012-04-06 12:43:28 -0600 )edit

Question Tools

1 follower

Stats

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

Seen: 22,223 times

Last updated: Apr 05 '12