Adapt moveit_ci for moveit2 development#56
Conversation
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
|
|
||
| cd /tmp/travis # any working directory will do | ||
| git clone https://github.com/ros-planning/moveit2 | ||
| git clone https://github.com/acutronicrobotics/moveit2 |
There was a problem hiding this comment.
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.
| First clone the repo you want to test: | ||
|
|
||
| cd /tmp/travis # any working directory will do | ||
| git clone https://github.com/acutronicrobotics/moveit2 |
There was a problem hiding this comment.
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 |
| 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 |
There was a problem hiding this comment.
Why changing this code? Probably the cleaning of $script was for a reason.
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
this change does not seem to be meaningful
There was a problem hiding this comment.
We're using this to force to download the image from our dockerHub.
There was a problem hiding this comment.
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" |
| # 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 |
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
same note about --symlink-install vs --merge-install
| format='+%s000000000' | ||
| fi | ||
|
|
||
| if [[ "${TRAVIS_OS_NAME}" == osx ]]; then |
There was a problem hiding this comment.
does this replace the above? I am confused why we have duplicate code now
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
You should check if the TRAVIS_OS_NAME is not equal to osx
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Do you have your own debian repo?
There was a problem hiding this comment.
We're using this variable to download the docker image.
There was a problem hiding this comment.
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: |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Why should this section be OS-specific at all?
Doesn't osx's bash provide global variables??
|
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. |
Include host network to avoid rosdep issue * ros-industrial/industrial_ci#364 (comment) * https://www.traviscistatus.com/incidents/kyf149kl6bvp?u=3g7kt113nmgs
|
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. |
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:
ros2branch) does not take in consideration several dependencies required to build from source moveit2