Skip to content

Commit

Permalink
test launc file with fake hw
Browse files Browse the repository at this point in the history
  • Loading branch information
Aron Svastits committed Nov 10, 2023
1 parent 73c410c commit d367933
Show file tree
Hide file tree
Showing 28 changed files with 82 additions and 791 deletions.
1 change: 1 addition & 0 deletions kuka_agilus_support/launch/test_kr6_r700-sixx.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def generate_launch_description():
"urdf", "kr6_r700-sixx.urdf.xacro"]
),
" ",
"use_fake_hardware:=true",
]
)
robot_description = {'robot_description': robot_description_content}
Expand Down
1 change: 1 addition & 0 deletions kuka_agilus_support/launch/test_kr6_r900-sixx.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def generate_launch_description():
"urdf", "kr6_r700-sixx.urdf.xacro"]
),
" ",
"use_fake_hardware:=true",
]
)
robot_description = {'robot_description': robot_description_content}
Expand Down
10 changes: 10 additions & 0 deletions kuka_agilus_support/urdf/kr6_r700-sixx.urdf.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="kr6_r700-sixx">
<!-- Import urdf file -->
<xacro:include filename="$(find kuka_agilus_support)/urdf/kr6_r700-sixx_macro.xacro"/>

<!-- Read additional arguments -->
<xacro:arg name="use_fake_hardware" default="false" />

<xacro:kuka_kr6_r700-sixx_robot prefix="" use_fake_hardware="$(arg use_fake_hardware)"/>
</robot>
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
<xacro:include filename="$(find kuka_agilus_support)/urdf/kr_agilus_ros2_control.xacro" />
<xacro:include filename="$(find kuka_agilus_support)/urdf/kr_agilus_transmission.xacro" />

<xacro:macro name="kuka_kr6_r700-sixx_robot" params="prefix client_ip client_port use_fake_hardware">
<xacro:macro name="kuka_kr6_r700-sixx_robot" params="prefix use_fake_hardware">
<!-- ros2 control instance -->
<xacro:kuka_agilus_ros2_control
name="kr6_r700-sixx"
prefix="${prefix}"
client_ip="${client_ip}"
client_port="${client_port}"
use_fake_hardware="${use_fake_hardware}" />

<link name="${prefix}base_link"/>
Expand Down
19 changes: 0 additions & 19 deletions kuka_agilus_support/urdf/kr6_r700_sixx.urdf.xacro

This file was deleted.

10 changes: 10 additions & 0 deletions kuka_agilus_support/urdf/kr6_r900-sixx.urdf.xacro
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="kr6_r900-sixx">
<!-- Import urdf file -->
<xacro:include filename="$(find kuka_agilus_support)/urdf/kr6_r900-sixx_macro.xacro"/>

<!-- Read additional arguments -->
<xacro:arg name="use_fake_hardware" default="false" />

<xacro:kuka_kr6_r900-sixx_robot prefix="" use_fake_hardware="$(arg use_fake_hardware)"/>
</robot>
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,11 @@
<xacro:include filename="$(find kuka_agilus_support)/urdf/kr_agilus_ros2_control.xacro" />
<xacro:include filename="$(find kuka_agilus_support)/urdf/kr_agilus_transmission.xacro" />

<xacro:macro name="kuka_kr6_r900-sixx_robot" params="prefix client_ip client_port use_fake_hardware">
<xacro:macro name="kuka_kr6_r900-sixx_robot" params="prefix use_fake_hardware">
<!-- ros2 control instance -->
<xacro:kuka_agilus_ros2_control
name="kr6_r900-sixx"
prefix="${prefix}"
client_ip="${client_ip}"
client_port="${client_port}"
use_fake_hardware="${use_fake_hardware}" />

<link name="${prefix}base_link"/>
Expand Down
19 changes: 0 additions & 19 deletions kuka_agilus_support/urdf/kr6_r900_sixx.urdf.xacro

This file was deleted.

8 changes: 7 additions & 1 deletion kuka_agilus_support/urdf/kr_agilus_ros2_control.xacro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:macro name="kuka_agilus_ros2_control" params="name prefix client_ip client_port use_fake_hardware:=false">
<xacro:macro name="kuka_agilus_ros2_control" params="name prefix use_fake_hardware:=false">
<ros2_control name="${name}" type="system">
<hardware>
<xacro:if value="${use_fake_hardware}">
Expand All @@ -9,6 +9,12 @@
<param name="state_following_offset">0.0</param>
</xacro:if>
<xacro:unless value="${use_fake_hardware}">
<!-- Read parameters from rsi_config -->
<xacro:property name="rsi_config" value="$(find kuka_rsi_hw_interface)/config/rsi_config.yaml" />
<xacro:property name="rsi_config_dict" value="${xacro.load_yaml(rsi_config)}"/>
<xacro:property name="client_ip" value="${rsi_config_dict['client_ip']}" />
<xacro:property name="client_port" value="${rsi_config_dict['client_port']}" />

<plugin>kuka_rsi_hw_interface::KukaRSIHardwareInterface</plugin>
<param name="client_ip">${client_ip}</param>
<param name="client_port">${client_port}</param>
Expand Down
1 change: 1 addition & 0 deletions kuka_cybertech_support/launch/test_kr16_r2010-2.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def generate_launch_description():
"urdf", "kr16_r2010-2.urdf.xacro"]
),
" ",
"use_fake_hardware:=true",
]
)
robot_description = {'robot_description': robot_description_content}
Expand Down
19 changes: 5 additions & 14 deletions kuka_cybertech_support/urdf/kr16_r2010-2.urdf.xacro
Original file line number Diff line number Diff line change
@@ -1,19 +1,10 @@
<?xml version="1.0"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="kr16_r2010-2">
<!-- Import urdf file -->
<xacro:include filename="$(find kuka_cybertech_support)/urdf/kr16_r2010-2_macro.xacro"/>
<!-- Import urdf file -->
<xacro:include filename="$(find kuka_cybertech_support)/urdf/kr16_r2010-2_macro.xacro"/>

<!-- Read parameters from rsi_config -->
<xacro:property name="rsi_config" value="$(find kuka_rsi_hw_interface)/config/rsi_config.yaml" />
<xacro:property name="rsi_config_dict" value="${xacro.load_yaml(rsi_config)}"/>
<xacro:property name="client_ip" value="${rsi_config_dict['client_ip']}" />
<xacro:property name="client_port" value="${rsi_config_dict['client_port']}" />
<!-- Read additional arguments -->
<xacro:arg name="use_fake_hardware" default="false" />

<!-- Read additional arguments -->
<xacro:arg name="use_fake_hardware" default="false" />

<xacro:kuka_kr16_r2010-2_robot prefix=""
client_ip="${client_ip}"
client_port="${client_port}"
use_fake_hardware="$(arg use_fake_hardware)"/>
<xacro:kuka_kr16_r2010-2_robot prefix="" use_fake_hardware="$(arg use_fake_hardware)"/>
</robot>
4 changes: 1 addition & 3 deletions kuka_cybertech_support/urdf/kr16_r2010-2_macro.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@
<xacro:include filename="$(find kuka_cybertech_support)/urdf/kr_cybertech_ros2_control.xacro" />
<xacro:include filename="$(find kuka_cybertech_support)/urdf/kr_cybertech_transmission.xacro" />

<xacro:macro name="kuka_kr16_r2010-2_robot" params="prefix client_ip client_port use_fake_hardware">
<xacro:macro name="kuka_kr16_r2010-2_robot" params="prefix use_fake_hardware">
<!-- ros2 control instance -->
<xacro:kuka_cybertech_ros2_control
name="kr16_r2010-2"
prefix="${prefix}"
client_ip="${client_ip}"
client_port="${client_port}"
use_fake_hardware="${use_fake_hardware}" />

<link name="${prefix}base_link"/>
Expand Down
8 changes: 7 additions & 1 deletion kuka_cybertech_support/urdf/kr_cybertech_ros2_control.xacro
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<robot xmlns:xacro="http://www.ros.org/wiki/xacro">
<xacro:macro name="kuka_cybertech_ros2_control" params="name prefix client_ip client_port use_fake_hardware:=false">
<xacro:macro name="kuka_cybertech_ros2_control" params="name prefix use_fake_hardware:=false">
<ros2_control name="${name}" type="system">
<hardware>
<xacro:if value="${use_fake_hardware}">
Expand All @@ -9,6 +9,12 @@
<param name="state_following_offset">0.0</param>
</xacro:if>
<xacro:unless value="${use_fake_hardware}">
<!-- Read parameters from rsi_config -->
<xacro:property name="rsi_config" value="$(find kuka_rsi_hw_interface)/config/rsi_config.yaml" />
<xacro:property name="rsi_config_dict" value="${xacro.load_yaml(rsi_config)}"/>
<xacro:property name="client_ip" value="${rsi_config_dict['client_ip']}" />
<xacro:property name="client_port" value="${rsi_config_dict['client_port']}" />

<plugin>kuka_rsi_hw_interface::KukaRSIHardwareInterface</plugin>
<param name="client_ip">${client_ip}</param>
<param name="client_port">${client_port}</param>
Expand Down
Loading

0 comments on commit d367933

Please sign in to comment.