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

catkin only generates setup files every other build

asked 2020-07-08 23:33:29 -0600

Rufus gravatar image

updated 2020-07-13 03:23:42 -0600

For some reason, catkin build does not always generate the various setup.sh files when I run it.

Running catkin build once, the contents of the devel directory is as follows:

cmake.lock  etc  include  lib  share

Running catkin build again:

cmake.lock  include           local_setup.sh   setup.sh        share
env.sh      lib               local_setup.zsh  _setup_util.py
etc         local_setup.bash  setup.bash       setup.zsh

Running catkin build yet again:

cmake.lock  etc  include  lib  share

Why is this happening?

I am using catkin_tools 0.6.1 with ROS melodic.

Edit 2 (SSCCE)

  1. Create and cd to an empty directory
  2. catkin config -s .
  3. catkin build
  4. ls devel, observe that various setup files are created
  5. catkin build again
  6. ls devel, observe that setup files are gone

Running the following seems to solve the issue

  1. rm -r .catkin_tools
  2. mkdir src
  3. catkin build
  4. ls devel, observe that various setup files are created
  5. catkin build again
  6. ls devel, setup files are still present
edit retag flag offensive close merge delete

Comments

What versions do you experience this with? Can you reproduce this on another system/workspace?

mgruhler gravatar image mgruhler  ( 2020-07-09 03:20:10 -0600 )edit

@mgruhler This is happening on ros melodic, it's happening on multiple PCs and multiple workspaces

Rufus gravatar image Rufus  ( 2020-07-12 23:14:22 -0600 )edit

@Rufus I meant what versions of catkin-tools. run apt-cache policy <PKG> or apt-cache madison <PKG> for all relevant packages. Or specify the commit version if cloned from source.

I'm assuming you don't have any build errors when running catkin build and that everything is set up correctly.

As this is something very basic, I'm assuming it has something to do with your particular setup rather than with the package itself. Would be interesting to see if you can reproduce this with an empty workspace and only extending /opt/ros/melodic....

If this is actually reproducible with a vanilla OS, vanilla ROS install, vanilla from-apt catkin-tools, you should probably file a bug on github (and link to/from this Q&A).

mgruhler gravatar image mgruhler  ( 2020-07-13 01:58:26 -0600 )edit

@mgruhler i'm using catkin_tools 0.6.1. There are no build errors.

Rufus gravatar image Rufus  ( 2020-07-13 02:18:05 -0600 )edit

@Rufus, I cannot reproduce this. I guess you'd need to create an SSCCE with which reproducing this is possible. If you can reproduce this over multiple machines and workspaces, you need to find the smallest common set of packages/whatever that leads to this.

Also, please confirm that this issue is also present with an empty workspace!

mgruhler gravatar image mgruhler  ( 2020-07-13 02:40:37 -0600 )edit

@mgruhler The problem does not appear with a blank newly created workspace.

However, when I CATKIN_IGNORE all the packages in my workspace, the problem still occurs. I updated the question with the output of the build when the problem occurs

Rufus gravatar image Rufus  ( 2020-07-13 02:46:41 -0600 )edit

Have you tried cleaning the workspace?

mgruhler gravatar image mgruhler  ( 2020-07-13 02:50:59 -0600 )edit

@Rufus good find. I can reproduce this now. Seems there is an issue if the config is generated in the source directory. This is something that could be expected behavior (i.e. the config should not be in the source directory). But with this find, I'd suggest you post this as a bug on github.

If I understand you correctly, you've fixed your issue by adding the src subdirectory. It might make sense to add this as an answer here and mark it as answered (or close the question). thank you.

mgruhler gravatar image mgruhler  ( 2020-07-13 03:27:28 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2020-07-13 03:53:27 -0600

Rufus gravatar image

It seems to be an issue with using catkin in a workspace without a src directory (i.e. configured with catkin config -s). Issue reported at https://github.com/catkin/catkin_tool...

The workaround is to create the src directory and remove .catkin_tool so catkin uses its default configs (which expects packages to live inside the src directory)

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2020-07-08 23:33:29 -0600

Seen: 191 times

Last updated: Jul 13 '20