Refactor tool management and update robot configuration
- Updated iiwa7.srdf to streamline group and end effector definitions, removing unnecessary joint specifications. - Enhanced setting.yaml to include active tool configuration. - Removed deprecated gripper URDF and Xacro files, consolidating tool definitions into tools.yaml. - Introduced tool_manager.py for dynamic tool management, allowing for easy updates to active tools and collision settings. - Created tool_active.xacro to reflect the currently active tool in the robot's URDF. - Added comprehensive collision management for the new tool configurations.
This commit is contained in:
@@ -1,176 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<robot name="gripper">
|
||||
|
||||
<link name="base_frame">
|
||||
<visual>
|
||||
<origin xyz="-21 -21 6" rpy="0 0 0"/>
|
||||
<geometry>
|
||||
<mesh filename="/home/daniel/dev/kuka_iiwa7_ros2/src/iiwa_description/resource/meshes/gripper/base_frame.stl" />
|
||||
</geometry>
|
||||
<material name="black_plastic">
|
||||
<color rgba="0.05 0.05 0.05 1.0"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin xyz="-21 -21 6" rpy="0 0 0"/>
|
||||
<geometry>
|
||||
<mesh filename="/home/daniel/dev/kuka_iiwa7_ros2/src/iiwa_description/resource/meshes/gripper/base_frame.stl" />
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="0.0"/>
|
||||
<origin xyz=" 0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
|
||||
<inertia ixx="0.0" ixy="0.0" ixz="0.0" iyy="0.0" iyz="0.0" izz="0.0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<link name="plate">
|
||||
<visual>
|
||||
<geometry>
|
||||
<mesh filename="/home/daniel/dev/kuka_iiwa7_ros2/src/iiwa_description/resource/meshes/gripper/plate.stl"/>
|
||||
</geometry>
|
||||
<material name="alum_plastic">
|
||||
<color rgba="0.7 0.7 0.7 1.0"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<geometry>
|
||||
<mesh filename="/home/daniel/dev/kuka_iiwa7_ros2/src/iiwa_description/resource/meshes/gripper/plate.stl"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
<inertial>
|
||||
<mass value="0.0"/>
|
||||
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
|
||||
<inertia ixx="0.0" ixy="0.0" ixz="0.0" iyy="0.0" iyz="0.0" izz="0.0"/>
|
||||
</inertial>
|
||||
</link>
|
||||
|
||||
<link name="screw">
|
||||
<inertial>
|
||||
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
|
||||
<mass value="0.0"/>
|
||||
<inertia ixx="0.0" ixy="0.0" ixz="0.0" iyy="0.0" iyz="0.0" izz="0.0"/>
|
||||
</inertial>
|
||||
<visual name="">
|
||||
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
|
||||
<geometry>
|
||||
<mesh filename="/home/daniel/dev/kuka_iiwa7_ros2/src/iiwa_description/resource/meshes/gripper/screw.stl"/>
|
||||
</geometry>
|
||||
<material name="alum_plastic">
|
||||
<color rgba="0.7 0.7 0.7 1.0"/>
|
||||
</material>
|
||||
</visual>
|
||||
</link>
|
||||
|
||||
|
||||
<link name="finger1">
|
||||
<inertial>
|
||||
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
|
||||
<mass value="0.0"/>
|
||||
<inertia ixx="0.0" ixy="0.0" ixz="0.0" iyy="0.0" iyz="0.0" izz="0.0"/>
|
||||
</inertial>
|
||||
<visual name="">
|
||||
<origin xyz="9 -25 5" rpy="0.0 -1.57 0.0"/>
|
||||
<geometry>
|
||||
<mesh filename="/home/daniel/dev/kuka_iiwa7_ros2/src/iiwa_description/resource/meshes/gripper/finger_plates.stl"/>
|
||||
</geometry>
|
||||
<material name="">
|
||||
<color rgba="0.0 0.8 1.0 1.0"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin xyz="9 -25 5" rpy="0.0 -1.57 0.0"/>
|
||||
<geometry>
|
||||
<mesh filename="/home/daniel/dev/kuka_iiwa7_ros2/src/iiwa_description/resource/meshes/gripper/finger_plates.stl"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
|
||||
<link name="finger2">
|
||||
<inertial>
|
||||
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
|
||||
<mass value="0.0"/>
|
||||
<inertia ixx="0.0" ixy="0.0" ixz="0.0" iyy="0.0" iyz="0.0" izz="0.0"/>
|
||||
</inertial>
|
||||
<visual name="">
|
||||
<origin xyz="9 -25 5" rpy="0.0 -1.57 0.0"/>
|
||||
<geometry>
|
||||
<mesh filename="/home/daniel/dev/kuka_iiwa7_ros2/src/iiwa_description/resource/meshes/gripper/finger_plates.stl"/>
|
||||
</geometry>
|
||||
<material name="">
|
||||
<color rgba="0.0 0.8 1.0 1.0"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin xyz="9 -25 5" rpy="0.0 -1.57 0.0"/>
|
||||
<geometry>
|
||||
<mesh filename="/home/daniel/dev/kuka_iiwa7_ros2/src/iiwa_description/resource/meshes/gripper/finger_plates.stl"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
|
||||
<link name="finger3">
|
||||
<inertial>
|
||||
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
|
||||
<mass value="0.0"/>
|
||||
<inertia ixx="0.0" ixy="0.0" ixz="0.0" iyy="0.0" iyz="0.0" izz="0.0"/>
|
||||
</inertial>
|
||||
<visual name="">
|
||||
<origin xyz="9 -25 5" rpy="0.0 -1.57 0.0"/>
|
||||
<geometry>
|
||||
<mesh filename="/home/daniel/dev/kuka_iiwa7_ros2/src/iiwa_description/resource/meshes/gripper/finger_plates.stl"/>
|
||||
</geometry>
|
||||
<material name="">
|
||||
<color rgba="0.0 0.8 1.0 1.0"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin xyz="9 -25 5" rpy="0.0 -1.57 0.0"/>
|
||||
<geometry>
|
||||
<mesh filename="/home/daniel/dev/kuka_iiwa7_ros2/src/iiwa_description/resource/meshes/gripper/finger_plates.stl"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
|
||||
<joint name="base" type="fixed">
|
||||
<origin xyz="0.0 0.0 61.3" rpy="0.0 0.0 0.0"/>
|
||||
<parent link="base_frame"/>
|
||||
<child link="plate"/>
|
||||
</joint>
|
||||
|
||||
<joint name="base_screw" type="prismatic">
|
||||
<origin xyz="0.0 0.0 72" rpy="0.0 0.0 0.0"/>
|
||||
<parent link="base_frame"/>
|
||||
<child link="screw"/>
|
||||
<axis xyz="0.0 0.0 1"/>
|
||||
<limit lower="-7" upper="0.0" effort="0.0" velocity="0.0"/>
|
||||
</joint>
|
||||
|
||||
<joint name="finger1_joint" type="revolute">
|
||||
<origin xyz="31.5 -18.5 28" rpy="0.0 0.0 -2.12"/>
|
||||
<parent link="plate"/>
|
||||
<child link="finger1"/>
|
||||
<axis xyz="1 0.0 0"/>
|
||||
<limit lower="-0.2" upper="0.07" effort="0.0" velocity="0.0"/>
|
||||
<mimic joint="base_screw" multiplier="-0.05" offset="-0.2"/>
|
||||
</joint>
|
||||
|
||||
<joint name="finger2_joint" type="revolute">
|
||||
<origin xyz="-31.5 -18.5 28" rpy="0.0 0.0 2.12"/>
|
||||
<parent link="plate"/>
|
||||
<child link="finger2"/>
|
||||
<axis xyz="1 0.0 0"/>
|
||||
<limit lower="-0.2" upper="0.07" effort="0.0" velocity="0.0"/>
|
||||
<mimic joint="base_screw" multiplier="-0.05" offset="-0.2"/>
|
||||
</joint>
|
||||
|
||||
<joint name="finger3_joint" type="revolute">
|
||||
<origin xyz="0 37 28" rpy="0.0 0.0 0.0"/>
|
||||
<parent link="plate"/>
|
||||
<child link="finger3"/>
|
||||
<axis xyz="1 0.0 0"/>
|
||||
<limit lower="-0.2" upper="0.07" effort="0.0" velocity="0.0"/>
|
||||
<mimic joint="base_screw" multiplier="-0.05" offset="-0.2"/>
|
||||
</joint>
|
||||
|
||||
</robot>
|
||||
@@ -1,13 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" xacro:version="1.0">
|
||||
|
||||
<xacro:include filename="$(find iiwa_description)/urdf/gripper/gripper_links.xacro"/>
|
||||
<xacro:include filename="$(find iiwa_description)/urdf/gripper/gripper_joints.xacro"/>
|
||||
|
||||
<joint name="gripper_attach_joint" type="fixed">
|
||||
<origin xyz="0.0 0.0 0.0" rpy="0.0 0.0 0.0"/>
|
||||
<parent link="link_ee"/>
|
||||
<child link="base_frame"/>
|
||||
</joint>
|
||||
|
||||
</robot>
|
||||
@@ -1,41 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" xacro:version="1.0">
|
||||
|
||||
<xacro:include filename="$(find iiwa_description)/urdf/gripper/gripper_macros.xacro"/>
|
||||
<xacro:arg name="simulate" default="false"/>
|
||||
|
||||
<joint name="base_joint" type="fixed">
|
||||
<origin xyz="0.0 0.0 0.0613" rpy="0.0 0.0 0.0"/>
|
||||
<parent link="base_frame"/>
|
||||
<child link="plate"/>
|
||||
</joint>
|
||||
|
||||
<xacro:prismatic_joint jname="base_screw"
|
||||
parent="base_frame" child="screw"
|
||||
xyz="0.0 0.0 0.072" rpy="0.0 0.0 0.0"
|
||||
axis="0.0 0.0 1"
|
||||
lower="-0.007" upper="0.0"
|
||||
effort="50.0" velocity="0.05"/>
|
||||
|
||||
<xacro:mimic_revolute_joint jname="finger1_joint"
|
||||
parent="plate" child="finger1"
|
||||
xyz="0.0315 -0.0185 0.028" rpy="0.0 0.0 -2.12"
|
||||
axis="1 0.0 0"
|
||||
lower="-0.2" upper="0.07" effort="5.0" velocity="1.0" damping="0.0"
|
||||
mimic_joint="base_screw" multiplier="-50" mimic_offset="-0.2"/>
|
||||
|
||||
<xacro:mimic_revolute_joint jname="finger2_joint"
|
||||
parent="plate" child="finger2"
|
||||
xyz="-0.0315 -0.0185 0.028" rpy="0.0 0.0 2.12"
|
||||
axis="1 0.0 0"
|
||||
lower="-0.2" upper="0.07" effort="5.0" velocity="1.0" damping="0.0"
|
||||
mimic_joint="base_screw" multiplier="-50" mimic_offset="-0.2"/>
|
||||
|
||||
<xacro:mimic_revolute_joint jname="finger3_joint"
|
||||
parent="plate" child="finger3"
|
||||
xyz="0 0.037 0.028" rpy="0.0 0.0 0.0"
|
||||
axis="1 0.0 0"
|
||||
lower="-0.2" upper="0.07" effort="5.0" velocity="1.0" damping="0.0"
|
||||
mimic_joint="base_screw" multiplier="-50" mimic_offset="-0.2"/>
|
||||
|
||||
</robot>
|
||||
@@ -1,67 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" xacro:version="1.0">
|
||||
|
||||
<xacro:include filename="$(find iiwa_description)/urdf/gripper/gripper_macros.xacro"/>
|
||||
<xacro:include filename="$(find iiwa_description)/urdf/gripper/gripper_meshes.xacro"/>
|
||||
|
||||
<xacro:property name="gripper_dark_r" value="0.05"/>
|
||||
<xacro:property name="gripper_dark_g" value="0.05"/>
|
||||
<xacro:property name="gripper_dark_b" value="0.05"/>
|
||||
|
||||
<xacro:property name="gripper_alum_r" value="0.7"/>
|
||||
<xacro:property name="gripper_alum_g" value="0.7"/>
|
||||
<xacro:property name="gripper_alum_b" value="0.7"/>
|
||||
|
||||
<xacro:property name="gripper_finger_r" value="0.0"/>
|
||||
<xacro:property name="gripper_finger_g" value="0.8"/>
|
||||
<xacro:property name="gripper_finger_b" value="1.0"/>
|
||||
|
||||
<xacro:gripper_link name="base_frame"
|
||||
mass="0.3" xyz_iner="0 0 0.035"
|
||||
ixx="0.00024" ixy="0.0" ixz="0.0"
|
||||
iyy="0.00024" iyz="0.0" izz="0.00016"
|
||||
mesh="${mesh_gripper_base_frame}"
|
||||
visual_xyz="-0.021 -0.021 0.006" visual_rpy="0 0 0"
|
||||
r="${gripper_dark_r}" g="${gripper_dark_g}" b="${gripper_dark_b}" a="1.0"/>
|
||||
|
||||
<xacro:gripper_link name="plate"
|
||||
mass="0.15" xyz_iner="0 0 0"
|
||||
ixx="0.00012" ixy="0.0" ixz="0.0"
|
||||
iyy="0.00012" iyz="0.0" izz="0.00018"
|
||||
mesh="${mesh_gripper_plate}"
|
||||
visual_xyz="0 0 0" visual_rpy="0 0 0"
|
||||
r="${gripper_alum_r}" g="${gripper_alum_g}" b="${gripper_alum_b}" a="1.0"/>
|
||||
|
||||
<xacro:gripper_link name="screw"
|
||||
mass="0.03" xyz_iner="0 0 0"
|
||||
ixx="0.000024" ixy="0.0" ixz="0.0"
|
||||
iyy="0.000024" iyz="0.0" izz="0.000012"
|
||||
mesh="${mesh_gripper_screw}"
|
||||
visual_xyz="0 0 0" visual_rpy="0 0 0"
|
||||
r="${gripper_alum_r}" g="${gripper_alum_g}" b="${gripper_alum_b}" a="1.0"/>
|
||||
|
||||
<xacro:gripper_link name="finger1"
|
||||
mass="0.015" xyz_iner="0 0 0"
|
||||
ixx="0.000012" ixy="0.0" ixz="0.0"
|
||||
iyy="0.000012" iyz="0.0" izz="0.000004"
|
||||
mesh="${mesh_gripper_finger}"
|
||||
visual_xyz="0.009 -0.025 0.005" visual_rpy="0 -1.57 0"
|
||||
r="${gripper_finger_r}" g="${gripper_finger_g}" b="${gripper_finger_b}" a="1.0"/>
|
||||
|
||||
<xacro:gripper_link name="finger2"
|
||||
mass="0.015" xyz_iner="0 0 0"
|
||||
ixx="0.000012" ixy="0.0" ixz="0.0"
|
||||
iyy="0.000012" iyz="0.0" izz="0.000004"
|
||||
mesh="${mesh_gripper_finger}"
|
||||
visual_xyz="0.009 -0.025 0.005" visual_rpy="0 -1.57 0"
|
||||
r="${gripper_finger_r}" g="${gripper_finger_g}" b="${gripper_finger_b}" a="1.0"/>
|
||||
|
||||
<xacro:gripper_link name="finger3"
|
||||
mass="0.015" xyz_iner="0 0 0"
|
||||
ixx="0.000012" ixy="0.0" ixz="0.0"
|
||||
iyy="0.000012" iyz="0.0" izz="0.000004"
|
||||
mesh="${mesh_gripper_finger}"
|
||||
visual_xyz="0.009 -0.025 0.005" visual_rpy="0 -1.57 0"
|
||||
r="${gripper_finger_r}" g="${gripper_finger_g}" b="${gripper_finger_b}" a="1.0"/>
|
||||
|
||||
</robot>
|
||||
@@ -1,65 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" xacro:version="1.0">
|
||||
|
||||
<xacro:macro name="gripper_link"
|
||||
params="name mass
|
||||
ixx ixy ixz iyy iyz izz xyz_iner
|
||||
mesh visual_xyz visual_rpy
|
||||
r g b a">
|
||||
<link name="${name}">
|
||||
<inertial>
|
||||
<origin xyz="${xyz_iner}" rpy="0 0 0"/>
|
||||
<mass value="${mass}"/>
|
||||
<inertia ixx="${ixx}" ixy="${ixy}" ixz="${ixz}"
|
||||
iyy="${iyy}" iyz="${iyz}" izz="${izz}"/>
|
||||
</inertial>
|
||||
<visual>
|
||||
<origin xyz="${visual_xyz}" rpy="${visual_rpy}"/>
|
||||
<geometry>
|
||||
<mesh filename="${mesh}" scale="0.001 0.001 0.001"/>
|
||||
</geometry>
|
||||
<material name="${name}_material">
|
||||
<color rgba="${r} ${g} ${b} ${a}"/>
|
||||
</material>
|
||||
</visual>
|
||||
<collision>
|
||||
<origin xyz="${visual_xyz}" rpy="${visual_rpy}"/>
|
||||
<geometry>
|
||||
<mesh filename="${mesh}" scale="0.001 0.001 0.001"/>
|
||||
</geometry>
|
||||
</collision>
|
||||
</link>
|
||||
</xacro:macro>
|
||||
|
||||
<xacro:macro name="prismatic_joint"
|
||||
params="jname parent child xyz rpy axis lower upper effort velocity">
|
||||
<joint name="${jname}" type="prismatic">
|
||||
<origin xyz="${xyz}" rpy="${rpy}"/>
|
||||
<parent link="${parent}"/>
|
||||
<child link="${child}"/>
|
||||
<axis xyz="${axis}"/>
|
||||
<limit lower="${lower}" upper="${upper}"
|
||||
effort="${effort}" velocity="${velocity}"/>
|
||||
<dynamics damping="0.5" friction="0.1"/>
|
||||
</joint>
|
||||
</xacro:macro>
|
||||
|
||||
<xacro:macro name="mimic_revolute_joint"
|
||||
params="jname parent child xyz rpy axis
|
||||
lower upper effort velocity damping
|
||||
mimic_joint multiplier mimic_offset">
|
||||
<joint name="${jname}" type="revolute">
|
||||
<origin xyz="${xyz}" rpy="${rpy}"/>
|
||||
<parent link="${parent}"/>
|
||||
<child link="${child}"/>
|
||||
<axis xyz="${axis}"/>
|
||||
<limit lower="${lower}" upper="${upper}"
|
||||
effort="${effort}" velocity="${velocity}"/>
|
||||
<dynamics damping="${damping}" friction="0.05"/>
|
||||
<mimic joint="${mimic_joint}"
|
||||
multiplier="${multiplier}"
|
||||
offset="${mimic_offset}"/>
|
||||
</joint>
|
||||
</xacro:macro>
|
||||
|
||||
</robot>
|
||||
@@ -1,12 +0,0 @@
|
||||
<?xml version="1.0"?>
|
||||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" xacro:version="1.0">
|
||||
|
||||
<xacro:property name="gripper_pkg"
|
||||
value="package://iiwa_description/resource/meshes/gripper"/>
|
||||
|
||||
<xacro:property name="mesh_gripper_base_frame" value="${gripper_pkg}/base_frame.stl"/>
|
||||
<xacro:property name="mesh_gripper_plate" value="${gripper_pkg}/plate.stl"/>
|
||||
<xacro:property name="mesh_gripper_screw" value="${gripper_pkg}/screw.stl"/>
|
||||
<xacro:property name="mesh_gripper_finger" value="${gripper_pkg}/finger_plates.stl"/>
|
||||
|
||||
</robot>
|
||||
@@ -17,7 +17,7 @@
|
||||
<xacro:include filename="$(find iiwa_description)/urdf/links.xacro"/>
|
||||
<xacro:include filename="$(find iiwa_description)/urdf/joints.xacro"/>
|
||||
|
||||
<xacro:include filename="$(find iiwa_description)/urdf/tools/patron.xacro"/>
|
||||
<xacro:include filename="$(find iiwa_description)/urdf/tools/tool_active.xacro"/>
|
||||
|
||||
<xacro:if value="$(arg simulate)">
|
||||
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
<?xml version="1.0"?>
|
||||
<!-- AUTO-GENERATED by cobot robot-setup — do not edit manually -->
|
||||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="tool_active">
|
||||
<xacro:include filename="$(find iiwa_description)/urdf/tools/patron.xacro"/>
|
||||
</robot>
|
||||
Reference in New Issue
Block a user