You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There are many more colcon packages, it can be useful to pull them down to look at how different extensions and other
43
-
functionality is implemented.
25
+
`colcon bundle`
44
26
45
-
## Testing
27
+
This will parse your dependencies, download apt and pip dependencies, install the dependencies into the bundle, and
28
+
then install your built workspace into the bundle. The final output is located at `bundle/output.tar`
46
29
47
-
To run tests execute `pytest` in the root directory. Install dependencies using `pip3 install -r requirements_devel.txt`.
48
-
You might need to `apt-get install enchant` to install the spellchecker.
30
+
## In Docker
49
31
50
-
To view stdout from a test while running `pytest` use the `-s` flag.
32
+
The simplest way to get up and running without affecting your local development environment is to use Docker.
51
33
52
-
## Running on OSX
34
+
The contents of an example Dockerfile are below. Create the Dockerfile in your workspace and then execute:
53
35
54
-
I run these packages inside of docker containers since I'm running OSX and this only supports Ubuntu currently.
36
+
`docker build -t colcon-docker .`
55
37
56
-
Build Container: `docker run -it -v $(pwd):/workspace ros:kinetic-ros-base /bin/bash`
38
+
Once your docker image is built you can then run it with your local workspace mounted into the container by executing `docker run -it -v <PATH_TO_WORKSPACE>:/workspace colcon-docker bash`. Once inside the docker container `/workspace` will be bound to your local directory.
57
39
58
-
Run Container: `docker run -it -v $(pwd):/workspace ubuntu:xenial /bin/bash`
40
+
### Dockerfile
59
41
60
-
I generally `cd` into my workspace which has the package folders and then start the container. This docker command
61
-
mounts `pwd` to`/workspace`. Once in the container I `cd /workspace` and then execute:
When `colcon bundle` is executed in a ROS workspace it will create `bundle/output.tar` that follows the specification located [here](BUNDLE_FORMAT.md).
77
54
78
-
To run the bundle you should start up a Xenial docker container with the bundle mounted.
79
-
Set BUNDLE_CURRENT_PREFIX equal to the location of your extracted bundle
80
-
folder. Then source `setup.sh` located at the top level of the bundle.
55
+
A bundle is an entire application. In order to execute inside the bundle context follow the following steps:
81
56
82
-
## Packaging
57
+
1. Extract the main archive.
58
+
1. Extract `metadata.tar.gz` and look at `overlays.json`.
59
+
1. Extract each overlay listed in `overlays.json`.
60
+
1. In order execute `BUNDLE_CURRENT_PREFIX=<path to extracted overlay> source <path to extracted overlay>/setup.sh`
61
+
1. The bundle is now activated in your shell's environment.
83
62
84
-
To create a tarball of this python package run: `python setup.py sdist`
63
+
# Package Blacklist
85
64
86
-
This will create a tarball in the `dist/` directory.
65
+
When we create the bundle we choose not to include certain packages that are included by default in most
66
+
Linux distributions. To create this blacklist for Ubuntu `apt list --installed | sed 's/^\(.*\)\/.*$/\1/'` was run on a base ubuntu:xenial container.
87
67
88
-
### Package Blacklist
68
+
You can override this blacklist by using the `--apt-package-blacklist` argument.
89
69
90
-
When we create the bundle we choose not to include certain packages that are included by default in most
91
-
Linuxd distributions. To create this blacklist for Ubuntu I ran the following on a ubuntu:xenial container.
70
+
# `colcon-bundle` Development
92
71
93
-
`apt list --installed | sed 's/^\(.*\)\/.*$/\1/'` on a base image.
0 commit comments