0
$\begingroup$

Rosanswers logo

Moveit's planning scene has collision checking functions, some with and some without padding. Is the padding configurable and how big is it by default?


Originally posted by BrettHemes on ROS Answers with karma: 525 on 2017-05-13

Post score: 1

$\endgroup$

2 Answers 2

0
$\begingroup$

Rosanswers logo

For PlanningScenes maintained by the PlanningSceneMonitor, the parameters can be configured by ROS parameters. The code that parses the parameters can be found here: https://github.com/ros-planning/moveit/blob/kinetic-devel/moveit_ros/planning/planning_scene_monitor/src/planning_scene_monitor.cpp#L1412

However, greping further through the code suggests that default_object_padd_ and default_attached_padd_ are not implemented though. They can be queried through getDefault*Padding, but are never used anywhere.

So you can set the default robot padding, scale, and their corresponding link versions through the parameters and these should be supported.

To set the parameters for a scene that is not maintained by the PSM, you have to set them for its RobotState directly: https://github.com/ros-planning/moveit/blob/kinetic-devel/moveit_ros/planning/planning_scene_monitor/src/planning_scene_monitor.cpp#L198

By default the padding seems to be 0.0 everywhere.


Originally posted by v4hn with karma: 2950 on 2017-05-13

This answer was ACCEPTED on the original site

Post score: 2


Original comments

Comment by BrettHemes on 2017-05-16:
Thanks v4hn!

Comment by johnyang on 2017-09-11:
I'm still not 100% sure what is the best way to add this parameters. I created a paddings.yaml file and loaded it through rosparam in my launch file, and make sure it's sitting in the correct namespace like //robot_description_planning/default_attached_padding ?

$\endgroup$
0
$\begingroup$

Rosanswers logo

Since this is the top result on Google for "moveit default_robot_padding", I though having a working example might be good. Here's how I have set the default_robot_padding parameter:

Add a file padding.yaml, for example in <robot>_moveit_config/config, with the following content

# parameters for padded robot (not used for self collision checks)
default_robot_padding: 0.05
default_robot_scale: 1.0

and load the parameters from padding.yaml into the correct namespace in a launch file somewhere, for example in planning_context.launch

<!-- Load padding -->
<group ns="move_group">
  <group ns="$(arg robot_description)_planning">
    <rosparam command="load" file="$(find <robot>_moveit_config)/config/padding.yaml" />
  </group>
</group>

Originally posted by FSund with karma: 33 on 2021-03-25

This answer was NOT ACCEPTED on the original site

Post score: 2


Original comments

Comment by tgaspar on 2021-05-25:
Thank you for providing this example. However, we could not get it to work the way you describe it. We made sure that the padding settings are indeed in the correct namespace and that they get loaded. But we do not see the desired behavior, i.e. detection collisions at the distance of the padding.

Would you be prepared to share something like an example how you tested and made sure that your settings work?

In our scenario, we are interested to use padding around either the robot or scene to avoid collisions that could arise due to discrepancies between the real system and the model of the cell.

Comment by FSund on 2021-05-25:
What I did was to add a collision object to my scene (a box or something else), and tried moving the robot near the object. When I got around 5 cm from the box (the size of the padding I used), the part of the robot close to the box was marked in red/in collision. Make sure your collision tags are set up properly as well as the visual tags.

Comment by tgaspar on 2021-05-25:
Thanks! I followed the steps you described here and was finally able to see the padding parameters having some effect!

Now I have to figure out how to achieve the same behavior between my robot arm and the structure of the robot cell as they are part of the same URDF. Any pointers in or advice in this regard?

p.s. if anyone ever finds themselves in the similar situation and is looking for answers I tried the following parameters separately and they all worked: default_robot_padding, default_robot_scale, default_robot_link_padding: {}.

Comment by FSund on 2021-05-25:
No, sorry. We're having the same problem here, trying to tackle the posibility of unreliable motor positions. If the robot cell is static (as in, not moving) you could load it separately by publishing a model on the /collision_object topic instead of loading it as part of the robot. Or importing it via PlanningSceneInterface (Python) add_object or add_mesh. http://docs.ros.org/en/noetic/api/moveit_commander/html/classmoveit__commander_1_1planning__scene__interface_1_1PlanningSceneInterface.html.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.