Execution of MoveIt plan too slow.
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.
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?
That text doesn't appear anywhere in the MoveIt codebase, so it's not coming from MoveIt.
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.
The reason things are "choppy" is likely the huge amount of "distance computations" being reported.
I would do two things:
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.configure logging better to get an idea where the message is coming from. Add something like
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.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?
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.
ROSCONSOLE_FORMAT
is an environment variable. You can set those on Windows as well. Just make sure to use the correct syntax.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.
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.