Ask Your Question

Execution of MoveIt plan too slow.

asked 2021-11-08 17:06:53 -0600

AlexLYN gravatar image

updated 2021-11-10 14:40:08 -0600

gvdhoorn gravatar image

I am using MoveIt + RViz visualization to simulate robot bin picking. Since there may be multiple goal pose candidates from the upstream computer vision pipeline, I use moveit::planning_interface::MoveGroupInterface::plan to to compute individual plans for the robot to move from start to goal pose, then goal to dropoff, and dropoff back to start, etc. If any planning stage fails, I move on to the next goal pose candidate until one goal pose succeeds in every planning stage.

However, when I try use moveit::planning_interface::MoveGroupInterface::execute to execute the computed plans, the robot in RViz takes several seconds to even start moving, and the movement is very slow and choppy. I can see that the planned path in RViz visualization is find and the animation is smooth, but when the robot actually starts moving, it's nothing like the plan animation.

In console, I keep getting these lines like the one below printed continuously once execute is called, which I haven't been able to find anywhere in my code or in any MoveIt source code. Does anyone know where they come from and how to resolve the problem of execution being very slow?

Output completed. Verifying that all points are below outer planes of all facets. Will make 17963118 distance computations.

edit retag flag offensive close merge delete


Are you using OMPL? If so, can you please paste the contents of ompl_planning_pipeline.launch.xml?

I haven't seen that text about "planes of all facets" before. Is there anything unusual about your setup?

AndyZe gravatar image AndyZe  ( 2021-11-09 08:15:45 -0600 )edit

That text doesn't appear anywhere in the MoveIt codebase, so it's not coming from MoveIt.

AndyZe gravatar image AndyZe  ( 2021-11-09 08:37:30 -0600 )edit

I am not using OMPL. I am also very confused about this log message that constantly appears. There isn't anything unusual about my setup. I've noticed that when I reduce the number of collision objects in the scene, from 20 down to 5, the execution speed improves noticeably and RViz animation is no longer as choppy.

AlexLYN gravatar image AlexLYN  ( 2021-11-10 14:22:42 -0600 )edit

The reason things are "choppy" is likely the huge amount of "distance computations" being reported.

I would do two things:

  1. reduce the fidelity of your collision meshes if you haven't already done so (did you create convex hulls or other more coarse representations of your visual meshes?). This is something you should (almost) always do. Not just because of the issue you're running into. What's the filesize of your meshes? Especially if you've exported from something like SolidWorks (or similar), meshes are typically way too detailed to be useful.
  2. configure logging better to get an idea where the message is coming from. Add something like

    export ROSCONSOLE_FORMAT='[${severity}] [${time}] [${node}] [${logger}]: ${message}'

    to your $HOME/.bashrc (if using Bash), source $HOME/.bashrc and then restart your .launch file(s).

The message is printed by something using libqhull most likely. That is a library for generating convex hulls.

gvdhoorn gravatar image gvdhoorn  ( 2021-11-10 14:35:52 -0600 )edit

Thanks for your comment. I am running ROS in windows, do you happen to know the equivalent action to your second suggestion in a Windows environment?

AlexLYN gravatar image AlexLYN  ( 2021-11-10 14:38:23 -0600 )edit

I am running ROS in windows

you may want to mention things like this in the future. This is important information. I don't see it anywhere in your question text.

do you happen to know the equivalent action to your second suggestion in a Windows environment?

ROSCONSOLE_FORMAT is an environment variable. You can set those on Windows as well. Just make sure to use the correct syntax.

gvdhoorn gravatar image gvdhoorn  ( 2021-11-10 14:39:41 -0600 )edit

I've set the ROSCONSOLE_FORMAT environment variable to the suggested, and I can see that console messages originating from ROS nodes are now displayed in such format. However, the "Output completed. Verifying..." messages are still displayed as they were before.

AlexLYN gravatar image AlexLYN  ( 2021-11-12 08:47:47 -0600 )edit

did you create convex hulls or other more coarse representations of your visual meshes?

I am using .stl files, feeding their path into the shapes::Mesh::createMeshFromResource function to create the meshes of the objects. The .stl file of the object is 702KB.

AlexLYN gravatar image AlexLYN  ( 2021-11-12 08:53:18 -0600 )edit

1 Answer

Sort by » oldest newest most voted

answered 2021-11-09 06:52:14 -0600

Ranjit Kathiriya gravatar image

updated 2021-11-09 07:00:33 -0600


It is because the default value is set as 10% of velocity and acceleration. You can have a look at this answer #q346203.

You just need to change the default value to a lower number in the joint_limits.yaml file in your moveit_config package.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2021-11-08 17:06:53 -0600

Seen: 41 times

Last updated: Nov 09 '21