Robotics StackExchange | Archived questions

Having constant problems with roscd

Every time I restart bash or my computer, there is a good chance I need to screw around with environmental variables for 30 minutes before I can get anything to work. I don't really understand what to do, or how to get the fix to "stick". Is it possible for ROS to just work when I start up bash, or do I need to run source and change ROSPACKAGEPATH and ROSWORKSPACEPATH every time and mess with setup.bash every time? I feel like I'm accumulating damage every time I'm forced to screw with all of this stuff without really understanding it, just to proceed with the tutorials.

For example, right now I cannot roscd to rospytutorials. I can roscd to my own stuff, but not to rospytutorials. How can I fix this?

dan@beepboopROS:~/ros_workspace/beginner_tutorials$ roscd rospy_tutorials
roscd: No such package/stack 'rospy_tutorials'

Asked by DanielPBak on 2016-11-18 13:41:41 UTC

Comments

This sounds like something fishy is going on with your workspace: can you tell us how you've created it, which commands you use to source it, etc?

Normal workflow would be to source the distro setup.bash, create ws, build it, source devel/setup.bash and you're done. The last bit ..

Asked by gvdhoorn on 2016-11-18 13:49:52 UTC

.. can be added to your ~/.bashrc if you'd like, meaning that every terminal you start automatically has your workspace sourced. But that doesn't scale too well if you have multiple workspaces.

Asked by gvdhoorn on 2016-11-18 13:50:29 UTC

Answers