Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
ament plugin: new plugin #1583
Conversation
kyrofa
referenced this pull request
Oct 5, 2017
Closed
snapd integration tests: print stdout/stderr #1591
kyrofa
deleted a comment from
elopio
Oct 19, 2017
kyrofa
deleted a comment from
elopio
Oct 19, 2017
kyrofa
deleted a comment from
kalikiana
Oct 19, 2017
kalikiana
reviewed
Oct 20, 2017
Should the tests be series-specific? Just wondering since that's what we ended up needing for the catkin ones.
| + environment: | ||
| + # Required to get interleaved stdout, see | ||
| + # https://discourse.ros.org/t/ros2-launch-not-interleaving-stdout | ||
| + PYTHONUNBUFFERED: 1 |
kalikiana
Oct 20, 2017
Collaborator
How about setting this in the plugin's env so it doesn't have to be repeated in every snap?
kyrofa
Oct 20, 2017
Member
Because I currently believe it to be a hackaround as a result of using Python, whose support is new. It was not requires in ROS1, and I expect ROS2's launch will eventually take care of it as well. If not then we can revisit.
| + | ||
| + def _source_setup_sh(self, root): | ||
| + return textwrap.dedent(''' | ||
| + if [ -f {ros_setup} ]; then |
kalikiana
Oct 20, 2017
Collaborator
What's the reason for the -f here? Can't you assume the setup.sh is already in place?
kyrofa
Oct 20, 2017
Member
Not necessarily. Remember that env() is used both to generate the wrappers in prime as well as when you call self.run() to build. While setup.sh will definitely be there by the end, it has to get there first.
kalikiana
Oct 23, 2017
Collaborator
Very true. I had a feeling I was missing something. Thanks for clarifying.
That's because each release of ROS1 supports a specific subset of Ubuntu releases. ROS2 isn't released yet. Scratch that. The repos won't work due to our key issue huh. I'll update the test to be xenial-only once I see if it passes or not. |
|
Looks like zesty indeed fails with key errors: |
kalikiana
approved these changes
Oct 23, 2017
Looks good to me then, with skipping the tests on non-Xenial. Nice work!
| + subprocess.check_output( | ||
| + ['ros2-example.launch-project'], | ||
| + universal_newlines=True, stderr=subprocess.STDOUT), | ||
| + Contains("I heard: Hello world")) |
elopio
approved these changes
Oct 24, 2017
The plugin is very readable, I'm surprised. Thank you!
kyrofa
referenced this pull request
in canonical-docs/snappy-docs
Oct 24, 2017
Merged
languages: add ROS2 guide #140
|
@nuclearsandwich, @tfoote, @wjwwood here is the final piece of the puzzle regarding ROS2 support in Snapcraft. You already reviewed the most important part, that is, the bootstrapping of ROS2, but if you have some time I'd love for you to check this out as well. The rubber meets the road (i.e. the ROS2 bootstrapper is actually used) in the Ament plugin. Some quick background information:
If you want to actually poke at this, check out this simple ROS2 snap guide, and use the snapcraft specific to this PR:
|
sergiusens
added this to the 2.36 milestone
Oct 26, 2017
|
kyrofa
added some commits
Sep 14, 2017
Looks like this was caused by #1578, this was passing before the rebase. I need to quote the path, now. |
kyrofa commentedOct 3, 2017
•
Edited 2 times
-
kyrofa
Nov 3, 2017
-
kyrofa
Oct 3, 2017
./runtests.sh static?./runtests.sh unit?As ROS2 nears a stable release, it's a good time to introduce support for it by way of a beta plugin. This PR resolves LP: #1686850 (and #1443) by doing exactly that. We're starting simple, just bootstrapping ROS2 and using it to build the provided source. ROS2 doesn't have a lot of tooling just yet, so this plugin will need to grow with it.
Note that the high line count is due to an integration test: the plugin itself is relatively small.