Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a flag to include ros2_control tag #247

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 27 additions & 24 deletions kortex_description/arms/gen3/6dof/urdf/gen3_macro.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,36 @@
isaac_joint_commands:=/isaac_joint_commands
isaac_joint_states:=/isaac_joint_states
use_external_cable:=false
include_ros2_control:=true
initial_positions:=${dict(joint_1=0.0,joint_2=0.0,joint_3=0.0,joint_4=0.0,joint_5=0.0,joint_6=0.0)}
moveit_active:=false">

<!-- ros2 control include -->
<xacro:include filename="$(find kortex_description)/arms/gen3/${dof}dof/urdf/kortex.ros2_control.xacro" />
<xacro:kortex_ros2_control
name="${prefix}KortexMultiInterfaceHardware" prefix="${prefix}"
use_fake_hardware="${use_fake_hardware}"
fake_sensor_commands="${fake_sensor_commands}"
sim_gazebo="${sim_gazebo}"
sim_ignition="${sim_ignition}"
sim_isaac="${sim_isaac}"
isaac_joint_commands="${isaac_joint_commands}"
isaac_joint_states="${isaac_joint_states}"
tf_prefix=""
initial_positions="${initial_positions}"
robot_ip="${robot_ip}"
username="${username}"
password="${password}"
port="${port}"
port_realtime="${port_realtime}"
session_inactivity_timeout_ms="${session_inactivity_timeout_ms}"
connection_inactivity_timeout_ms="${connection_inactivity_timeout_ms}"
use_internal_bus_gripper_comm="${use_internal_bus_gripper_comm}"
gripper_max_velocity="${gripper_max_velocity}"
gripper_max_force="${gripper_max_force}"
gripper_joint_name="${gripper_joint_name}"/>
<xacro:if value="${include_ros2_control}">
<!-- ros2 control include -->
<xacro:include filename="$(find kortex_description)/arms/gen3/${dof}dof/urdf/kortex.ros2_control.xacro" />
<xacro:kortex_ros2_control
name="${prefix}KortexMultiInterfaceHardware" prefix="${prefix}"
use_fake_hardware="${use_fake_hardware}"
fake_sensor_commands="${fake_sensor_commands}"
sim_gazebo="${sim_gazebo}"
sim_ignition="${sim_ignition}"
sim_isaac="${sim_isaac}"
isaac_joint_commands="${isaac_joint_commands}"
isaac_joint_states="${isaac_joint_states}"
tf_prefix=""
initial_positions="${initial_positions}"
robot_ip="${robot_ip}"
username="${username}"
password="${password}"
port="${port}"
port_realtime="${port_realtime}"
session_inactivity_timeout_ms="${session_inactivity_timeout_ms}"
connection_inactivity_timeout_ms="${connection_inactivity_timeout_ms}"
use_internal_bus_gripper_comm="${use_internal_bus_gripper_comm}"
gripper_max_velocity="${gripper_max_velocity}"
gripper_max_force="${gripper_max_force}"
gripper_joint_name="${gripper_joint_name}"/>
</xacro:if>

<joint name="${prefix}base_joint" type="fixed">
<xacro:insert_block name="origin" />
Expand Down
51 changes: 27 additions & 24 deletions kortex_description/arms/gen3/7dof/urdf/gen3_macro.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -31,33 +31,36 @@
isaac_joint_commands:=/isaac_joint_commands
isaac_joint_states:=/isaac_joint_states
use_external_cable:=false
include_ros2_control:=true
initial_positions:=${dict(joint_1=0.0,joint_2=0.0,joint_3=0.0,joint_4=0.0,joint_5=0.0,joint_6=0.0,joint_7=0.0)}
moveit_active:=false">

<!-- ros2 control include -->
<xacro:include filename="$(find kortex_description)/arms/gen3/${dof}dof/urdf/kortex.ros2_control.xacro" />
<xacro:kortex_ros2_control
name="${prefix}KortexMultiInterfaceHardware" prefix="${prefix}"
use_fake_hardware="${use_fake_hardware}"
fake_sensor_commands="${fake_sensor_commands}"
sim_gazebo="${sim_gazebo}"
sim_ignition="${sim_ignition}"
sim_isaac="${sim_isaac}"
isaac_joint_commands="${isaac_joint_commands}"
isaac_joint_states="${isaac_joint_states}"
tf_prefix=""
initial_positions="${initial_positions}"
robot_ip="${robot_ip}"
username="${username}"
password="${password}"
port="${port}"
port_realtime="${port_realtime}"
session_inactivity_timeout_ms="${session_inactivity_timeout_ms}"
connection_inactivity_timeout_ms="${connection_inactivity_timeout_ms}"
use_internal_bus_gripper_comm="${use_internal_bus_gripper_comm}"
gripper_max_velocity="${gripper_max_velocity}"
gripper_max_force="${gripper_max_force}"
gripper_joint_name="${gripper_joint_name}"/>
<xacro:if value="${include_ros2_control}">
<!-- ros2 control include -->
<xacro:include filename="$(find kortex_description)/arms/gen3/${dof}dof/urdf/kortex.ros2_control.xacro" />
<xacro:kortex_ros2_control
name="${prefix}KortexMultiInterfaceHardware" prefix="${prefix}"
use_fake_hardware="${use_fake_hardware}"
fake_sensor_commands="${fake_sensor_commands}"
sim_gazebo="${sim_gazebo}"
sim_ignition="${sim_ignition}"
sim_isaac="${sim_isaac}"
isaac_joint_commands="${isaac_joint_commands}"
isaac_joint_states="${isaac_joint_states}"
tf_prefix=""
initial_positions="${initial_positions}"
robot_ip="${robot_ip}"
username="${username}"
password="${password}"
port="${port}"
port_realtime="${port_realtime}"
session_inactivity_timeout_ms="${session_inactivity_timeout_ms}"
connection_inactivity_timeout_ms="${connection_inactivity_timeout_ms}"
use_internal_bus_gripper_comm="${use_internal_bus_gripper_comm}"
gripper_max_velocity="${gripper_max_velocity}"
gripper_max_force="${gripper_max_force}"
gripper_joint_name="${gripper_joint_name}"/>
</xacro:if>

<joint name="${prefix}base_joint" type="fixed">
<xacro:insert_block name="origin" />
Expand Down
83 changes: 43 additions & 40 deletions kortex_description/arms/gen3_lite/6dof/urdf/gen3_lite_macro.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -30,52 +30,55 @@
isaac_joint_commands:=/isaac_joint_commands
isaac_joint_states:=/isaac_joint_states
use_external_cable:=false
include_ros2_control:=true
initial_positions:=${dict(joint_1=0.0,joint_2=0.0,joint_3=0.0,joint_4=0.0,joint_5=0.0,joint_6=0.0)}
moveit_active:=false" >

<!-- ros2 control include -->
<xacro:include filename="$(find kortex_description)/arms/gen3_lite/${dof}dof/urdf/kortex.ros2_control.xacro" />
<xacro:if value="${sim_ignition or sim_gazebo}">
<xacro:unless value="${moveit_active}">
<xacro:property name="ros2_control_name" value="IgnitionSystem"/>
<xacro:if value="${include_ros2_control}">
<!-- ros2 control include -->
<xacro:include filename="$(find kortex_description)/arms/gen3_lite/${dof}dof/urdf/kortex.ros2_control.xacro" />
<xacro:if value="${sim_ignition or sim_gazebo}">
<xacro:unless value="${moveit_active}">
<xacro:property name="ros2_control_name" value="IgnitionSystem"/>
</xacro:unless>
</xacro:if>
<xacro:if value="${use_fake_hardware}">
<xacro:unless value="${moveit_active}">
<xacro:property name="ros2_control_name" value="GenericSystem"/>
</xacro:unless>
</xacro:if>
<xacro:unless value="${use_fake_hardware or sim_ignition or sim_gazebo}">
<xacro:unless value="${moveit_active}">
<xacro:property name="ros2_control_name" value="${prefix}KortexMultiInterfaceHardware"/>
</xacro:unless>
</xacro:unless>
</xacro:if>
<xacro:if value="${use_fake_hardware}">
<xacro:unless value="${moveit_active}">
<xacro:property name="ros2_control_name" value="GenericSystem"/>
</xacro:unless>
</xacro:if>
<xacro:unless value="${use_fake_hardware or sim_ignition or sim_gazebo}">
<xacro:unless value="${moveit_active}">
<xacro:if value="${moveit_active}">
<xacro:property name="ros2_control_name" value="${prefix}KortexMultiInterfaceHardware"/>
</xacro:unless>
</xacro:unless>
<xacro:if value="${moveit_active}">
<xacro:property name="ros2_control_name" value="${prefix}KortexMultiInterfaceHardware"/>
</xacro:if>
<xacro:kortex_ros2_control
name="${ros2_control_name}" prefix="${prefix}"
use_fake_hardware="${use_fake_hardware}"
fake_sensor_commands="${fake_sensor_commands}"
sim_gazebo="${sim_gazebo}"
sim_ignition="${sim_ignition}"
sim_isaac="${sim_isaac}"
isaac_joint_commands="${isaac_joint_commands}"
isaac_joint_states="${isaac_joint_states}"
tf_prefix=""
initial_positions="${initial_positions}"
robot_ip="${robot_ip}"
username="${username}"
password="${password}"
port="${port}"
port_realtime="${port_realtime}"
session_inactivity_timeout_ms="${session_inactivity_timeout_ms}"
connection_inactivity_timeout_ms="${connection_inactivity_timeout_ms}"
use_internal_bus_gripper_comm="${use_internal_bus_gripper_comm}"
gripper_max_velocity="${gripper_max_velocity}"
gripper_max_force="${gripper_max_force}"
gripper_joint_name="${gripper_joint_name}"
moveit_active="${moveit_active}"/>
</xacro:if>
<xacro:kortex_ros2_control
name="${ros2_control_name}" prefix="${prefix}"
use_fake_hardware="${use_fake_hardware}"
fake_sensor_commands="${fake_sensor_commands}"
sim_gazebo="${sim_gazebo}"
sim_ignition="${sim_ignition}"
sim_isaac="${sim_isaac}"
isaac_joint_commands="${isaac_joint_commands}"
isaac_joint_states="${isaac_joint_states}"
tf_prefix=""
initial_positions="${initial_positions}"
robot_ip="${robot_ip}"
username="${username}"
password="${password}"
port="${port}"
port_realtime="${port_realtime}"
session_inactivity_timeout_ms="${session_inactivity_timeout_ms}"
connection_inactivity_timeout_ms="${connection_inactivity_timeout_ms}"
use_internal_bus_gripper_comm="${use_internal_bus_gripper_comm}"
gripper_max_velocity="${gripper_max_velocity}"
gripper_max_force="${gripper_max_force}"
gripper_joint_name="${gripper_joint_name}"
moveit_active="${moveit_active}"/>

<joint name="${prefix}base_joint" type="fixed">
<xacro:insert_block name="origin" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,11 @@
isaac_joint_commands:=/isaac_joint_commands
isaac_joint_states:=/isaac_joint_states
use_internal_bus_gripper_comm:=false
include_ros2_control:=true
com_port:=/dev/ttyUSB0
moveit_active:=false">
<xacro:include filename="$(find robotiq_description)/urdf/robotiq_2f_140_macro.urdf.xacro" />

<!-- Hardware talks directly to the gripper so we don't need ros2_control unless we are simulating -->
<xacro:property name="include_ros2_control" value="false"/>
<xacro:if value="${sim_ignition or sim_isaac or use_fake_hardware or not use_internal_bus_gripper_comm}">
<xacro:property name="include_ros2_control" value="true"/>
</xacro:if>

<xacro:robotiq_gripper
name="RobotiqGripperHardwareInterface"
prefix="${prefix}"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,11 @@
isaac_joint_commands:=/isaac_joint_commands
isaac_joint_states:=/isaac_joint_states
use_internal_bus_gripper_comm:=false
include_ros2_control:=true
com_port:=/dev/ttyUSB0
moveit_active:=false">
<xacro:include filename="$(find robotiq_description)/urdf/robotiq_2f_85_macro.urdf.xacro" />

<!-- Hardware talks directly to the gripper so we don't need ros2_control unless we are simulating -->
<xacro:property name="include_ros2_control" value="false"/>
<xacro:if value="${sim_ignition or sim_isaac or use_fake_hardware or not use_internal_bus_gripper_comm}">
<xacro:property name="include_ros2_control" value="true"/>
</xacro:if>

<xacro:robotiq_gripper
name="RobotiqGripperHardwareInterface"
prefix="${prefix}"
Expand Down
3 changes: 3 additions & 0 deletions kortex_description/robots/kortex_robot.xacro
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
isaac_joint_commands:=/isaac_joint_commands
isaac_joint_states:=/isaac_joint_states
use_external_cable:=false
include_ros2_control:=true
initial_positions:=${dict(joint_1=0.0,joint_2=0.0,joint_3=0.0,joint_4=0.0,joint_5=0.0,joint_6=0.0,joint_7=0.0)}
gripper_max_velocity:=100.0
gripper_max_force:=100.0
Expand Down Expand Up @@ -61,6 +62,7 @@
gripper_max_velocity="${gripper_max_velocity}"
gripper_max_force="${gripper_max_force}"
use_external_cable="${use_external_cable}"
include_ros2_control="${include_ros2_control}"
initial_positions="${initial_positions}"
moveit_active="${moveit_active}">
<xacro:insert_block name="origin" />
Expand Down Expand Up @@ -90,6 +92,7 @@
sim_isaac="${sim_isaac}"
isaac_joint_commands="${isaac_joint_commands}"
isaac_joint_states="${isaac_joint_states}"
include_ros2_control="${include_ros2_control}"
com_port="${gripper_com_port}"
use_internal_bus_gripper_comm="${use_internal_bus_gripper_comm}"
moveit_active="${moveit_active}"/>
Expand Down
Loading