diff --git a/CHANGELOG.md b/CHANGELOG.md
index 982640ee7..830d6e2b4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,8 @@ Requires `libfranka` >= 0.8.0
* `franka_control`: Fix unexpected long delay when calling error recovery ([#317](https://github.com/frankaemika/franka_ros/issues/317))
* Fix a possible compilation error by sorting include directories by topological order ([#319](https://github.com/frankaemika/franka_ros/issues/319)).
* `franka_control`: Fix a bug where `error_recovery` actions recover future errors ([#316](https://github.com/frankaemika/franka_ros/issues/316)).
+ * `franka_gazebo`: `FrankaHWSim` only acts on joints belonging to a Franka robot. This allows to combine a Franka robot and others (like mobile platforms) in same URDF ([#313](https://github.com/frankaemika/franka_ros/issues/313))
+ * `franka_description`: `` macro now supports to customize the `parent` frame and its `xyz` + `rpy` offset
## 0.10.1 - 2022-09-15
diff --git a/franka_description/robots/common/franka_robot.xacro b/franka_description/robots/common/franka_robot.xacro
index 23e5c87af..b78eb0776 100644
--- a/franka_description/robots/common/franka_robot.xacro
+++ b/franka_description/robots/common/franka_robot.xacro
@@ -1,47 +1,39 @@
-
-
-
-
-
-
-
-
-
-
+
-
+
-
+
-
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -73,7 +65,7 @@
tip="${arm_id}_joint8"
/>
-
+
diff --git a/franka_description/robots/fr3/fr3.urdf.xacro b/franka_description/robots/fr3/fr3.urdf.xacro
index 0a235891b..8035a8ead 100644
--- a/franka_description/robots/fr3/fr3.urdf.xacro
+++ b/franka_description/robots/fr3/fr3.urdf.xacro
@@ -3,10 +3,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ joint_limits="${xacro.load_yaml('$(find franka_description)/robots/fr3/joint_limits.yaml')}"
+ hand="$(arg hand)"
+ tcp_xyz="$(arg tcp_xyz)"
+ tcp_rpy="$(arg tcp_rpy)"
+ gazebo="$(arg gazebo)"
+ parent="$(arg parent)"
+ xyz="$(arg xyz)"
+ rpy="$(arg rpy)">
diff --git a/franka_description/robots/panda/panda.urdf.xacro b/franka_description/robots/panda/panda.urdf.xacro
index e5dc4b745..04939171c 100644
--- a/franka_description/robots/panda/panda.urdf.xacro
+++ b/franka_description/robots/panda/panda.urdf.xacro
@@ -3,10 +3,34 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ joint_limits="${xacro.load_yaml('$(find franka_description)/robots/panda/joint_limits.yaml')}"
+ hand="$(arg hand)"
+ tcp_xyz="$(arg tcp_xyz)"
+ tcp_rpy="$(arg tcp_rpy)"
+ gazebo="$(arg gazebo)"
+ parent="$(arg parent)"
+ xyz="$(arg xyz)"
+ rpy="$(arg rpy)">
diff --git a/franka_description/test/franka_robot_urdf.py b/franka_description/test/franka_robot_urdf.py
index af60a0fcf..4aa7e4562 100644
--- a/franka_description/test/franka_robot_urdf.py
+++ b/franka_description/test/franka_robot_urdf.py
@@ -124,6 +124,31 @@ def test_gazebo_arg_will_add_top_level_world_link(self):
# Check if robot is directly connected to the world link
self.assertJointBetween(urdf, 'world', arm_id + '_link0', type="fixed")
+ def test_parent_arg_will_add_fixed_joint(self):
+ arm_id = self.robot
+ parent = "foo"
+ urdf = self.xacro(self.file, args="gazebo:=true parent:=%s" % parent)
+ self.assertJointBetween(urdf, parent, arm_id + "_link0", type="fixed")
+
+ def test_parent_arg_will_not_top_level_link(self):
+ arm_id = self.robot
+ parent = "foo"
+ urdf = self.xacro(self.file, args="gazebo:=true parent:=%s" % parent)
+ with self.assertRaises(AssertionError):
+ urdf.get_root()
+
+ def test_xyz_will_apply_fixed_offset_to_parent(self):
+ xyz = [0, 1, 2]
+ urdf = self.xacro(self.file, args="gazebo:=true xyz:='%s'" % " ".join(str(x) for x in xyz))
+ joint = urdf.joint_map['world_joint']
+ self.assertListEqual(joint.origin.xyz, xyz)
+
+ def test_rpy_will_apply_fixed_offset_to_parent(self):
+ rpy = [3, 4, 5]
+ urdf = self.xacro(self.file, args="gazebo:=true rpy:='%s'" % " ".join(str(x) for x in rpy))
+ joint = urdf.joint_map['world_joint']
+ self.assertListEqual(joint.origin.rpy, rpy)
+
def test_gazebo_arg_will_insert_gazebo_ros_control_plugin(self):
urdf = self.xacro(self.file, args='gazebo:=true')
diff --git a/franka_gazebo/include/franka_gazebo/franka_hw_sim.h b/franka_gazebo/include/franka_gazebo/franka_hw_sim.h
index 0d9dae5f4..d94b9019e 100644
--- a/franka_gazebo/include/franka_gazebo/franka_hw_sim.h
+++ b/franka_gazebo/include/franka_gazebo/franka_hw_sim.h
@@ -16,6 +16,7 @@
#include
#include
#include
+#include
#include
#include
#include
@@ -24,10 +25,14 @@
#include