moveit / moveit2

:robot: MoveIt for ROS 2
https://moveit.ai/
BSD 3-Clause "New" or "Revised" License
1.06k stars 516 forks source link

Possible slowdown of RRT Connect when migrating from Foxy to Humble #1802

Closed prajd3d closed 7 months ago

prajd3d commented 1 year ago

Description

I am considering a migration of my codebase from Foxy to Humble. In this process, I noted a slowdown of RRT Connect (and in general other planners as well) in Humble. RRT Connect is about 3 times slower in Humble than in Foxy.

I am working on a Dockerfile and a minimal example to show the performance difference. Code was compiled using GCC 9.4 and targeted for a ARM64 (M1) machine.

Meanwhile, I was wondering if it is a known issue that someone is working on.

Your environment

sjahr commented 1 year ago

@prajd3d Thanks for reporting this issue. A couple of question:

In this process, I noted a slowdown of RRT Connect (and in general other planners as well) in Humble.

Are you talking about all MoveIt2 planners (OMPL, Pilz and CHOMP) or just planners of OMPL (for example RRTConnect, PRM, etc)? How are you measuring the time difference? and Which OMPL version are you using in Foxy and Humble?

prajd3d commented 1 year ago

Sorry it took this long to get back with a Dockerized example.

I am only using OMPL RRT Connect. I am measuring the solve-time by taking an average over 100 runs of the same motion plan request. I am using the default version of OMPL for both Foxy and Humble (as in the moveit/moveit2:humble-release and moveit/moveit2:foxy-release Docker images).

Here is my repo for showing the difference in time-performances of OMPL RRT Connect. The instructions are also included and I have automated most of the setup via bash scripts to make it easy for reviewers.

https://github.com/prajd3d/moveit2_performance_issue_1802

github-actions[bot] commented 1 year ago

This issue is being labeled as stale because it has been open 45 days with no activity. It will be automatically closed after another 45 days without follow-ups.

marioprats commented 7 months ago

I tracked this down to a call to OMPL print(), which is expensive. And looks like this was fixed already in https://github.com/ros-planning/moveit2/pull/2608, so this can be closed (should be already fixed in iron).

sea-bass commented 7 months ago

I tracked this down to a call to OMPL print(), which is expensive. And looks like this was fixed already in #2608, so this can be closed (should be already fixed in iron).

Should we backport that PR to Humble, then? Seems pretty important.

EDIT: I put up backport PRs to Humble and Iron