Having constant problems with roscd

asked 2016-11-18 12:41:41 -0500

DanielPBak gravatar image

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 ROS_PACKAGE_PATH and ROS_WORKSPACE_PATH 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 rospy_tutorials. I can roscd to my own stuff, but not to rospy_tutorials. How can I fix this?

dan@beepboopROS:~/ros_workspace/beginner_tutorials$ roscd rospy_tutorials
roscd: No such package/stack 'rospy_tutorials'
edit retag flag offensive close merge delete

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

gvdhoorn gravatar image gvdhoorn  ( 2016-11-18 12:49:52 -0500 )edit

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

gvdhoorn gravatar image gvdhoorn  ( 2016-11-18 12:50:29 -0500 )edit