Enhance IIWA Robot Configuration and Launch Files
- Updated iiwa7 URDF Xacro to include command and state interfaces for position and effort with defined limits for all joints. - Modified setting_loader.py to include new fields for command_mode and description in the RobotCfg dataclass and settings loading process. - Created iiwa.launch.py to manage the launch of the IIWA robot, integrating MoveIt configurations and RViz support. - Added iiwa_controllers.launch.py to set up the controller manager and spawner for the IIWA robot. - Introduced iiwa_hardware_interface_plugin.xml to define the hardware interface for the KUKA IIWA 7 robot. - Added iiwa7_fri.urdf.xacro to support FRI (Fast Robot Interface) with appropriate command and state interfaces for each joint.
This commit is contained in:
@@ -1,4 +1,8 @@
|
||||
<?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
|
||||
-->
|
||||
<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-->
|
||||
@@ -6,6 +10,7 @@
|
||||
<!--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"/>
|
||||
@@ -14,7 +19,9 @@
|
||||
<joint name="joint6"/>
|
||||
<joint name="joint7"/>
|
||||
</group>
|
||||
|
||||
<group name="hand">
|
||||
<link name="link_ee"/>
|
||||
</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"/>
|
||||
@@ -25,7 +32,6 @@
|
||||
<joint name="joint6" value="0"/>
|
||||
<joint name="joint7" value="0"/>
|
||||
</group_state>
|
||||
|
||||
<group_state name="work" group="iiwa_arm">
|
||||
<joint name="joint1" value="0"/>
|
||||
<joint name="joint2" value="0"/>
|
||||
@@ -35,12 +41,14 @@
|
||||
<joint name="joint6" value="1.57"/>
|
||||
<joint name="joint7" value="0"/>
|
||||
</group_state>
|
||||
|
||||
<!--END EFFECTOR: Purpose: Represent information about an end effector.-->
|
||||
<end_effector name="hand" parent_link="link7" group="hand"/>
|
||||
<!--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"/>
|
||||
<disable_collisions link1="base_link" link2="link4" reason="Never"/>
|
||||
<disable_collisions link1="base_link" link2="link7" reason="Never"/>
|
||||
<disable_collisions link1="link1" link2="link2" reason="Adjacent"/>
|
||||
<disable_collisions link1="link1" link2="link3" reason="Never"/>
|
||||
<disable_collisions link1="link1" link2="link4" reason="Never"/>
|
||||
@@ -62,4 +70,4 @@
|
||||
<disable_collisions link1="link5" link2="link6" reason="Adjacent"/>
|
||||
<disable_collisions link1="link5" link2="link7" reason="Never"/>
|
||||
<disable_collisions link1="link6" link2="link7" reason="Adjacent"/>
|
||||
</robot>
|
||||
</robot>
|
||||
@@ -1,6 +1,6 @@
|
||||
controller_manager:
|
||||
ros__parameters:
|
||||
update_rate: 100
|
||||
update_rate: 200
|
||||
|
||||
joint_state_broadcaster:
|
||||
type: "joint_state_broadcaster/JointStateBroadcaster"
|
||||
@@ -8,6 +8,10 @@ controller_manager:
|
||||
iiwa_arm_controller:
|
||||
type: "joint_trajectory_controller/JointTrajectoryController"
|
||||
|
||||
forward_torque_controller:
|
||||
type: "forward_command_controller/ForwardCommandController"
|
||||
|
||||
# Основной контроллер - плавное движение по траектории
|
||||
iiwa_arm_controller:
|
||||
ros__parameters:
|
||||
joints:
|
||||
@@ -17,14 +21,51 @@ iiwa_arm_controller:
|
||||
- joint4
|
||||
- joint5
|
||||
- joint6
|
||||
- joint7
|
||||
- joint7
|
||||
|
||||
command_interfaces:
|
||||
- position
|
||||
|
||||
state_interfaces:
|
||||
- position
|
||||
- velocity
|
||||
|
||||
allow_partial_joints_goal: false
|
||||
# Интерполяция между точками траектории
|
||||
interpolate_from_desired_state: true
|
||||
|
||||
# Разрешить неполные goals
|
||||
allow_partial_joints_goal: false
|
||||
|
||||
# Разрешить ненулевую скорость в конечной точке траектории
|
||||
# true = плавные составные движения
|
||||
# false = полная остановка в каждой точке (безопаснее)
|
||||
allow_nonzero_velocity_at_trajectory_end: true
|
||||
|
||||
state_publish_rate: 100.0 # Гц публикации /joint_states
|
||||
action_monitor_rate: 20.0 # Гц мониторинга action goal
|
||||
|
||||
# Допуски — насколько точно робот должен попасть в цель
|
||||
# constraints:
|
||||
# stopped_velocity_tolerance: 0.01 # рад/с — считаем остановившимся
|
||||
# goal_time: 1.0 # сек — доп. время на достижение цели
|
||||
# joint1: { trajectory: 0, goal: 0.01 }
|
||||
# joint2: { trajectory: 0, goal: 0.01 }
|
||||
# joint3: { trajectory: 0, goal: 0.01 }
|
||||
# joint4: { trajectory: 0, goal: 0.01 }
|
||||
# joint5: { trajectory: 0, goal: 0.01 }
|
||||
# joint6: { trajectory: 0, goal: 0.01 }
|
||||
# joint7: { trajectory: 0, goal: 0.01 }
|
||||
|
||||
# Torque контроллер - прямое управление моментом
|
||||
# Активировать только при command_mode:=torque в launch файле
|
||||
forward_torque_controller:
|
||||
ros__parameters:
|
||||
joints:
|
||||
- joint1
|
||||
- joint2
|
||||
- joint3
|
||||
- joint4
|
||||
- joint5
|
||||
- joint6
|
||||
- joint7
|
||||
interface_name: effort
|
||||
@@ -51,7 +51,7 @@ Visualization Manager:
|
||||
Class: moveit_rviz_plugin/MotionPlanning
|
||||
Enabled: true
|
||||
Move Group Namespace: ""
|
||||
MoveIt_Allow_Approximate_IK: false
|
||||
MoveIt_Allow_Approximate_IK: true
|
||||
MoveIt_Allow_External_Program: false
|
||||
MoveIt_Allow_Replanning: false
|
||||
MoveIt_Allow_Sensor_Positioning: false
|
||||
@@ -147,7 +147,7 @@ Visualization Manager:
|
||||
Colliding Link Color: 255; 0; 0
|
||||
Goal State Alpha: 1
|
||||
Goal State Color: 250; 128; 0
|
||||
Interactive Marker Size: 0
|
||||
Interactive Marker Size: 0.3
|
||||
Joint Violation Color: 255; 0; 255
|
||||
Planning Group: iiwa_arm
|
||||
Query Goal State: true
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
robot:
|
||||
name: "iiwa7"
|
||||
ip: "192.168.21.144"
|
||||
port: 3000
|
||||
ip: "192.170.10.2"
|
||||
port: 30200
|
||||
command_mode: "position" # torque, position
|
||||
description: pkg://iiwa_description/urdf/iiwa7_fri.urdf.xacro
|
||||
|
||||
|
||||
digital_twin:
|
||||
webots:
|
||||
|
||||
Reference in New Issue
Block a user