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,32 +1,11 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--This does not replace URDF, and is not an extension of URDF.
|
||||
This is a format for representing semantic information about the robot structure.
|
||||
A URDF file must exist for this robot as well, where the joints and the links that are referenced are defined
|
||||
-->
|
||||
<!-- AUTO-GENERATED by cobot robot-setup — do not edit manually -->
|
||||
<robot name="iiwa7">
|
||||
<!--GROUPS: Representation of a set of joints and links. This can be useful for specifying DOF to plan for, defining arms, end effectors, etc-->
|
||||
<!--LINKS: When a link is specified, the parent joint of that link (if it exists) is automatically included-->
|
||||
<!--JOINTS: When a joint is specified, the child link of that joint (which will always exist) is automatically included-->
|
||||
<!--CHAINS: When a chain is specified, all the links along the chain (including endpoints) are included in the group. Additionally, all the joints that are parents to included links are also included. This means that joints along the chain and the parent joint of the base link are included in the group-->
|
||||
<!--SUBGROUPS: Groups can also be formed by referencing to already defined group names-->
|
||||
|
||||
<group name="iiwa_arm">
|
||||
<!-- <joint name="world_base_joint"/>
|
||||
<joint name="joint1"/>
|
||||
<joint name="joint2"/>
|
||||
<joint name="joint3"/>
|
||||
<joint name="joint4"/>
|
||||
<joint name="joint5"/>
|
||||
<joint name="joint6"/>
|
||||
<joint name="joint7"/>
|
||||
<joint name="tools_joint"/>
|
||||
<joint name="tool"/>
|
||||
<joint name="camera_holder_patron"/>
|
||||
<joint name="camera_holder_corner"/>
|
||||
<joint name="camera_corner_camera"/>
|
||||
<joint name="camera_hand_to_optical"/> -->
|
||||
<chain base_link="base_link" tip_link="patron"/>
|
||||
</group>
|
||||
<!--GROUP STATES: Purpose: Define a named state for a particular group, in terms of joint values. This is useful to define states like 'folded arms'-->
|
||||
|
||||
<group_state name="home" group="iiwa_arm">
|
||||
<joint name="joint1" value="0"/>
|
||||
<joint name="joint2" value="0"/>
|
||||
@@ -54,9 +33,9 @@
|
||||
<joint name="joint6" value="0"/>
|
||||
<joint name="joint7" value="0"/>
|
||||
</group_state>
|
||||
<!--END EFFECTOR: Purpose: Represent information about an end effector.-->
|
||||
|
||||
<end_effector name="patron" parent_link="patron" group="iiwa_arm"/>
|
||||
<!--DISABLE COLLISIONS: By default it is assumed that any link of the robot could potentially come into collision with any other link in the robot. This tag disables collision checking between a specified pair of links. -->
|
||||
|
||||
<disable_collisions link1="base_link" link2="link1" reason="Adjacent"/>
|
||||
<disable_collisions link1="base_link" link2="link2" reason="Never"/>
|
||||
<disable_collisions link1="base_link" link2="link3" reason="Never"/>
|
||||
@@ -67,26 +46,27 @@
|
||||
<disable_collisions link1="link1" link2="link5" reason="Never"/>
|
||||
<disable_collisions link1="link1" link2="link6" reason="Never"/>
|
||||
<disable_collisions link1="link1" link2="link7" reason="Never"/>
|
||||
<disable_collisions link1="link1" link2="patron" reason="Never"/>
|
||||
<disable_collisions link1="link2" link2="link3" reason="Adjacent"/>
|
||||
<disable_collisions link1="link2" link2="link4" reason="Never"/>
|
||||
<disable_collisions link1="link2" link2="link5" reason="Never"/>
|
||||
<disable_collisions link1="link2" link2="link6" reason="Never"/>
|
||||
<disable_collisions link1="link2" link2="link7" reason="Never"/>
|
||||
<disable_collisions link1="link2" link2="patron" reason="Never"/>
|
||||
<disable_collisions link1="link3" link2="link4" reason="Adjacent"/>
|
||||
<disable_collisions link1="link3" link2="link5" reason="Never"/>
|
||||
<disable_collisions link1="link3" link2="link6" reason="Never"/>
|
||||
<disable_collisions link1="link3" link2="link7" reason="Never"/>
|
||||
<disable_collisions link1="link3" link2="patron" reason="Never"/>
|
||||
<disable_collisions link1="link4" link2="link5" reason="Adjacent"/>
|
||||
<disable_collisions link1="link4" link2="link6" reason="Never"/>
|
||||
<disable_collisions link1="link4" link2="link7" reason="Never"/>
|
||||
<disable_collisions link1="link4" link2="patron" reason="Never"/>
|
||||
<disable_collisions link1="link5" link2="link6" reason="Adjacent"/>
|
||||
<disable_collisions link1="link5" link2="link7" reason="Never"/>
|
||||
<disable_collisions link1="link5" link2="patron" reason="Never"/>
|
||||
<disable_collisions link1="link6" link2="link7" reason="Adjacent"/>
|
||||
|
||||
<disable_collisions link1="link1" link2="patron" reason="Never"/>
|
||||
<disable_collisions link1="link2" link2="patron" reason="Never"/>
|
||||
<disable_collisions link1="link3" link2="patron" reason="Never"/>
|
||||
<disable_collisions link1="link4" link2="patron" reason="Never"/>
|
||||
<disable_collisions link1="link5" link2="patron" reason="Never"/>
|
||||
<disable_collisions link1="link6" link2="patron" reason="Never"/>
|
||||
<disable_collisions link1="link7" link2="patron" reason="Adjacent"/>
|
||||
<disable_collisions link1="link7" link2="camera_holder" reason="Adjacent"/>
|
||||
@@ -119,4 +99,4 @@
|
||||
<disable_collisions link1="camera_hand" link2="link2" reason="Never"/>
|
||||
<disable_collisions link1="camera_hand" link2="link1" reason="Never"/>
|
||||
<disable_collisions link1="camera_hand" link2="base_link" reason="Never"/>
|
||||
</robot>
|
||||
</robot>
|
||||
|
||||
@@ -36,6 +36,9 @@ controller:
|
||||
moveit_cpp: pkg://iiwa_config/config/moveit/moveit_cpp.yaml
|
||||
|
||||
|
||||
tool:
|
||||
active: "patron" # Активный инструмент: none | patron | ... (из tools.yaml)
|
||||
|
||||
planning:
|
||||
pose_link: "tcp" # TCP-линк для декартовых целей
|
||||
planning_group: "iiwa_arm" # Группа планирования из SRDF
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
# Реестр инструментов / захватов для KUKA iiwa7.
|
||||
#
|
||||
# Поля каждого инструмента:
|
||||
# label — название, отображаемое в меню robot-setup
|
||||
# xacro — путь до xacro-файла инструмента (xacro $(find ...) синтаксис);
|
||||
# null = без захвата (голый фланец)
|
||||
# tip_link — конец кинематической цепочки в SRDF (<chain tip_link="..."/>)
|
||||
# tcp_link — фрейм TCP для Декартовых целей (pose_link в planning)
|
||||
# collisions — пары disable_collisions специфичные для этого инструмента;
|
||||
# базовые пары робота (link1..link7) добавляются автоматически
|
||||
|
||||
tools:
|
||||
|
||||
none:
|
||||
label: "Без захвата"
|
||||
xacro: null
|
||||
tip_link: "link_ee"
|
||||
tcp_link: "link_ee"
|
||||
collisions: []
|
||||
|
||||
patron:
|
||||
label: "patron"
|
||||
xacro: "$(find iiwa_description)/urdf/tools/patron.xacro"
|
||||
tip_link: "patron"
|
||||
tcp_link: "tcp"
|
||||
collisions:
|
||||
- [link1, patron, Never]
|
||||
- [link2, patron, Never]
|
||||
- [link3, patron, Never]
|
||||
- [link4, patron, Never]
|
||||
- [link5, patron, Never]
|
||||
- [link6, patron, Never]
|
||||
- [link7, patron, Adjacent]
|
||||
- [link7, camera_holder, Adjacent]
|
||||
- [link6, camera_holder, Never]
|
||||
- [link5, camera_holder, Never]
|
||||
- [link4, camera_holder, Never]
|
||||
- [link3, camera_holder, Never]
|
||||
- [link2, camera_holder, Never]
|
||||
- [link1, camera_holder, Never]
|
||||
- [base_link, camera_holder, Never]
|
||||
- [camera_holder, patron, Adjacent]
|
||||
- [camera_holder, camera_corner, Adjacent]
|
||||
- [camera_corner, patron, Never]
|
||||
- [camera_corner, link7, Never]
|
||||
- [camera_corner, link6, Never]
|
||||
- [camera_corner, link5, Never]
|
||||
- [camera_corner, link4, Never]
|
||||
- [camera_corner, link3, Never]
|
||||
- [camera_corner, link2, Never]
|
||||
- [camera_corner, link1, Never]
|
||||
- [camera_corner, base_link, Never]
|
||||
- [camera_corner, camera_hand, Adjacent]
|
||||
- [camera_hand, camera_holder, Never]
|
||||
- [camera_hand, patron, Never]
|
||||
- [camera_hand, link7, Never]
|
||||
- [camera_hand, link6, Never]
|
||||
- [camera_hand, link5, Never]
|
||||
- [camera_hand, link4, Never]
|
||||
- [camera_hand, link3, Never]
|
||||
- [camera_hand, link2, Never]
|
||||
- [camera_hand, link1, Never]
|
||||
- [camera_hand, base_link, Never]
|
||||
|
||||
Reference in New Issue
Block a user