Command line tools for working with catkin
Documentation: https://catkin-tools.readthedocs.org/
Command line tools for working with catkin
License: Apache License 2.0
Command line tools for working with catkin
Documentation: https://catkin-tools.readthedocs.org/
If you catkin build --start-with foo
and foo
is not a package in your workspace there should be a meaningful error. Instead, the command proceeds and gets stuck after skipping all packages.
I often get stuck in a terminal where the Python process is stuck (not killable with ctrl-c
) if I interupt it with ctrl-c
at an "unconvenient" time. In this case I hit ctrl+c
just after Found '251' packages in 0.3 seconds.
is displayed (but no package has started building). I get the following backtrace but am only left with the option to kill the python process manually.
$ catkin i -DCMAKE_BUILD_TYPE=Release
==> Expanding alias 'i' from 'catkin i -DCMAKE_BUILD_TYPE=Release' to 'catkin install -DCMAKE_BUILD_TYPE=Release'
==> Expanding alias 'install' from 'catkin install -DCMAKE_BUILD_TYPE=Release' to 'catkin build --install -DCMAKE_BUILD_TYPE=Release'
-----------------------------------------------------------------
Workspace: /Users/demmeln/work/hydro_ws
Buildspace: /Users/demmeln/work/hydro_ws/build
Develspace: /Users/demmeln/work/hydro_ws/devel
Installspace: /Users/demmeln/work/hydro_ws/install
DESTDIR: None
-----------------------------------------------------------------
Isolate Develspaces: False
Install Packages: True
Isolate Installs: False
-----------------------------------------------------------------
Additional CMake Args: -DCMAKE_BUILD_TYPE=Release
Additional Make Args: None
Additional catkin Make Args: None
-----------------------------------------------------------------
Found '251' packages in 0.3 seconds.
^C[build] Runtime: 2.8 seconds
Traceback (most recent call last):
File "/usr/local/bin/catkin", line 9, in <module>
load_entry_point('catkin-tools==0.0.0', 'console_scripts', 'catkin')()
File "/Users/demmeln/work/catkin_tools/catkin_tools/commands/catkin.py", line 192, in main
sys.exit(args.main(args) or 0)
File "/Users/demmeln/work/catkin_tools/catkin_tools/verbs/catkin_build/cli.py", line 183, in main
lock_install=not opts.no_install_lock
File "/Users/demmeln/work/catkin_tools/catkin_tools/verbs/catkin_build/build.py", line 411, in build_isolated_workspace
ready_packages = get_ready_packages(packages_to_be_built, running_jobs, completed_packages)
File "/Users/demmeln/work/catkin_tools/catkin_tools/verbs/catkin_build/build.py", line 92, in get_ready_packages
depends = get_cached_recursive_build_depends_in_workspace(package, workspace_packages)
File "/Users/demmeln/work/catkin_tools/catkin_tools/verbs/catkin_build/common.py", line 341, in get_cached_recursive_build_depends_in_workspace
cache[package.name] = get_recursive_build_depends_in_workspace(package, workspace_packages)
File "/Users/demmeln/work/catkin_tools/catkin_tools/verbs/catkin_build/common.py", line 374, in get_recursive_build_depends_in_workspace
dep_depends = dep_pkg.build_depends + dep_pkg.buildtool_depends + dep_pkg.run_depends
File "/usr/local/lib/python2.7/site-packages/catkin_pkg/package.py", line 112, in __getattr__
[run_depends.append(deepcopy(d)) for d in self.exec_depends + self.build_export_depends if d not in run_depends]
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 190, in deepcopy
y = _reconstruct(x, rv, 1, memo)
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 334, in _reconstruct
state = deepcopy(state, memo)
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 237, in _deepcopy_tuple
y.append(deepcopy(a, memo))
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 163, in deepcopy
y = copier(x, memo)
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 257, in _deepcopy_dict
y[deepcopy(key, memo)] = deepcopy(value, memo)
File "/usr/local/Cellar/python/2.7.6_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/copy.py", line 154, in deepcopy
d = id(x)
KeyboardInterrupt
All of my students are asking for this. Do you think it would be easy?
Thanks!
Hi William,
not sure where else to put this. Just discovered this project and I feel like giving feedback. You may close this issue without further comment.
Things I recommend for catkin_tools:
In #63 (comment) I proposed that in addition to a "build summary" after each build, catkin could also display certain advisories. These advisories, however, could be useful even when the user isn't performing a build, so there should be some other way to access them.
Where catkin_lint
is for checking catkin packages for mistake this would be the main entry point for debugging problems with a catkin environment.
Example of the proposed usage and output:
$> catkin info
Context:
Current directory appears to be a Catkin workspace.
A run-space in the current directory is currently sourced.
Workspace stack:
- /home/liza/my_overlay/devel
- /home/liza/my_ws/devel
- /opt/ros/hydro
Workspace: /home/liza/my_overlay
Source-space: /home/liza/my_overlay/src
Build-space: /home/liza/my_overlay/build
Run-spaces:
- /home/liza/my_overlay/devel
Possible advisories:
Additionally, you could alias catkin wtf
to run catkin info
.
Catkin tools is the perfect place to add tools for analyzing and managing one or more catkin workspaces. This verb could have sub-verbs for different workspace-management commands.
Rough sketch of ideas for the workspace
or ws
verb:
catkin ws create [<workspace-name>]
Create a new workspace with default directories and an optional identifiercatkin ws create --extend <workspace-name>
Create a new workspace that explicitly extends another workspace either by name or by pathcatkin ws save [--default] <workspace-name>
Save the current workspace to a persistent file with an identifier, or set an already saved workspace as the default.catkin ws get <workspace-name>
Print the path to the workspace identified by <workspace-name>
catkin ws load [<workspace-name>]
Load either the default or a named workspace environment from a persistent file. This could go into your shell profile so each new shell gets the workspace that you're currently using.catkin ws list
List the saved workspacescatkin ws clean
Remove the appropriate build
and devel
directories (prevents people from having to use rm -rf
in their workspacescatkin ws info <workspace-name>
Show a workspace's dependencies, which known workspaces depend on it, number of packages, if it's been built, etccatkin ws discover <path>
Find all catkin workspaces under some path (by looking for marker file introduced here ros-infrastructure/catkin_pkg#95)For workspace names, there could be some defaults like ros-hydro
for /opt/ros/hydro
but people will also use project names for different workspaces.
The persistent file could look something like /.catkin_workspaces
:
workspaces:
hydro: '/opt/ros/hydro'
indigo: '/opt/ros/indigo'
overlay: '/home/jbohren/ws/overlay/devel'
jhu: '/home/jbohren/ws/jhu/devel'
nasa: '/home/jbohren/ITAR/nasa/devel'
A catkin ws
command should be concerned solely with managing catkin workspaces as they pertain to the catkin buildsystem. It shouldn't be concerned with rosdep
, wstool
, or other external tools.
I'd love feedback on this idea / @davetcoleman @isucan
I don't have a simple test for this yet, but if a package fails to compile, sometimes the error that gets printed to the screen looks like it's an error from another package.
First of all, catkin build is awesome!
That said, it would be nice if the user could see compiler warnings. I usually develop with a no-warnings policy, but avoid -Werror to be able to ignore warnings in certain situations (think demo/game/whatever in 10 mins). catkin build hides away the warnings and gives no indication that there were any, which kind of defeats the purpose of warnings.
Would it fit with the catkin_tools philosophy to have a "buildone" verb which is equivalent to building a single package with the --no-deps
flag?
The following failiure occurs in a workspace with more than one package and no existing devel folder (the use of the "--space-suffix" and "--source" options is irrelevant to this issue I assume):
$ catkin build --space-suffix test --source srctest --isolate-devel catkin
Creating buildspace directory, '/Users/demmeln/work/indigo_ws/buildtest'
----------------------------------------------------------------------
Workspace: /Users/demmeln/work/indigo_ws
Buildspace: /Users/demmeln/work/indigo_ws/buildtest
Develspace: /Users/demmeln/work/indigo_ws/develtest
Installspace: /Users/demmeln/work/indigo_ws/installtest
DESTDIR: None
----------------------------------------------------------------------
Isolate Develspaces: True
Install Packages: False
Isolate Installs: False
----------------------------------------------------------------------
Additional CMake Args: None
Additional Make Args: None
Additional catkin Make Args: None
----------------------------------------------------------------------
Found '2' packages in 0.0 seconds.
Starting ==> catkin
Finished <== catkin [ 3.3 seconds ]
[build] Runtime: 3.5 seconds [0/0 Active | 1/1 Completed]
Traceback (most recent call last):
File "/usr/local/bin/catkin", line 9, in <module>
load_entry_point('catkin-tools==0.0.0', 'console_scripts', 'catkin')()
File "/Users/demmeln/work/catkin_tools/catkin_tools/commands/catkin.py", line 192, in main
sys.exit(args.main(args) or 0)
File "/Users/demmeln/work/catkin_tools/catkin_tools/verbs/catkin_build/cli.py", line 183, in main
lock_install=not opts.no_install_lock
File "/Users/demmeln/work/catkin_tools/catkin_tools/verbs/catkin_build/build.py", line 548, in build_isolated_workspace
_create_unmerged_devel_setup(context)
File "/Users/demmeln/work/catkin_tools/catkin_tools/verbs/catkin_build/build.py", line 233, in _create_unmerged_devel_setup
first_source=leaf_sources[0],
IndexError: list index out of range
Sometimes it's desirable to clear the CMakeCache of variables like the paths to found libraries. In the event that someone wants to switch a workspace to another environment, it would be useful to expose the option of clearing the CMakeCache to the user.
From the command line, this can be done by calling:
cmake -U * /path/to/src/pkg
So for a catkin build
user, they could do this for one or more packages in the workspace by running:
catkin build --clear-cmake-cache
The consensus seems to be to change the default behavior of catkin build
to be catkin build --merge-devel
, as discussed here: #28 (comment)
This means that a new option called --isolate-devel
should be made. This will fit well with the currently-existing --isolate-install
.
What is needed to release catkin_tools to pypi?
It seems that quite a few people are using it successfully and having it installable with pip would be a big plus, even if it is only alpha/beta grade software.
A minor usability improvement:
Just did this typo when I wanted -p1. catkin simply claimed everything was built successfully instead of giving a meaningful error.
When running catkin_make_isolated
, setup files are generated in the develspace, but when running catkin build
, they are not.
@jbohren as I pointed out, catkin_tools should not use this implementation unless it is relocated because otherwise catkin_tools would need to depend on catkin, which would make it where it could not be installed from pip and I really would like to avoid that.
So then if we a marker file to be used with catkin build
, should it create its own?
There should be some sort of marker file in the build and devel spaces which prevents mixing the use of catkin_make
, catkin_make_isolated
, and catkin build
on the same folders.
To be clear, it should prevent this:
$ ls
src
$ catkin_make
...
$ ls
src build devel
$ catkin build
Error: build space was created by caktin_make
the usage of these two commands should not be mixed
I just noticed these issues following a discussion in #64 (comment):
Calling catkin build --install
after catkin build
is broken for pure cmake packages. After the first call they will have been installed into the devel space and the second call will not install them to the source space.
Edit: I moved the second issue to #70
See: #54
Currently, catkin build
performs the workspace auto-extension behavior that catkin_make
also does by default. I think it would be really helpful to people to be able to create a clean workspace without having to messily unset various environment variables. This could be related to #47
With catkin_make
and default merged catkin builds, catkin_package()
usually gets called at least once in the first package to be built, so this tends not to arise. Since there's no crosstalk in catkin build
, I've found some packages that were getting away with murder and declaring targets before calling catkin_package()
.
The idea is that you can have a folder of plain CMake projects, which will all get built first, in parallel and in no particular order before trying to build any catkin packages. This allows you to easily build CMake projects as part of your workspace without creating package.xml's for them.
I've put the following in my .zshrc
:
function cb() {
catkin build --merge-devel $1
notify-send "Catkin Build Finished: $1"
}
This uses libnotify to pop up a notification when whatever I built completed.
Sometimes it seems the build command ui gets stuck with the line
[build] Calculating new jobs...
for a long time. It seems like the command is actually still building packages in the background, just not updating the display. I have a hard time reproducing this reliably, so I'm not sure.
Currently if you run any catkin
command without cmake you get this:
Traceback (most recent call last):
File "/usr/local/bin/catkin", line 8, in <module>
load_entry_point('catkin-tools==0.1.0', 'console_scripts', 'catkin')()
File "/Library/Python/2.7/site-packages/catkin_tools/commands/catkin.py", line 94, in main
argument_preprocessors = create_subparsers(parser, verbs)
File "/Library/Python/2.7/site-packages/catkin_tools/commands/catkin.py", line 61, in create_subparsers
desc = load_verb_description(verb)
File "/Library/Python/2.7/site-packages/catkin_tools/commands/catkin.py", line 41, in load_verb_description
return entry_point.load()
File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/pkg_resources.py", line 1954, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/Library/Python/2.7/site-packages/catkin_tools/verbs/catkin_build/__init__.py", line 15, in <module>
from .cli import argument_preprocessor
File "/Library/Python/2.7/site-packages/catkin_tools/verbs/catkin_build/cli.py", line 33, in <module>
from .build import build_isolated_workspace
File "/Library/Python/2.7/site-packages/catkin_tools/verbs/catkin_build/build.py", line 61, in <module>
from .job import CatkinJob
File "/Library/Python/2.7/site-packages/catkin_tools/verbs/catkin_build/job.py", line 30, in <module>
raise RuntimeError("Executable 'cmake' could not be found in PATH.")
RuntimeError: Executable 'cmake' could not be found in PATH.
This should probably only be raised when catkin build
is being used and should be caught and more politely reported.
Like this:
% catkin i -p1
==> Expanding alias 'i' from 'catkin i -p1' to 'catkin install -p1'
==> Expanding alias 'install' from 'catkin install -p1' to 'catkin build --install -p1'
Creating buildspace directory, '/Users/william/hydro with spaces/build'
---------------------------------------------------------------------
Workspace: /Users/william/hydro with spaces
Buildspace: /Users/william/hydro with spaces/build
Develspace: /Users/william/hydro with spaces/devel
Installspace: /Users/william/hydro with spaces/install
DESTDIR: None
---------------------------------------------------------------------
Merge Develspaces: False
Install Packages: True
Isolate Installs: False
---------------------------------------------------------------------
Additional CMake Args: None
Additional Make Args: None
Additional catkin Make Args: None
---------------------------------------------------------------------
Found '250' packages in 0.3 seconds.
Starting ==> catkin
[catkin] ==> '/Users/william/hydro with spaces/build/catkin/cmi_env.sh /usr/local/bin/cmake /Users/william/hydro with spaces/src/catkin -DCATKIN_DEVEL_PREFIX=/Users/william/hydro with spaces/devel/catkin -DCMAKE_INSTALL_PREFIX=/Users/william/hydro with spaces/install' in '/Users/william/hydro with spaces/build/catkin'
CMake Error: The source directory "/Users/william/hydro with spaces/build/catkin/spaces/install" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.
[catkin] <== '/Users/william/hydro with spaces/build/catkin/cmi_env.sh /usr/local/bin/cmake /Users/william/hydro with spaces/src/catkin -DCATKIN_DEVEL_PREFIX=/Users/william/hydro with spaces/devel/catkin -DCMAKE_INSTALL_PREFIX=/Users/william/hydro with spaces/install' failed with return code '1'
[cmi] There were errors:
Failed to build package 'catkin' because the following command:
# Command run in directory: /Users/william/hydro with spaces/build/catkin
/Users/william/hydro with spaces/build/catkin/cmi_env.sh /usr/local/bin/cmake /Users/william/hydro with spaces/src/catkin -DCATKIN_DEVEL_PREFIX=/Users/william/hydro with spaces/devel/catkin -DCMAKE_INSTALL_PREFIX=/Users/william/hydro with spaces/install
Exited with return code: 1
[cmi] Runtime: 1.3 seconds
commit 10cfef4
Author: William Woodall [email protected]
Date: Tue Apr 1 23:56:28 2014 -0700remove old references to cmi
It looks like this broke catkin:
[yavin:~/ws/hydro/underlay]$ catkin -h
Traceback (most recent call last):
File "/usr/local/bin/catkin", line 9, in <module>
load_entry_point('catkin-tools==0.0.0', 'console_scripts', 'catkin')()
File "/usr/local/lib/python2.7/dist-packages/catkin_tools-0.0.0-py2.7.egg/catkin_tools/commands/catkin.py", line 94, in main
argument_preprocessors = create_subparsers(parser, verbs)
File "/usr/local/lib/python2.7/dist-packages/catkin_tools-0.0.0-py2.7.egg/catkin_tools/commands/catkin.py", line 61, in create_subparsers
desc = load_verb_description(verb)
File "/usr/local/lib/python2.7/dist-packages/catkin_tools-0.0.0-py2.7.egg/catkin_tools/commands/catkin.py", line 41, in load_verb_description
return entry_point.load()
File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 1989, in load
entry = __import__(self.module_name, globals(),globals(), ['__name__'])
File "/usr/local/lib/python2.7/dist-packages/catkin_tools-0.0.0-py2.7.egg/catkin_tools/verbs/catkin_build/__init__.py", line 15, in <module>
from .cli import argument_preprocessor
File "/usr/local/lib/python2.7/dist-packages/catkin_tools-0.0.0-py2.7.egg/catkin_tools/verbs/catkin_build/cli.py", line 33, in <module>
from .build import build_isolated_workspace
File "/usr/local/lib/python2.7/dist-packages/catkin_tools-0.0.0-py2.7.egg/catkin_tools/verbs/catkin_build/build.py", line 48, in <module>
from .common import generate_bash_and_zsh_files
ImportError: cannot import name generate_bash_and_zsh_files
I followed the instructions from the catkin_tools docs:
Installing on Ubuntu with apt-get
First you must have the ROS repositories which contain the .deb for catkin_tools:
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list'
$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
Once you have added that repository, run these commands to install catkin_tools:
$ sudo apt-get update
$ sudo apt-get install python-catkin-tools
And I get
E: Unable to locate package python-catkin-tools
The catkin list
command needs documentation, but the stub is already there:
https://github.com/catkin/catkin_tools/blob/master/docs/commands/catkin_list.rst
It probably isn't worth working on this until this issue is addressed: #3
I split of the second half of #69, since it was really two separate issues.
When calling catkin build --install
some of the installed libraries still reference linked libraries in the develspace. However, the install space is supposed to be self contained, right? I don't know if the same issue arises with cm/cmi or on platforms other than OS X (where shared library linking is a bit different than on Linux).
Notice the reference to the devel space for librospack
:
$ otool -L installtest/lib/libroslib.dylib
installtest/lib/libroslib.dylib:
libroslib.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_thread-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/Users/demmeln/work/hydro_ws/develtest/lib/librospack.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libtinyxml.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/Frameworks/Python.framework/Versions/2.7/Python (compatibility version 2.7.0, current version 2.7.0)
/usr/local/lib/libboost_filesystem-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_program_options-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/local/lib/libboost_system-mt.dylib (compatibility version 0.0.0, current version 0.0.0)
/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1197.1.1)```
Hi William, so I took some time today to look over catkin_tools to see what good use of a marker file could be integrated. I took down notes of things i noticed that I would have done differently. Those are not not defects, just opinions, so feel free to just disagree, I will be happy to agree to disagree.
Else do not consider this as criticism, I like the initiative behind catkin_tools, so keep up the good work.
Just like this catkin_make_isolated
issue:
Observed:
If I run catkin build
once with a package which depends on a package installed to the system (or an underlay workspace), and then add a source checkout of that package to my workspace, the dependent package is still configured against the system/underlay package, and not the source checkout in the same workspace.
Fix:
Force a re-configuration of packages which depend on packages which were added to this workspace since the last build.
When I build with --merge-devel
sometimes packages which are built don't actually get put onto $ROS_PACKAGE_PATH
after sourcing the setup.zsh file in the develspace. Have you seen this at all? I'm having a hard time reproducing it on anything but my giant 60+ package workspace.
Currently, when running catkin build
, a bunch of status/config information is printed to the console. It would also be really useful if it listed the chained workspaces against which the current workspace is built.
This would just be the paths listed in $CMAKE_PREFIX_PATH
which contain a setup file right?
I'm not sure why this is happening with catkin build
, but it doesn't happen with normal catkin_make
. The effect is shown below. This might actually be a problem with rosrun:
[moldy-crow:~]$ rosrun rtt_gazebo_console console
[rosrun] You have chosen a non-unique executable, please pick one of the following:
1) /home/jbohren/ws/hydro/underlay/src/orocos/rtt_gazebo/rtt_gazebo_console/./scripts/console
2) /home/jbohren/ws/hydro/underlay/src/orocos/rtt_gazebo/rtt_gazebo_console/scripts/console
if a package has n dependencies and you build it in --no-deps
mode, it displays n/1 completed
in the status line.
This summary should include things like workspaces being extended and compiler being used and stuff like that.
The idea is that having this at the end of the build would better notify users of their build environment.
I need to contact people who brought up these issues against catkin and did the testing and ask them to test out catkin build
.
I'm on OSX Mavericks. I have a workspace with many packages and I'm debugging the build of one or two. When I delete the build
and devel
folders and try to build a single package with very few dependencies, I get an out of bounds error when writing the setup.bash script:
catkin build glog_catkin
-----------------------------------------------------------------------------------
Workspace: /Users/ptf/Work/ethz/code/ros_hydro_overlay_ws
Buildspace: /Users/ptf/Work/ethz/code/ros_hydro_overlay_ws/build
Develspace: /Users/ptf/Work/ethz/code/ros_hydro_overlay_ws/devel
Installspace: /Users/ptf/Work/ethz/code/ros_hydro_overlay_ws/install
DESTDIR: None
-----------------------------------------------------------------------------------
Merge Develspaces: False
Install Packages: False
Isolate Installs: False
-----------------------------------------------------------------------------------
Additional CMake Args: None
Additional Make Args: None
Additional catkin Make Args: None
-----------------------------------------------------------------------------------
Found '73' packages in 0.1 seconds.
Starting ==> catkin_simple
Finished <== catkin_simple [ 0.1 seconds ]
Starting ==> gflags_catkin
Finished <== gflags_catkin [ 0.4 seconds ]
Starting ==> glog_catkin
Finished <== glog_catkin [ 0.7 seconds ]
[build] Runtime: 1.9 seconds [0/0 Active | 3/3 Completed]
---------------------------------------------------------------------------
IndexError Traceback (most recent call last)
/usr/local/bin/catkin in <module>()
7 if __name__ == '__main__':
8 sys.exit(
----> 9 load_entry_point('catkin-tools==0.0.0', 'console_scripts', 'catkin')()
10 )
/Library/Python/2.7/site-packages/catkin_tools-0.0.0-py2.7.egg/catkin_tools/commands/catkin.pyc in main(sysargs)
190 # Finally call the subparser's main function with the processed args
191 # and the extras which the preprocessor may have returned
--> 192 sys.exit(args.main(args) or 0)
/Library/Python/2.7/site-packages/catkin_tools-0.0.0-py2.7.egg/catkin_tools/verbs/catkin_build/cli.pyc in main(opts)
181 interleave_output=opts.interleave_output,
182 no_status=opts.no_status,
--> 183 lock_install=not opts.no_install_lock
184 )
185 finally:
/Library/Python/2.7/site-packages/catkin_tools-0.0.0-py2.7.egg/catkin_tools/verbs/catkin_build/build.pyc in build_isolated_workspace(context, packages, start_with, no_deps, jobs, force_cmake, force_color, quiet, interleave_output, no_status, lock_install)
539 if not context.merge_devel:
540 if not context.install:
--> 541 _create_unmerged_devel_setup(context)
542 else:
543 _create_unmerged_devel_setup_for_install(context)
/Library/Python/2.7/site-packages/catkin_tools-0.0.0-py2.7.egg/catkin_tools/verbs/catkin_build/build.pyc in _create_unmerged_devel_setup(context)
231 {run_depends_sources}
232 """.format(
--> 233 first_source=leaf_sources[0],
234 leaf_sources='\n'.join(leaf_sources[1:]),
235 run_depends_sources='\n'.join(run_depends_sources)
IndexError: list index out of range
If I run this in ipython and call debug, it looks like leaf_packages
has a lot of packages from my src folder
leaf_packages
['rviz_animated_view_controller', 'aslam_vcharge_python', 'imu_camera_calibration', 'sm_doc', 'libsnappy', 'zeromq_catkin', 'aslam_python', 'aslam_camera_calibration', 'aslam_install', 'ceres_catkin', 'sm_matlab', 'protobuf_catkin', 'rviz_pyplot', 'aslam_vo_python', 'aslam_backend_bsplines_tutorial', 'aslam_cv_ros', 'aslam_simulation_python']
but as none of those are built, the setup.sh
files are not there and leaf_sources
ends up empty.
The same problem doesn't happen when I build with the --merge-devel
option.
Currently the setup.sh
file which is generated by catkin build
is very slow because it must execute setup.sh --extend
for each leaf package and each of those leaf package's run depends recursively (excluding overlap from build depends). On a large workspace, like hydro-desktop_full, 250 packages means sourcing ~188 setup files.
Because of the way the devel space is created we can theoretically create a faster single setup.sh which builds the combined devel space in one invocation.
Related: #24
The idea is to allow users to execute the build
verb anywhere within a workspace, similar to how git
commands can be called anywhere within a git repository.
It is related to ros/catkin#603 and should replace #9
I basically created catkin list
as a proof of concept for the verb discovery system. It could really be improved.
Currently there are a lot of useful modules which live in catkin_tools.verbs.catkin_build
which would be useful for other verbs and commands. Those modules should be generalized, documented, and moved into a neutral module so that they are more reusable.
I switched the default behavior to be quiet (hiding the output from build commands unless there is an error). The remaining concern is that warnings will go unnoticed by users.
To alleviate this we should find and report warnings from cmake
and gcc
/clang
and report them. This shouldn't be too hard because we are already capturing all of the output from commands and rosmake
did the same kind of parsing in order to collect and report on the warnings in a similar fashion. In fact, I plan on stealing the code from rosmake
and refactoring it to work for the build
verb.
This is super-low-priority, but I thought I'd write it down anyway.
Since the names of all packages are known at the beginning, we could prettify the time display like the following:
Starting ==> gazebo_msgs
Finished <== conman [ 1.8 seconds ]
Starting ==> gazebo_ros_pkgs
Finished <== conman_msgs [ 1.9 seconds ]
Starting ==> joint_state_publisher
Finished <== fanuc_s430if_support [ 1.2 seconds ]
Starting ==> lcsr_camera_models
Finished <== joint_state_publisher [ 1.4 seconds ]
Starting ==> lcsr_tf_tools
Finished <== gazebo_ros_pkgs [ 1.8 seconds ]
Starting ==> oro_barrett_gazebo
Finished <== gazebo_msgs [ 2.4 seconds ]
Starting ==> oro_barrett_msgs
to...
Starting ==> gazebo_msgs
Finished <== conman [ 1.8 seconds ]
Starting ==> gazebo_ros_pkgs
Finished <== conman_msgs [ 1.9 seconds ]
Starting ==> joint_state_publisher
Finished <== fanuc_s430if_support [ 1.2 seconds ]
Starting ==> lcsr_camera_models
Finished <== joint_state_publisher [ 1.4 seconds ]
Starting ==> lcsr_tf_tools
Finished <== gazebo_ros_pkgs [ 1.8 seconds ]
Starting ==> oro_barrett_gazebo
Finished <== gazebo_msgs [ 2.4 seconds ]
Starting ==> oro_barrett_msgs
I just noticed the added notifications. Awesome stuff.
Here is a low priority issue: When I click on the notification box (OS X 10.9), another message pops up with "No Title" / "No Message" content.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.