Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adapt moveit_ci for moveit2 development #56

Closed
wants to merge 22 commits into from

Conversation

vmayoral
Copy link

@vmayoral vmayoral commented Apr 7, 2019

This PR aims to align with the development happening at https://github.com/acutronicrobotics/moveit2 while fixes several of the problems that the existing infrastructure has when enabling any of the moveit2 submodules. Roughly:

vmayoral and others added 18 commits April 6, 2019 18:45
ros2 branch of moveit_ci wasn't able to build
moveit_core and other moveit2 packages.

Summary of fixes:
- Changed docker image to one with all dependencies
- Made use of vcstools instead
- Use common ros2.repos instead
- modified scripts to enable local testing in OS X
This ensures enviromental variables are in place and
allows to build moveit_core and other moveit packages
Add: export ROS_REPO=acutronicrobotics
Added --merge-install on colcon test command
@@ -109,18 +109,18 @@ It's also possible to run the moveit\_ci script locally, without Travis. We demo
First clone the repo you want to test:

cd /tmp/travis # any working directory will do
git clone https://github.com/ros-planning/moveit2
git clone https://github.com/acutronicrobotics/moveit2
Copy link

@mlautman mlautman Apr 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's keep the fork minimal. Rather than pointing the moveit_ci repo to the acutronics fork, we should instead work to migrate the fixes from the Acutronics fork to the main moveit2 repo.

From what I see, the Acutronics Dockerfile manually installs dependencies rather than using rosdep. This isn't a clean way of getting dependencies. Better would be to modify the package.xml's accordingly, and adding missing dependencies to https://github.com/ros/rosdistro/ as needed.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright!

First clone the repo you want to test:

cd /tmp/travis # any working directory will do
git clone https://github.com/acutronicrobotics/moveit2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the ros-planning repo should not point to the acutronics fork

export CC=gcc
export CXX=g++
export UPSTREAM_WORKSPACE=moveit.rosinstall
export TRAVIS_OS_NAME=osx
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

newline after code block

@@ -27,7 +27,8 @@ COLCON_EVENT_HANDLING="--event-handlers desktop_notification- status-"
function run_script() {
local script
eval "script=\$$1" # fetch value of variable passed in $1 (double indirection)
if [ "${script// }" != "" ]; then # only run when non-empty
if [ ! -z "${script}" ];then
#if [ "${script// }" != "" ]; then # only run when non-empty
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

delete out commented code

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why changing this code? Probably the cleaning of $script was for a reason.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMHO this way to check if variable is empty is easiest to understand. But, if you're not happy with the change I can revert it.

ros) export DOCKER_IMAGE=moveit/moveit2:$ROS_DISTRO-ci ;;
*) echo -e $(colorize RED "Unsupported ROS_REPO=$ROS_REPO. Use 'ros'"); exit 1 ;;
esac

echo -e $(colorize BOLD "Starting Docker image: $DOCKER_IMAGE")
travis_run docker pull $DOCKER_IMAGE

if [[ "${ROS_REPO}" == acutronicrobotics ]]; then
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this change does not seem to be meaningful

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're using this to force to download the image from our dockerHub.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes but travis_run docker pull $DOCKER_IMAGE is run in either case which is equivalent to how things were before this change.

# For a command that doesn’t produce output for more than 10 minutes, prefix it with travis_run_wait
COLCON_CMAKE_ARGS="--cmake-args $CMAKE_ARGS --catkin-cmake-args $CMAKE_ARGS --ament-cmake-args $CMAKE_ARGS"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we still need these no?

# For a command that doesn’t produce output for more than 10 minutes, prefix it with travis_run_wait
COLCON_CMAKE_ARGS="--cmake-args $CMAKE_ARGS --catkin-cmake-args $CMAKE_ARGS --ament-cmake-args $CMAKE_ARGS"
travis_run_wait 60 --title "colcon build" colcon build $COLCON_CMAKE_ARGS $COLCON_EVENT_HANDLING
travis_run_wait 60 --title "colcon build" colcon build --merge-install $COLCON_CMAKE_ARGS $COLCON_EVENT_HANDLING
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to --merge-install or just --symlink-install?

@@ -256,7 +283,7 @@ function test_workspace() {
blacklist_pkgs=$(filter_out "$source_pkgs" "$all_pkgs")

# Run tests, suppressing the error output (confuses Travis display?)
travis_run_wait --title "colcon test" "colcon test --packages-skip $TEST_BLACKLIST $blacklist $COLCON_EVENT_HANDLING 2>/dev/null"
travis_run_wait --title "colcon test" "colcon test --packages-skip $TEST_BLACKLIST $blacklist $COLCON_EVENT_HANDLING --merge-install 2>/dev/null"
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same note about --symlink-install vs --merge-install

@@ -31,6 +31,10 @@ travis_nanoseconds() {
format='+%s000000000'
fi

if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does this replace the above? I am confused why we have duplicate code now

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

more comments would be ideal for understanding what this does

declare -ag _TRAVIS_FOLD_NAME_STACK # "stack" array to hold name hierarchy
declare -Ag _TRAVIS_FOLD_COUNTERS # associated array to hold global counters

if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should check if the TRAVIS_OS_NAME is not equal to osx

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should this section be OS-specific at all?
Doesn't osx's bash provide global variables??

cd moveit2

Next clone the CI script:

git clone -b ros2 https://github.com/ros-planning/moveit_ci .moveit_ci
git clone -b ros2 https://github.com/acutronicrobotics/moveit_ci .moveit_ci
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here. Keep the default repo and apply required changes.


Manually define the variables, Travis would otherwise define for you. These are required:

export TRAVIS_BRANCH=master
export ROS_DISTRO=crystal
export ROS_REPO=ros
export ROS_REPO=acutronicrobotics
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you have your own debian repo?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We're using this variable to download the docker image.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get the necessary fixes into the ros-planning/moveit2 dockerfile and revert this change


## Running Locally For Testing in `OS X`

First clone the repo you want to test:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of repeating all instructions here, just highlight the difference to a standard Linux build:
export TRAVIS_OS_NAME=osx

@@ -27,7 +27,8 @@ COLCON_EVENT_HANDLING="--event-handlers desktop_notification- status-"
function run_script() {
local script
eval "script=\$$1" # fetch value of variable passed in $1 (double indirection)
if [ "${script// }" != "" ]; then # only run when non-empty
if [ ! -z "${script}" ];then
#if [ "${script// }" != "" ]; then # only run when non-empty
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why changing this code? Probably the cleaning of $script was for a reason.

declare -ag _TRAVIS_FOLD_NAME_STACK # "stack" array to hold name hierarchy
declare -Ag _TRAVIS_FOLD_COUNTERS # associated array to hold global counters

if [[ "${TRAVIS_OS_NAME}" == osx ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why should this section be OS-specific at all?
Doesn't osx's bash provide global variables??

@davetcoleman
Copy link
Member

There's too many changes in this PR. The support for OSX should be in a different PR than the other changes you are making here, for ease of discussion.

@rhaschke
Copy link
Contributor

rhaschke commented May 7, 2019

As suggested in #56 (comment) and #56 (comment) modification of moveit_ci should be kept to a minimum. But instead of cleaning up this PR, I see even more modifications added to this PR branch. For this reason, I'm going to close this PR and ask Acutronics people to come up with a clean new set of PRs, which we can then hopefully quickly merge.

@rhaschke rhaschke closed this May 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants