Adding a camera to my robot in urdf generates collision during planning

asked 2022-06-08 11:59:06 -0600

David-Alexandre gravatar image

Hi, I'm trying to add a d435i realsense to my urdf and I can't seem to make it work. RVIZ and Gazebo seems fine with my robot's description, but whenever i start planning with moveit, i get those errors:

[ INFO] [1654701843.857900148, 17.684000000]: Combined planning and execution request received for MoveGroup action. Forwarding to planning and execution pipeline.
[ INFO] [1654701843.858184918, 17.684000000]: Planning attempt 1 of at most 1
[ INFO] [1654701843.858623781, 17.684000000]: Found a contact between 'bracket' (type 'Robot link') and 'd435i_link' (type 'Robot link'), which constitutes a collision. Contact information is not stored.
[ INFO] [1654701843.858664459, 17.684000000]: Collision checking is considered complete (collision was found and 0 contacts are stored)
[ INFO] [1654701843.858680344, 17.684000000]: Start state appears to be in collision with respect to group arm
[ WARN] [1654701843.889569907, 17.716000000]: Unable to find a valid state nearby the start state (using jiggle fraction of 0.050000 and 100 sampling attempts). Passing the original planning request to the planner.

[ INFO] [1654701846.437854136, 19.988000000]: Found a contact between 'gripper_main_link' (type 'Robot link') and 'bracket' (type 'Robot link'), which constitutes a collision. Contact information is not stored.
[ INFO] [1654701846.437906030, 19.988000000]: Collision checking is considered complete (collision was found and 0 contacts are stored)
[ INFO] [1654701846.437923083, 19.988000000]: Start state appears to be in collision with respect to group arm
[ WARN] [1654701846.472082324, 20.018000000]: Unable to find a valid state nearby the start state (using jiggle fraction of 0.050000 and 100 sampling attempts). Passing the original planning request to the planner.

Here is the code that i've made related to adding the camera to the robot's description:

<?xml version="1.0"?>
<robot name="omp_with_gripper_and_d435i" xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:property name="M_PI" value="3.1415926535897931" />

<!-- Import OpenManipulator-P Robot -->
<xacro:include filename="$(find open_manipulator_p_description)/urdf/open_manipulator_p_with_gripper_robot.urdf.xacro" />

<joint name="bracket_joint" type="fixed">
  <parent link="gripper_main_link"/>
  <child link="bracket"/>
  <origin xyz="0.0465 0 0.029" rpy="0 0 ${-M_PI/2}"/>
</joint>

<!-- Bracket -->
<link name="bracket">
  <visual>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
      <mesh filename="package://manipulator_testbench_simulation/meshes/bracket.stl" scale="0.001 0.001 0.001"/>
    </geometry>
    <material name="grey"/>
  </visual>

  <collision>
    <origin xyz="0 0 0" rpy="0 0 0"/>
    <geometry>
      <mesh filename="package://manipulator_testbench_simulation/meshes/bracket.stl" scale="0.001 0.001 0.001"/>
    </geometry>
  </collision>

  <inertial>
    <origin xyz="0.0 0.0 0.0" rpy="0 0 0" />
    <mass value="0.001" /> 
    <inertia ixx="1.0" ixy="0.0" ixz="0.0" iyy="1.0" iyz="0.0" izz="1.0" />
  </inertial>
</link>

<!-- D435i -->
<xacro:include filename="$(find manipulator_testbench_simulation)/urdf/d435i/_d435i.urdf.xacro" />

<!-- NOTE: -->
<!-- open_manipulator_p_with_gripper.gazebo.xacro already loads a camera, thus we need to specify a new ...
(more)
edit retag flag offensive close merge delete

Comments

I had a quick and temporary solution which is to move a bit the bracket and the d435i so they dont touch neither together or the arm, but I would like a solution where i can place them as close as I want to the arm or together whitout triggering moveit's collision detector.

David-Alexandre gravatar image David-Alexandre  ( 2022-06-08 14:29:51 -0600 )edit