Code Monkey home page Code Monkey logo

colcon.readthedocs.org's People

Contributors

ablakey avatar bergercookie avatar briancbn avatar brycestevenwilley avatar christophebedard avatar dhood avatar dirk-thomas avatar karsten1987 avatar maryab-osr avatar mikaelarguedas avatar paulbovbel avatar rgreid avatar ritwikgupta avatar sloretz avatar wilcobonestroo avatar yyu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

colcon.readthedocs.org's Issues

Document running tests on catkin packages

Doing a bit of experimenting, I've found that running test on catkin packages isn't quite as straightforward as colcon build && colcon test. It's not immediately obvious, but one has to run:

colcon build --cmake-target tests
colcon test

...as extracted from ros-infrastructure/ros_buildfarm#548,


I'm guessing this is my fault, but I've found that when I attach a DEPENDENCY to catkin_add_nosetests such as when using catkin_virtualenv (https://github.com/paulbovbel/test_meta/blob/master/CMakeLists.txt#L52), I have to run the following to get all tests to pass:

colcon build
colcon build --cmake-target tests
colcon test

Even though it looks like the ${PROJECT_NAME}_generate_virtualenv should be getting hooked in via the underlying catkin mechanisms.

package.xml vs colcon.pkg

Regarding the following page:
https://colcon.readthedocs.io/en/released/user/configuration.html#colcon-pkg-files

It mentions that the project must have a colcon.pkg file, which has the name, type, dependencies, etc. fields, but I can't find any examples of such a file in any projects that I've come across that use Colcon. What I do see is the use of package.xml file for these values, as one would typically encounter in ROS projects. As an example, looking at a driver in the Autoware project:

https://gitlab.com/AutowareAuto/AutowareAuto/tree/master/src/drivers/udp_driver

I see a package.xml file, but no colcon.pkg file. Is there a typo in the docs, or are the package.xml and colcon.pkg files complimentary and/or alternatives? Additionally, are there any example colcon based projects that demonstrate the latest best practices?

distlib required for "Bootstrap from source"?

I was just going through https://colcon.readthedocs.io/en/released/developer/bootstrap.html to build colcon from source. On the first "build the sources" step it failed because I didn't have distlib installed.

(colcon-venv) tim@ub191:~/projects/colcon/colcon-from-source$ ./src/colcon-core/bin/colcon build --paths src/*
Traceback (most recent call last):
  File "./src/colcon-core/bin/colcon", line 59, in <module>
    from colcon_core.package_identification.python \
  File "/home/tim/projects/colcon/colcon-from-source/src/colcon-core/colcon_core/package_identification/python.py", line 9, in <module>
    from distlib.util import parse_requirement
ModuleNotFoundError: No module named 'distlib'

Installing distlib via pip fixed the issue:

(colcon-venv) tim@ub191:~/projects/colcon/colcon-from-source$ pip install distlib
Collecting distlib
Installing collected packages: distlib
Successfully installed distlib-0.2.8
(colcon-venv) tim@ub191:~/projects/colcon/colcon-from-source$ ./src/colcon-core/bin/colcon build --paths src/*
Starting >>> colcon-core
running egg_info
...

Does distlib need to be added to the requirements.txt file?

I'm building on Ubuntu 18.04 with Python 3.6

Suggestion: Define "package" More Clearly in Colcon Docs

Hi all,

I found my way to this repository/project as part of learning about ROS2. I was curious to see if Colcon was something ROS2-specific, written by the same people, and/or had other applications. If I were an expert in ROS, the answer might be obvious to me, but in reading Colcon's documentation as an isolated source, the definition of what a "package" is is not clear to me. This term seems to be used copiously in Colcon's documentation, and there is a great section defining what a workspace is (e.g. "Colcon is a command line tool to build and test multiple software packages. It builds and tests those packages in a colcon workspace, but what is a workspace?"), but this introduction relies heavily on the term "package", and I haven't been able to find anything in the docs that answers the (perhaps more basic/core question), "then what is a package"?

Since this term is highly overloaded in programming, I would humbly suggest to add something in the introduction of Colcon's docs to first explain what is actually meant by "package". Is it a package like a Debian package (installable set of files), a Python package (e.g. any folder with an init.py file), some C++ sources/binaries, something less specific such as a programming project, or something else? I think the term "package" is normally employed in relation to a framework of some kind, perhaps to say that a package is a modular component that can be added/removed to/from some thing (e.g. apt, or a Python environment), but it's not clear to me what that framework/thing is here.

My best understanding is that "package" may be meant as a reference to ROS and a program (or set of programs) that can be executed within the ROS framework specifically (perhaps including that package's dependencies, build products, or who knows what else), but as a simpleton I would find it helpful if someone could add a description of how this term is to be interpreted throughout the Colcon documentation.

Thanks so much for considering my input and I look forward to continuing to learn about ROS2 and Colcon, it seems like quite a robust and interesting framework!

Best,
Daniel

Provide better examples for .meta files

I have a bunch of packages that have CMake options exposed. Some are package-specific, but are in upstream repos that don't want to change defaults.

When building in colcon, there is support for changing the behavior of packages from the colcon root, but the docs do not explain how to use it very well.

Can you provide a more complete example in the docs for a use case like this:

src/
   pkgA/
   pkgB/
   pkgC/
.my_example.meta

I want to turn

  • BUILD_TESTING=OFF on pkgA because its tests take forever to compile and it's slow, but leave it as default (on) in the others
  • PACKAGE_B_CUSTOM1=42 only affecting pkgB

If you try setting CMake args for these for the entire build, there is no fine grained control.

It would be very helpful for the docs to include a sample my_example.meta

Thanks for the consideration!

Add description of merge-install argument

In the installation instructions for ros2_dotnet it says you should use the --merge-install argument, but I can't find anything about what this does. It is mentioned in the section about migrating from other build tools that it is the inverse of the --isolated argument of ament build, but I can't find any documentation for that either.

Suggestion: option to provide build configuration via command line argument

Use case:

We have multiple build configurations stored inside a devops toolkit. Some of them are for developer use, some for CI pipelines.

To change between configurations, I currently have to create a temporary $COLCON_HOME and copy a build configuration there, or change $COLCON_HOME to point out to a directory with the config. However, the latter assumes that the file name is defaults.yaml.

Suggestion

colcon build --config-path /path/to/config

Since providing build arguments via command line is rather clumsy, I would rather use configuration files as the default way to configure. For example providing multiple cmake-args didn't work as expected, due to very careful formatting needed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.