Skip to content

Test future versions of ROS2#434

Closed
tylerjw wants to merge 2 commits intomoveit:mainfrom
tylerjw:ci-future
Closed

Test future versions of ROS2#434
tylerjw wants to merge 2 commits intomoveit:mainfrom
tylerjw:ci-future

Conversation

@tylerjw
Copy link
Copy Markdown
Member

@tylerjw tylerjw commented Apr 22, 2021

Description

This adds tests to CI for Galactic and Rolling.

@tylerjw tylerjw force-pushed the ci-future branch 2 times, most recently from 4d7ccb8 to 2ee219a Compare April 22, 2021 19:13
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 22, 2021

Codecov Report

Merging #434 (c6ba0d8) into main (bf04423) will increase coverage by 0.01%.
The diff coverage is 66.67%.

❗ Current head c6ba0d8 differs from pull request most recent head a3622ce. Consider uploading reports for the commit a3622ce to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #434      +/-   ##
==========================================
+ Coverage   51.42%   51.42%   +0.01%     
==========================================
  Files         223      223              
  Lines       23344    23346       +2     
==========================================
+ Hits        12002    12004       +2     
  Misses      11342    11342              
Impacted Files Coverage Δ
...mpl_interface/src/model_based_planning_context.cpp 60.65% <0.00%> (ø)
...ple_controller_manager/gripper_controller_handle.h 0.00% <0.00%> (ø)
.../src/follow_joint_trajectory_controller_handle.cpp 44.27% <88.89%> (+1.89%) ⬆️
moveit_ros/moveit_servo/src/servo_calcs.cpp 63.84% <100.00%> (ø)
...ics_plugin_loader/src/kinematics_plugin_loader.cpp 67.26% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update bf04423...a3622ce. Read the comment docs.

@tylerjw tylerjw force-pushed the ci-future branch 2 times, most recently from f25b8c9 to 57bfbdc Compare April 22, 2021 20:15
@tylerjw
Copy link
Copy Markdown
Member Author

tylerjw commented Apr 22, 2021

It looks like ros2_control needs some changes to be able to be built on rolling. I created this issue for it: ros-controls/ros2_control#388

Copy link
Copy Markdown
Member

@henningkayser henningkayser left a comment

Choose a reason for hiding this comment

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

Thanks for setting this up! IMO we should just get it merged and allow Rolling to fail until it's fixed. What do you think?

@@ -0,0 +1,49 @@
repositories:
moveit_msgs:
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.

Just curious.. once rolling is working on all dependencies, we won't really need this file anymore, right? Or is it still required for checking the lastest versions before the corresponding rolling release is out? I'm wondering how changes that affect multiple repos would be synced then.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This file is needed because there are dependencies that are not released for rolling yet that are not in the normal repos file.

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.

Yes, I already understood so far. The question is just if there is a recommended strategy for syncing changes in multiple repos without breaking Rolling (the release) all the time.

@vatanaksoytezer
Copy link
Copy Markdown
Contributor

vatanaksoytezer commented Apr 23, 2021

Steps To Compile moveit2 and moveit2_tutorials on Rolling

To compile moveit2 on rolling I've used the latest official rolling-desktop docker image, namely osrf/ros:rolling-desktop, from OSRF's docker hub page. I pulled the docker image from docker hub and started a docker container with it. The rest of the commands in this document should be issued in that container.

Create the workspace and Pull moveit2 and moveit2_tutorials

  • Install python and tool dependencies
sudo apt install -y \
build-essential \
cmake \
git \
libbullet-dev \
python3-colcon-common-extensions \
python3-flake8 \
python3-pip \
python3-pytest-cov \
python3-rosdep \
python3-setuptools \
python3-vcstool \
wget \
clang-format-10 && \
python3 -m pip install -U \
argcomplete \
flake8-blind-except \
flake8-builtins \
flake8-class-newline \
flake8-comprehensions \
flake8-deprecated \
flake8-docstrings \
flake8-import-order \
flake8-quotes \
pytest-repeat \
pytest-rerunfailures \
pytest
  • Create workspace
export COLCON_WS=~/ws_moveit2/
mkdir -p $COLCON_WS/src
cd $COLCON_WS/src
  • Clone moveit2 and moveit2_tutorials and related repositories
# Moveit2
wget https://raw.githubusercontent.com/ros-planning/moveit2/main/moveit2.repos
vcs import < moveit2.repos
git clone https://github.com/ros-planning/moveit2.git
# Moveit2 Tutorials
wget https://raw.githubusercontent.com/ros-planning/moveit2_tutorials/main/moveit2_tutorials.repos
vcs import < moveit2_tutorials.repos

Pull Dependencies

Usually in this step we solve dependencies with rosdep but there are some packages not released for rolling, thus needed to be source build as follows:

# object_recognition_msgs
git clone -b ros2 https://github.com/wg-perception/object_recognition_msgs.git
# control_toolbox
git clone -b ros2-master https://github.com/ros-controls/control_toolbox.git
# realtime_tools
git clone -b foxy-devel https://github.com/ros-controls/realtime_tools.git
# random_numbers
git clone -b ros2 https://github.com/ros-planning/random_numbers.git
# OMPL
git clone https://github.com/ompl/ompl/
# octomap
git clone https://github.com/OctoMap/octomap
# octomap_msgs
git clone -b ros2 https://github.com/OctoMap/octomap_msgs/tree/ros2
# Now we can solve other dependcies via rosdep
rosdep install -r --from-paths . --ignore-src --rosdistro foxy -y

Build the workspace

There needs to be some changes in the source code to sucesfully build for rolling as listed below:

  • controller_manager.cpp:741 - Change RCLCPP_DEBUG to RCLCPP_DEBUG_STREAM
  • trajectory_execution_manager - CMakeLists.txt:5 - Add find_package(tinyxml_vendor)
  • kinematic_plugin_loader:135 - Change RCLCPP_DEBUG to RCLCPP_DEBUG_STREAM
  • model_based_planning_context.cpp:977 - Change RCLCPP_INFO to RCLCPP_INFO_STREAM
  • moveit_cpp.cpp:70,79,87 - Change RCLCPP_FATAL to RCLCPP_FATAL_STREAM
  • servo_calcs.cpp:462 - Change this line to RCLCPP_INFO_STREAM(LOGGER, "robot_link_command_frame changed to: " << robot_link_command_frame_);
  • remote_control.hpp:57,68,81,147 - Replace executor::Executor with executors::SingleThreadedExecutor::Executor
  • remote_control.cpp:50 - Replace executor::Executor with executors::SingleThreadedExecutor::Executor
  • follow_joint_trajectory_control_handle.cpp:66 - Replace send_goal_options.goal_response_callback = [this](const auto& future) { to send_goal_options.goal_response_callback = [this](std::shared_future<rclcpp_action::Client<control_msgs::action::FollowJointTrajectory>::GoalHandle::SharedPtr> future) {
  • gripper_controller_handle.cpp:139 - Replace send_goal_options.goal_response_callback = [this](const auto& /* unused-arg */) { to send_goal_options.goal_response_callback = [this](std::shared_future<rclcpp_action::Client<control_msgs::action::GripperCommand>::GoalHandle::SharedPtr> /* unused-arg */)
  • simple_transmission_test.cpp:182 - Replace SimpleTransmission(-10.0, -1.0)), ); with SimpleTransmission(-10.0, -1.0)));

Now the workspace is ready to be built:

source /opt/ros/rolling/setup.bash
cd $COLCON_WS
colcon build --event-handlers desktop_notification- status- --cmake-args -DCMAKE_BUILD_TYPE=Release

After being built and sourced, the demos and ported tutorials should work without any problems.

@vatanaksoytezer
Copy link
Copy Markdown
Contributor

vatanaksoytezer commented Apr 23, 2021

I succesfully compiled moveit2 and moveit2_tutorials and run all the demos and tutorials on rolling and above was my steps to compile, let me know if you need anything on this regard @tylerjw .

@tylerjw
Copy link
Copy Markdown
Member Author

tylerjw commented Apr 23, 2021

@vatanaksoytezer woa, thank you for such a nice writeup. We should make PRs to work through fixing those various issues. I can get started making the PRs for ros2_control.

@tylerjw tylerjw force-pushed the ci-future branch 2 times, most recently from e7c0a20 to a7f7b42 Compare April 23, 2021 19:35
@vatanaksoytezer
Copy link
Copy Markdown
Contributor

@tylerjw which rolling image isindustrial_ci using? I had had sucess with osrf/ros:rolling-desktop though the one industrial_ci uses seems to be failing.

@tylerjw
Copy link
Copy Markdown
Member Author

tylerjw commented Apr 23, 2021

I don't know what image they are using but the current issue seems to be with a dependency not being specified correctly in warehouse_ros. Here is a PR for that: moveit/warehouse_ros#68

And a second one to add a rolling test for warehouse_ros: moveit/warehouse_ros#69

@tylerjw
Copy link
Copy Markdown
Member Author

tylerjw commented May 18, 2021

Vatan's change to ros2_control was merged so this should now work. I'm going to update it to re-trigger CI.

Co-authored-by: Vatan Aksoy Tezer <vatan@picknik.ai>
Copy link
Copy Markdown
Member

@henningkayser henningkayser left a comment

Choose a reason for hiding this comment

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

I'd say we should merge this as is and then start releasing our own upstream dependencies for rolling. I'm fine with enabling galactic in a later PR if it would be holding us up too much.

- ROS_DISTRO: rolling
ROS_REPO: testing
# galactic is not yet supported by industrial_ci
# - ROS_DISTRO: galactic
Copy link
Copy Markdown
Member

@henningkayser henningkayser May 18, 2021

Choose a reason for hiding this comment

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

I just tried galactic and it seems to work just as well with the provided workspace dependencies. There are only some deprecation and formatting warnings that we still need to fix (same for rolling and galactic). Any reason not to enable galactic as well?

@vatanaksoytezer
Copy link
Copy Markdown
Contributor

Only moveit_msgs, ros2_controller and ros2_controllers remain unreleased. @tylerjw maybe we can update this PR to only include these and enable rolling builds

@vatanaksoytezer
Copy link
Copy Markdown
Contributor

vatanaksoytezer commented Jun 8, 2021

This setup currently does not compile on rolling. See ros-controls/ros2_controllers#200. There are some compile issues coming from moveit itself as well. I'll try to add fixes to those as well.

MikeWrock pushed a commit to MikeWrock/moveit2 that referenced this pull request Aug 15, 2022
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.

3 participants