Skip to content

Adapt moveit_ci for moveit2 development#56

Closed
vmayoral wants to merge 22 commits intomoveit:ros2from
AcutronicRobotics:ros2
Closed

Adapt moveit_ci for moveit2 development#56
vmayoral wants to merge 22 commits intomoveit:ros2from
AcutronicRobotics:ros2

Conversation

@vmayoral
Copy link
Copy Markdown

@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

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
Copy Markdown

@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
Copy Markdown

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
Copy Markdown

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
Copy Markdown

Choose a reason for hiding this comment

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

newline after code block

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
Copy Markdown

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
Copy Markdown
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
Copy Markdown

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.

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

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

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
Copy Markdown

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.

Copy link
Copy Markdown

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.

travis_run_simple touch $ROS_WS/src/image_common/camera_info_manager/COLCON_IGNORE

# 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
Copy Markdown

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
Copy Markdown

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?


# 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
Copy Markdown

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

format='+%s000000000'
fi

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

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
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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??

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
Copy Markdown
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.

export TRAVIS_BRANCH=master
export ROS_DISTRO=crystal
export ROS_REPO=ros
export ROS_REPO=acutronicrobotics
Copy link
Copy Markdown
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
Copy Markdown

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.

Copy link
Copy Markdown

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
Copy Markdown
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

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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