Ask Your Question
0

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

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

khansaadbinhasan gravatar image

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

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 imagegvdhoorn ( 2019-10-13 05:07:34 -0600 )edit

1 Answer

Sort by » oldest newest most voted
0

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

gvdhoorn gravatar image

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

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 imagekhansaadbinhasan ( 2019-10-13 05:24:02 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

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

Seen: 81 times

Last updated: Oct 13