forked from xArm-Developer/xarm_ros
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathxarm7_with_vacuum_gripper.xacro
25 lines (21 loc) · 1.39 KB
/
xarm7_with_vacuum_gripper.xacro
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?xml version='1.0' encoding='utf-8'?>
<robot xmlns:xacro="http://ros.org/wiki/xacro" name="xarm7">
<xacro:arg name="prefix" default=""/>
<xacro:arg name="ros_namespace" default="xarm"/>
<xacro:arg name="limited" default="false"/>
<xacro:arg name="effort_control" default="false"/>
<xacro:arg name="velocity_control" default="false"/>
<!-- To add realsense d435i and vacuum gripper, set 'add_realsense_d435i' = true -->
<xacro:arg name="add_realsense_d435i" default="false"/>
<!-- load xarm7 robot -->
<xacro:include filename="$(find xarm_description)/urdf/xarm7_robot_macro.xacro" />
<!-- Attach gripper -->
<xacro:include filename="$(find xarm_description)/urdf/xarm_vacuum_gripper.urdf.xacro" />
<xacro:xarm7_robot prefix="$(arg prefix)" namespace="$(arg ros_namespace)" limited="$(arg limited)" effort_control="$(arg effort_control)" velocity_control="$(arg velocity_control)" rs_d435i="$(arg add_realsense_d435i)"/>
<xacro:if value="$(arg add_realsense_d435i)">
<xacro:xarm_vacuum_gripper_urdf attach_to="$(arg prefix)link_eef" xyz="0 0 0.003" effort_control="$(arg effort_control)" velocity_control="$(arg velocity_control)" />
</xacro:if>
<xacro:unless value="$(arg add_realsense_d435i)">
<xacro:xarm_vacuum_gripper_urdf attach_to="$(arg prefix)link_eef" effort_control="$(arg effort_control)" velocity_control="$(arg velocity_control)" />
</xacro:unless>
</robot>