-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from alliander-opensource/feat/add_realsense_to…
…_xacro Add xacro for franka with possibility to load realsense.
- Loading branch information
Showing
3 changed files
with
67 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<?xml version='1.0' encoding='utf-8'?> | ||
<!-- | ||
SPDX-FileCopyrightText: Alliander N. V. | ||
SPDX-License-Identifier: Apache-2.0 | ||
--> | ||
<robot xmlns:xacro="http://www.ros.org/wiki/xacro" name="franka"> | ||
|
||
<!-- Global Franka definitions: --> | ||
<xacro:arg name="arm_id" default="fr3" /> | ||
<xacro:arg name="ee_id" default="franka_hand" /> | ||
|
||
<!-- Franka related: --> | ||
<xacro:arg name="parent" default="world" /> | ||
<xacro:arg name="xyz" default="0 0 0" /> | ||
<xacro:arg name="gazebo" default="false" /> | ||
<xacro:arg name="ign_ros2_control" default="false" /> | ||
<xacro:arg name="robot_ip" default="" /> | ||
|
||
<!-- Realsense related: --> | ||
<xacro:arg name="load_realsense" default="true" /> | ||
<xacro:arg name="pos_realsense" default="0.05 0 0.05" /> | ||
<xacro:arg name="parent_realsense" default="fr3_hand" /> | ||
<xacro:arg name="rot_realsense" default="0 ${-0.5*pi} 0" /> | ||
|
||
<!-- Load arm: --> | ||
<xacro:include filename="$(find franka_description)/robots/common/franka_robot.xacro" /> | ||
<xacro:franka_robot | ||
arm_id="$(arg arm_id)" | ||
joint_limits="${xacro.load_yaml('$(find franka_description)/robots/$(arg arm_id)/joint_limits.yaml')}" | ||
inertials="${xacro.load_yaml('$(find franka_description)/robots/$(arg arm_id)/inertials.yaml')}" | ||
kinematics="${xacro.load_yaml('$(find franka_description)/robots/$(arg arm_id)/kinematics.yaml')}" | ||
dynamics="${xacro.load_yaml('$(find franka_description)/robots/$(arg arm_id)/dynamics.yaml')}" | ||
parent="$(arg parent)" | ||
ee_id="$(arg ee_id)" | ||
gazebo="$(arg gazebo)" | ||
xyz="$(arg xyz)" /> | ||
|
||
<!-- Load ros2 control. gazebo to LOAD and USE plugin. ign_ros2_control to only USE plugin. --> | ||
<xacro:include filename="$(find franka_description)/robots/common/franka_arm.ros2_control.xacro" /> | ||
<xacro:franka_arm_ros2_control | ||
arm_id="$(arg arm_id)" | ||
robot_ip="$(arg robot_ip)" | ||
hand="true" | ||
gazebo="$(arg gazebo)" | ||
ign_ros2_control="$(arg ign_ros2_control)" /> | ||
|
||
<!-- Load realsense: --> | ||
<xacro:if value="$(arg load_realsense)"> | ||
<xacro:include filename="$(find realsense2_description)/urdf/_d435.urdf.xacro" /> | ||
<xacro:sensor_d435 parent="$(arg parent_realsense)"> | ||
<origin xyz="$(arg pos_realsense)" rpy="$(arg rot_realsense)" /> | ||
</xacro:sensor_d435> | ||
</xacro:if> | ||
|
||
</robot> |