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

[build] Error: Unable to find source space `/home/usr/Desktop/src`

asked 2019-10-13 00:09:46 -0500

khansaadbinhasan gravatar image

updated 2019-10-13 00:10:50 -0500

I am trying to build a workspace that is stored in: /home/usr/Desktop/ROS/workspace/, the workspace directory is clean and does not contain any hidden files hence .catkin_tools is not present. It only contains one directory src. I have tried catkin init with empty src directory and by putting a package in src. Here is the output:

Catkin workspace `/home/usr/Desktop` is already initialized. No action taken.
-----------------------------------------------------------
Profile:                     alternate
Extending:        [explicit] /opt/ros/melodic
Workspace:                   /home/usr/Desktop
-----------------------------------------------------------
Build Space:       [missing] /home/usr/Desktop/build
Devel Space:       [missing] /home/usr/Desktop/devel
Install Space:      [unused] /home/usr/Desktop/install
Log Space:         [missing] /home/usr/Desktop/logs
Source Space:      [missing] /home/usr/Desktop/src
DESTDIR:            [unused] None
-----------------------------------------------------------
Devel Space Layout:          linked
Install Space Layout:        None
-----------------------------------------------------------
Additional CMake Args:       None
Additional Make Args:        None
Additional catkin Make Args: None
Internal Make Job Server:    True
Cache Job Environments:      False
-----------------------------------------------------------
Whitelisted Packages:        None
Blacklisted Packages:        None
-----------------------------------------------------------


-----------------------------------------------------------
WARNING: Source space `/home/usr/Desktop/src` does
not yet exist.
-----------------------------------------------------------

What I don't understand is why is catkin looking for workspace in /home/usr/Desktop and not the current directory? The same package is easily built with catkin_make though and I am able to run all the nodes. Also If I put src in /home/usr/Desktop I am able to build successfully.

I am using ROS Melodic on Ubuntu 18.04. I am not sure about the catkin tools version but i installed it from here: https://jbohren-ct.readthedocs.io/en/...

edit retag flag offensive close merge delete

Comments

I am not sure about the catkin tools version but i installed it from here: https://jbohren-ct.readthedocs.io/en/...

Please try to always use the main documentation when using any tools. In this case that would be here:

https://catkin-tools.readthedocs.io/en/latest/index.html

The fact that the link you posted (eventually) leads to an account called: jbohren-forks seems to suggest it is not the main version of the documentation.

gvdhoorn gravatar image gvdhoorn  ( 2019-10-13 05:07:34 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2019-10-13 05:05:38 -0500

gvdhoorn gravatar image

updated 2019-10-13 05:35:46 -0500

the workspace directory is clean and does not contain any hidden files hence .catkin_tools is not present.

No, but:

Workspace:                   /home/usr/Desktop

it's likely there is a .catkin_tools directory in /home/usr/Desktop.

What is the output of ls -al $HOME/Desktop/.catkin_tools?

The rest of the warnings/errors you are getting follow from this. If $HOME/Desktop is the workspace according to catkin_tools, there is no src space (as that would be in $HOME/Desktop/workspace/src).


Edit:

I didn't knew i had it on my desktop, but why should that matter? I can have multiple workspaces, what if desktop is a workspace, I cannot have any other workspace inside it?

Having multiple workspaces is completely supported. But you just can't nest workspaces (ie: workspaces inside other workspaces).

If you want to have multiple workspaces, make them siblings or place them in entirely different directories.

It might also be informative to take a look at wiki/catkin/workspaces. Specifically: workspace overlaying.

edit flag offensive delete link more

Comments

Thanks for the answer. It worked, I didn't knew i had it on my desktop, but why should that matter? I can have multiple workspaces, what if desktop is a workspace, I cannot have any other workspace inside it?

khansaadbinhasan gravatar image khansaadbinhasan  ( 2019-10-13 05:24:02 -0500 )edit

Hello so i am a beginner and have a similar issue, how exactly did u work around it?

catkin build returns an error saying source at home/thimaya/src doesnt exist while im in ~/ws_moveit/ .

My home directory contains catkin_ws , ws_moveit and .catkin_tools .

I probbed into profiles in .catkin_tools and it said source : src

is it not possible to make a the folder in the home directory cuz of catkin_ws ? I tried making one in another partition of mine but i had the same error.

Thanks in advance !

Thimaya gravatar image Thimaya  ( 2020-11-13 14:38:01 -0500 )edit

@Thimaya It has been a long time since I asked that question. From what I remember, I had made my desktop into a workspace and then deleted all files except the hidden .catkin_tools. When I tried to build my workspace nested inside Desktop it gave error.

You should not make your Home into a workspace. What you should do. Press Ctrl+H delete .catkin_tools. Also delete other files and folders created by ROS.

Now make one folder say catkin_ws then follow tutorials to build this workspace and create packages. Also, whenever you run build or make, make sure you are in catkin_ws folder.

khansaadbinhasan gravatar image khansaadbinhasan  ( 2020-11-13 20:43:47 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2019-10-13 00:09:46 -0500

Seen: 6,069 times

Last updated: Oct 13 '19