initial forking commit

This commit is contained in:
2025-02-22 22:37:34 +09:00
commit ee5f8b145e
106 changed files with 13922 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="cobot_pump">
<xacro:include filename="$(find franka_description)/end_effectors/common/utils.xacro" />
<xacro:include filename="$(find franka_description)/end_effectors/common/ee_with_one_link.xacro"/>
<xacro:include filename="$(find franka_description)/end_effectors/cobot_pump/cobot_pump_arguments.xacro"/>
<xacro:ee_with_one_link connected_to="$(arg special_connection)"
arm_id="$(arg arm_id)"
ee_id="$(arg ee_id)"
ee_inertials="${xacro.load_yaml('$(find franka_description)/end_effectors/$(arg ee_id)/inertials.yaml')}"
rpy_ee="$(arg rpy_ee)"
xyz_ee="$(arg xyz_ee)"
tcp_xyz="$(arg tcp_xyz)"
tcp_rpy="$(arg tcp_rpy)"
safety_distance="$(arg safety_distance)"
gazebo="$(arg gazebo)"
description_pkg="$(arg description_pkg)"
with_sc="$(arg with_sc)">
</xacro:ee_with_one_link>
</robot>

View File

@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="utf-8"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<!-- Name for the robot -->
<xacro:arg name="arm_id" default="fp3" />
<!-- End-effector id" -->
<xacro:arg name="ee_id" default="cobot_pump" />
<!-- Where is the end-effector connected to, if different from the robot flange? -->
<xacro:arg name="special_connection" default="" />
<!-- Should self-collision be enabled? -->
<xacro:arg name="with_sc" default="false" />
<!-- Position offset between ee and parent frame -->
<xacro:arg name="xyz_ee" default="0 0 0" />
<!-- Rotation offset between ee and parent frame -->
<xacro:arg name="rpy_ee" default= "0 0 0" />
<!-- Position offset between ee frame and tcp frame -->
<xacro:arg name="tcp_xyz" default="0 0 0.105" />
<!-- Rotation offset between ee frame and tcp frame -->
<xacro:arg name="tcp_rpy" default="0 0 0" />
<!-- Safety distance for the collision capsules -->
<xacro:arg name="safety_distance" default="0.03" />
<!-- Is the robot being simulated in gazebo? -->
<xacro:arg name="gazebo" default="false" />
<!-- Name of the description package -->
<xacro:arg name="description_pkg" default="franka_description" />
</robot>

View File

@@ -0,0 +1,13 @@
cobot_pump:
origin:
xyz: 0 0 0.063
rpy: 0 0 0
mass: 1.01
inertia:
xx: 0.001
yy: 0.001
zz: 0.001
xy: 0
xz: 0
yz: 0

View File

@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="utf-8"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="ee_with_one_link">
<!-- safety_distance: Minimum safety distance in [m] by which the collision volumes are expanded and which is enforced during robot motions -->
<xacro:macro name="ee_with_one_link" params="connected_to:='' arm_id arm_prefix:='' ee_id ee_inertials rpy_ee:='0 0 0' xyz_ee:='0 0 0' tcp_xyz:='0 0 0' tcp_rpy:='0 0 0' safety_distance:=0 gazebo:=false description_pkg:=franka_description with_sc:=false">
<xacro:property name="ee_prefix" default="robot_"/>
<xacro:unless value="${arm_id == ''}">
<xacro:property name="ee_prefix" value="${arm_prefix}${arm_id}_" />
</xacro:unless>
<xacro:unless value="${connected_to == ''}">
<joint name="${ee_prefix}${ee_id}_joint" type="fixed">
<parent link="${connected_to}" />
<child link="${ee_prefix}${ee_id}" />
<origin xyz="${xyz_ee}" rpy="${rpy_ee}" />
</joint>
</xacro:unless>
<xacro:ee_link_with_sc name="${ee_id}" gazebo="${gazebo}" with_sc="${with_sc}">
<self_collision_geometries>
<xacro:collision_capsule xyz="0 0 0.04" direction="y" radius="${0.04+safety_distance}" length="0.1" />
<xacro:collision_capsule xyz="0 0 0.10" direction="y" radius="${0.02+safety_distance}" length="0.1" />
</self_collision_geometries>
</xacro:ee_link_with_sc>
<!-- Define the ${ee_id}_tcp frame -->
<link name="${ee_prefix}${ee_id}_tcp" />
<joint name="${ee_prefix}${ee_id}_tcp_joint" type="fixed">
<origin xyz="${tcp_xyz}" rpy="${tcp_rpy}" />
<parent link="${ee_prefix}${ee_id}" />
<child link="${ee_prefix}${ee_id}_tcp" />
</joint>
</xacro:macro>
</robot>

View File

@@ -0,0 +1,126 @@
<?xml version="1.0" encoding="utf-8"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="hand">
<!-- safety_distance: Minimum safety distance in [m] by which the collision volumes are expanded and which is enforced during robot motions -->
<xacro:macro name="franka_hand" params="connected_to:='' arm_id arm_prefix:='' ee_id ee_inertials rpy_ee:='0 0 0' xyz_ee:='0 0 0' tcp_xyz:='0 0 0.1034' tcp_rpy:='0 0 0' safety_distance:=0 gazebo:=false description_pkg:=franka_description with_sc:=false">
<xacro:property name="ee_prefix" default="robot_"/>
<xacro:unless value="${arm_id == ''}">
<xacro:property name="ee_prefix" value="${arm_prefix}${arm_id}_" />
</xacro:unless>
<xacro:unless value="${connected_to == ''}">
<joint name="${ee_prefix}hand_joint" type="fixed">
<parent link="${connected_to}" />
<child link="${ee_prefix}hand" />
<origin xyz="${xyz_ee}" rpy="${rpy_ee}" />
</joint>
</xacro:unless>
<xacro:ee_link_with_sc name="hand" gazebo="${gazebo}" with_sc="${with_sc}">
<self_collision_geometries>
<xacro:collision_capsule xyz="0 0 0.04" direction="y" radius="${0.04+safety_distance}" length="0.1" />
<xacro:collision_capsule xyz="0 0 0.10" direction="y" radius="${0.02+safety_distance}" length="0.1" />
</self_collision_geometries>
</xacro:ee_link_with_sc>
<!-- Define the hand_tcp frame -->
<link name="${ee_prefix}hand_tcp" />
<joint name="${ee_prefix}hand_tcp_joint" type="fixed">
<origin xyz="${tcp_xyz}" rpy="${tcp_rpy}" />
<parent link="${ee_prefix}hand" />
<child link="${ee_prefix}hand_tcp" />
</joint>
<link name="${ee_prefix}leftfinger">
<visual name="${ee_prefix}leftfinger_visual">
<geometry>
<mesh filename="package://${description_pkg}/meshes/robot_ee/${ee_id}/visual/finger.dae" />
</geometry>
</visual>
<!-- screw mount -->
<collision>
<origin xyz="0 18.5e-3 11e-3" rpy="0 0 0" />
<geometry>
<box size="22e-3 15e-3 20e-3" />
</geometry>
</collision>
<!-- cartriage sledge -->
<collision>
<origin xyz="0 6.8e-3 2.2e-3" rpy="0 0 0" />
<geometry>
<box size="22e-3 8.8e-3 3.8e-3" />
</geometry>
</collision>
<!-- diagonal finger -->
<collision>
<origin xyz="0 15.9e-3 28.35e-3" rpy="${pi/6} 0 0" />
<geometry>
<box size="17.5e-3 7e-3 23.5e-3" />
</geometry>
</collision>
<!-- rubber tip with which to grasp -->
<collision>
<origin xyz="0 7.58e-3 45.25e-3" rpy="0 0 0" />
<geometry>
<box size="17.5e-3 15.2e-3 18.5e-3" />
</geometry>
</collision>
<xacro:if value="${gazebo}">
<xacro:ee-inertials name="leftfinger" />
</xacro:if>
</link>
<link name="${ee_prefix}rightfinger">
<visual name="${ee_prefix}rightfinger_visual">
<origin xyz="0 0 0" rpy="0 0 ${pi}" />
<geometry>
<mesh filename="package://${description_pkg}/meshes/robot_ee/${ee_id}/visual/finger.dae" />
</geometry>
</visual>
<!-- screw mount -->
<collision>
<origin xyz="0 -18.5e-3 11e-3" rpy="0 0 0" />
<geometry>
<box size="22e-3 15e-3 20e-3" />
</geometry>
</collision>
<!-- cartriage sledge -->
<collision>
<origin xyz="0 -6.8e-3 2.2e-3" rpy="0 0 0" />
<geometry>
<box size="22e-3 8.8e-3 3.8e-3" />
</geometry>
</collision>
<!-- diagonal finger -->
<collision>
<origin xyz="0 -15.9e-3 28.35e-3" rpy="${-pi/6} 0 0" />
<geometry>
<box size="17.5e-3 7e-3 23.5e-3" />
</geometry>
</collision>
<!-- rubber tip with which to grasp -->
<collision>
<origin xyz="0 -7.58e-3 45.25e-3" rpy="0 0 0" />
<geometry>
<box size="17.5e-3 15.2e-3 18.5e-3" />
</geometry>
</collision>
<xacro:if value="${gazebo}">
<xacro:ee-inertials name="rightfinger" />
</xacro:if>
</link>
<joint name="${ee_prefix}finger_joint1" type="prismatic">
<parent link="${ee_prefix}hand" />
<child link="${ee_prefix}leftfinger" />
<origin xyz="0 0 0.0584" rpy="0 0 0" />
<axis xyz="0 1 0" />
<limit effort="100" lower="0.0" upper="0.04" velocity="0.2" />
<dynamics damping="0.3" />
</joint>
<joint name="${ee_prefix}finger_joint2" type="prismatic">
<parent link="${ee_prefix}hand" />
<child link="${ee_prefix}rightfinger" />
<origin xyz="0 0 0.0584" rpy="0 0 0" />
<axis xyz="0 -1 0" />
<limit effort="100" lower="0.0" upper="0.04" velocity="0.2" />
<mimic joint="${ee_prefix}finger_joint1" />
<dynamics damping="0.3" />
</joint>
</xacro:macro>
</robot>

View File

@@ -0,0 +1,111 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<!-- ============================================================== -->
<!-- Macro to add an <inertial> tag based on yaml-load properties -->
<!-- -->
<!-- name: Name of the end_effector (without prefix) -->
<!-- ee_inertials: Dictionary of inertia properties (see inertial.yaml) -->
<!-- ============================================================== -->
<xacro:macro name="ee-inertials" params="name ee_inertials:=^">
<xacro:unless value="${name in ee_inertials}">${xacro.warning('No inertia properties defined for: ' + name)}</xacro:unless>
<xacro:if value="${name in ee_inertials}">
<!-- Access inertia properties of link 'name' -->
<xacro:property name="link_inertials" value="${ee_inertials[name]}" lazy_eval="false" />
<inertial>
<origin rpy="${link_inertials.origin.rpy}" xyz="${link_inertials.origin.xyz}" />
<mass value="${link_inertials.mass}" />
<xacro:if value="${'inertia' in link_inertials}">
<xacro:property name="I" value="${link_inertials.inertia}" />
<inertia ixx="${I.xx}" ixy="${I.xy}" ixz="${I.xz}" iyy="${I.yy}" iyz="${I.yz}" izz="${I.zz}" />
</xacro:if>
</inertial>
</xacro:if>
</xacro:macro>
<!-- ========================================================== -->
<!-- Macro to add a single link, both with -->
<!-- * detailed meshes for environmental collision checking -->
<!-- * and coarse geometry models for self-collision checking -->
<!-- (only if 'gazebo' param is set) -->
<!-- -->
<!-- name: Name of the end-effector (without prefix) -->
<!-- rpy: Rotation of the *_sc link relative to parent [rad] -->
<!-- self_collision_geometries: self <collision> models -->
<!-- ========================================================== -->
<xacro:macro name="ee_link_with_sc" params="name prefix=${ee_prefix} rpy:='0 0 0' **self_collision_geometries gazebo:=false with_sc:=false">
<!-- sub-link defining detailed meshes for collision with environment -->
<link name="${prefix}${name}">
<visual name="${prefix}${name}_visual">
<geometry>
<mesh filename="package://${description_pkg}/meshes/robot_ee/${ee_id}/visual/${name}.dae" />
</geometry>
</visual>
<collision name="${prefix}${name}_collision">
<geometry>
<mesh filename="package://franka_description/meshes/robot_ee/${ee_id}/collision/${name}.stl" />
</geometry>
</collision>
<xacro:ee-inertials name="${name}" />
</link>
<!-- sub-link defining coarse geometries of real end-effector's internal self-collision -->
<xacro:if value="${with_sc}">
<link name="${prefix}${name}_sc">
<xacro:unless value="${gazebo}">
<xacro:insert_block name="self_collision_geometries" />
</xacro:unless>
</link>
<!-- fixed joint between both sub-links -->
<joint name="${prefix}${name}_sc_joint" type="fixed">
<origin rpy="${rpy}" />
<parent link="${prefix}${name}" />
<child link="${prefix}${name}_sc" />
</joint>
</xacro:if>
</xacro:macro>
<!-- =========================================================== -->
<!-- Add a <collision> tag with a capsule, made from a cylinder -->
<!-- with two spheres at its caps. The capsule will always be -->
<!-- aligned with the axis of 'direction' you pass along. -->
<!-- -->
<!-- radius: Radii of both the cylinder and both spheres [m] -->
<!-- length: Length of the cylinder/distance between the centers -->
<!-- of the spheres. NOT overall length of capsule! -->
<!-- xyz: Position of the center of the capsule/cylinder -->
<!-- direction: One of { x, y, z, -x, -y, -z } -->
<!-- =========================================================== -->
<xacro:macro name="collision_capsule" params="radius length xyz:='0 0 0' direction:='z'">
<xacro:property name="r" value="${pi/2.0 if 'y' in direction else 0}" />
<xacro:property name="p" value="${pi/2.0 if 'x' in direction else 0}" />
<xacro:property name="y" value="0" />
<xacro:property name="x" value="${xyz.split(' ')[0]}" />
<xacro:property name="y" value="${xyz.split(' ')[1]}" />
<xacro:property name="z" value="${xyz.split(' ')[2]}" />
<!-- Sphere center offsets from center of cylinder -->
<xacro:property name="sx" value="${length / 2.0 if 'x' in direction else 0}" />
<xacro:property name="sy" value="${length / 2.0 if 'y' in direction else 0}" />
<xacro:property name="sz" value="${length / 2.0 if 'z' in direction else 0}" />
<collision>
<origin xyz="${x} ${y} ${z}" rpy="${r} ${p} ${y}"/>
<geometry>
<cylinder radius="${radius}" length="${length}" />
</geometry>
</collision>
<collision>
<origin xyz="${x+sx} ${y+sy} ${z+sz}" />
<geometry>
<sphere radius="${radius}" />
</geometry>
</collision>
<collision>
<origin xyz="${x-sx} ${y-sy} ${z-sz}" />
<geometry>
<sphere radius="${radius}" />
</geometry>
</collision>
</xacro:macro>
</robot>

View File

@@ -0,0 +1,21 @@
<?xml version="1.0" encoding="utf-8"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="franka_hand">
<xacro:include filename="$(find franka_description)/end_effectors/common/utils.xacro" />
<xacro:include filename="$(find franka_description)/end_effectors/common/franka_hand.xacro"/>
<xacro:include filename="$(find franka_description)/end_effectors/franka_hand/franka_hand_arguments.xacro"/>
<xacro:franka_hand connected_to="$(arg special_connection)"
arm_id="$(arg arm_id)"
ee_id="$(arg ee_id)_$(arg ee_color)"
ee_inertials="${xacro.load_yaml('$(find franka_description)/end_effectors/$(arg ee_id)/inertials.yaml')}"
rpy_ee="$(arg rpy_ee)"
xyz_ee="$(arg xyz_ee)"
tcp_xyz="$(arg tcp_xyz)"
tcp_rpy="$(arg tcp_rpy)"
safety_distance="$(arg safety_distance)"
gazebo="$(arg gazebo)"
description_pkg="$(arg description_pkg)"
with_sc="$(arg with_sc)">
</xacro:franka_hand>
</robot>

View File

@@ -0,0 +1,40 @@
<?xml version="1.0" encoding="utf-8"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<!-- Name for the robot -->
<xacro:arg name="arm_id" default="fr3" />
<!-- End-effector id" -->
<xacro:arg name="ee_id" default="franka_hand" />
<!-- End-effector color" -->
<xacro:arg name="ee_color" default="white" />
<!-- Where is the end-effector connected to, if different from the robot flange? -->
<xacro:arg name="special_connection" default="" />
<!-- Should self-collision be enabled? -->
<xacro:arg name="with_sc" default="false" />
<!-- Position offset between ee and parent frame -->
<xacro:arg name="xyz_ee" default="0 0 0" />
<!-- Rotation offset between ee and parent frame -->
<xacro:arg name="rpy_ee" default= "0 0 ${-pi/4}" />
<!-- Position offset between ee frame and tcp frame -->
<xacro:arg name="tcp_xyz" default="0 0 0.1034" />
<!-- Rotation offset between ee frame and tcp frame -->
<xacro:arg name="tcp_rpy" default="0 0 0" />
<!-- Safety distance for the collision capsules -->
<xacro:arg name="safety_distance" default="0.03" />
<!-- Is the robot being simulated in gazebo? -->
<xacro:arg name="gazebo" default="false" />
<!-- Name of the description package -->
<xacro:arg name="description_pkg" default="franka_description" />
</robot>

View File

@@ -0,0 +1,26 @@
hand:
origin:
xyz: -0.01 0 0.03
rpy: 0 0 0
mass: 0.73
inertia:
xx: 0.001
yy: 0.0025
zz: 0.0017
xy: 0
xz: 0
yz: 0
leftfinger: &finger
origin:
xyz: 0 0 0
rpy: 0 0 0
mass: 0.015
inertia:
xx: 2.3749999999999997e-06
yy: 2.3749999999999997e-06
zz: 7.5e-07
xy: 0
xz: 0
yz: 0
rightfinger: *finger