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

Cannot find workspace??

asked 2015-02-16 09:32:09 -0500

215 gravatar image

updated 2015-02-16 09:58:00 -0500

I tried writing the simple publisher and subscriber using the tutorial, but seem to have some problem finding the workspace and packages using ros... I've source it like a million times.. and I still can't find it...

what am I doing wrong?? Workspace uploaded here:

edit retag flag offensive close merge delete


Can you cd to the directory of your ros-project (which is located in path/catkin_ws/src/) and try and launch the file from within it. If not to go to the location of the launch file of your project and do:$ roslaunch project.launch

gpldecha gravatar image gpldecha  ( 2015-02-16 10:32:06 -0500 )edit

To confirm that your workspace is successfully sourced you can run just "roscd". you should end up in the workspace/devel folder. To update the list of packages you need to run "rospack profile" Please refer to this answer for more detail

marguedas gravatar image marguedas  ( 2015-02-16 22:21:13 -0500 )edit

I am able to cd it, but there is no launch file.
Roscd doesn't show the ws.

215 gravatar image 215  ( 2015-02-18 05:24:21 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2015-02-18 08:56:11 -0500

marguedas gravatar image

I downloaded your workspace. It seems that some things haven't been initialized properly. If I source it and type roscd I end up in pubsub_ws/devel. But I cannot roscd the packages. Can you run the following ?
cd ~/pubsub_ws
rm -rf build/ devel/ install/ src/CMakeLists.txt
cd src catkin_init_workspace
source devel/setup.bash rospack profile
roscd commands

Explaination : When I ran rospack profile I never saw yiur workspace showing in the list. So your packages were never in the $ROS_PACKAGE_PATH. To fix it you need to reinitialize your workspace. then rebuild it and update your package list (the list of commands above).Then everything should be working.

edit flag offensive delete link more


I keep getting these error when i create a new workspace I can't see what I am doing wrong.. Usually when i create a workspace i do this..

I then add my .cpp files in src directory and run catkin_make and then should rosrun be able run.. which is not the case..

215 gravatar image 215  ( 2015-02-18 10:18:26 -0500 )edit

you still cannot roscd your workspace ? can you post the output of all the commands above ? and output of pwd after running "roscd" alone ?

marguedas gravatar image marguedas  ( 2015-02-18 11:45:48 -0500 )edit

no errors occurs... why can't i run rosrun....

215 gravatar image 215  ( 2015-02-19 05:40:24 -0500 )edit

If you don't give more info we can't help you... What do you mean by no error ? can you post the output of all the commands above ? and output of pwd after running "roscd" alone ?

marguedas gravatar image marguedas  ( 2015-02-19 10:43:43 -0500 )edit

roscd cannot find it

215 gravatar image 215  ( 2015-02-19 11:00:27 -0500 )edit

Can you paste the output of: "rospack profile"
and "roscd" ?

marguedas gravatar image marguedas  ( 2015-02-19 13:41:31 -0500 )edit

Question Tools

1 follower


Asked: 2015-02-16 09:32:09 -0500

Seen: 2,903 times

Last updated: Feb 18 '15