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

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: https://www.dropbox.com/s/ip6qm3lc40v...

edit retag flag offensive close merge delete

Comments

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
1

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
0

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

Comments

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

http://pastebin.com/2dPnwmhv

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"
"echo $ROS_PACKAGE_PATH"
and "roscd" ?
Please

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

Question Tools

1 follower

Stats

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

Seen: 2,902 times

Last updated: Feb 18 '15