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

catkin clean does not clean cache for extend

asked 2018-08-27 11:07:09 -0500

Metalzero2 gravatar image

updated 2022-01-31 08:52:10 -0500

lucasw gravatar image

Hello all.

I'm on Ubuntu 18.04, running ROS Melodic.

Here is what I did:

In the terminal, I go to the location of my working space, where my current project, let us call it myRosProject, is located. I then build it with the command:

catkin build myRosProject

after it is completed successfully, I run the command:

catkin config

I get the following warning:

WARNING: Your current environment's CMAKE_PREFIX_PATH is different from the cached CMAKE_PREFIX_PATH used the last time this workspace was built.

If you want to use a different CMAKE_PREFIX_PATH you should call catkin clean to remove all references to the previous CMAKE_PREFIX_PATH.

Indeed. The output of catkin config, in the field Extending, is different from what is in my system variable $CMAKE_PREFIX_PATH. I should note here, that after Extending there is in green letters the text [cached].

I then proceed to run catkin clean. After that, I build my project again (with the same command as above) and everything is done correctly. However, when I run catkin config again, I get the same warning.

So it seems that catkin clean did not do anything. I want my project to use the content of $CMAKE_PREFIX_PATH in the Extending field but I can't make it work. It continues to get the path from some cached memory, which I have no idea where it is located. Any ideas?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2018-08-28 03:38:06 -0500

gvdhoorn gravatar image

updated 2018-08-28 03:56:55 -0500

I'm not entirely sure, but there is no "cache for extend" in catkin_tools.

That setting is part of the currently active profile, and is not affected by catkin clean. You'll have to change that using catkin config --no-extend (if you no longer wish to extend another workspace) or catkin config --extend /path/to/the/workspace/to/extend (if you wish to extend a different workspace).

So it seems that catkin clean did not do anything.

I believe catkin clean did exactly what it was supposed to do, but you seem to want it to do something else.

I want my project to use the content of $CMAKE_PREFIX_PATH in the Extending field but I can't make it work. It continues to get the path from some cached memory, which I have no idea where it is located. Any ideas?

If you can't do what you are after using catkin config --extend .. (to update the setting) then please clarify with some more detail what it is you want to do and perhaps we can help you.


Edit:

I want to extend my work space to more the just one other.

That is specifically not supported (at least, not in the way you are trying to do it).

When ever I used catkin config --extend ... I was able to only extend it to one other work space.

Yes, that is expected.

For that reason, I was trying to use the $CMAKE_PREFIX_PATH variable, which included multiple work spaces.

I'm not sure that will work, but note that to extend multiple workspaces, you'll have to layer them on-top of each other. You may already be familiar with it, but the technique is called workspace overlaying.

Workspace C overlays workspace B, which overlays workspace A. The union of all pkgs in workspaces A, B and C will be available after sourcing workspace C's setup.bash.

edit flag offensive delete link more

Comments

@gvdhoorn I want to extend my work space to more the just one other. When ever I used catkin config --extend ... I was able to only extend it to one other work space. For that reason, I was trying to use the $CMAKE_PREFIX_PATH variable, which included multiple work spaces.

Metalzero2 gravatar image Metalzero2  ( 2018-08-28 03:54:06 -0500 )edit

@gvdhoorn The reason I tried to use $CMAKE_PREFIX_PATH variable to extend to multiple work-spaces is because I read it in the catkin documentation. Am I not understanding it correctly?

Metalzero2 gravatar image Metalzero2  ( 2018-08-28 05:27:11 -0500 )edit

If I interprete the docs correctly, it merely explains that --extend allows you to get catkin to ignore whatever the contents is of CMAKE_PREFIX_PATH or to override it with whatever you set --extend to. Passing CMAKE_PREFIX_PATH to --extend is not something I see documented there.

gvdhoorn gravatar image gvdhoorn  ( 2018-08-28 05:34:17 -0500 )edit

Perhaps you can more clearly describe what you want to do, as I don't fully understand why regular workspace chaining / overlaying wouldn't work there.

gvdhoorn gravatar image gvdhoorn  ( 2018-08-28 05:34:51 -0500 )edit

@gvdhoorn I did not really try to do overlaying. I had 3 work spaces and wanted to have packages from these, to call each other. My understanding now is you can't just do it like that, with out applying chaining/overlaying.

Metalzero2 gravatar image Metalzero2  ( 2018-08-31 09:53:34 -0500 )edit

@gvdhoorn I ended up just moving everything that I needed, in one work space. This makes sense because before I had some name conflicts as well. Thanks for helping me clear up things in my head.

Metalzero2 gravatar image Metalzero2  ( 2018-08-31 09:55:00 -0500 )edit

Question Tools

2 followers

Stats

Asked: 2018-08-27 11:07:09 -0500

Seen: 4,740 times

Last updated: Aug 28 '18