frankaemika / franka_ros

ROS integration for Franka research robots
https://frankaemika.github.io
Apache License 2.0
339 stars 307 forks source link

franka_robot.xacro Failed to find root link: Two root links found: [panda_1_link0] and [world] #374

Open simonbogh opened 7 months ago

simonbogh commented 7 months ago

When adding a franka in a xacro using the following , then parent, xyz, and rpy are not forwarded in franka_robot.xacro, which leads to an error Failed to find root link as seen further below.

  <!-- Load joint limits -->
  <xacro:property name="panda_joint_limits" value="${xacro.load_yaml('$(find franka_description)/robots/panda/joint_limits.yaml')}"/>

  <!-- arm id -->
  <xacro:arg name="arm_id_1" default="panda_1" />

  <xacro:include filename="$(find franka_description)/robots/common/franka_robot.xacro"/>

  <!-- Panda arm with gripper -->
  <xacro:franka_robot arm_id="$(arg arm_id_1)"
                      joint_limits="${panda_joint_limits}"
                      hand="true"
                      gazebo="false"
                      parent="robot_pedestal_link"
                      xyz="0 0 0.95"
                      rpy="0 0 0"
                      tcp_xyz="0 0 0.1034"
                      tcp_rpy="0 0 0" />
[ERROR]: Failed to find root link: Two root links found: [panda_1_link0] and [world]

Adding connected_to="${parent}" xyz="${xyz}" rpy="${rpy}" in line 8 in franka_robot.xacro resolves this issue.

https://github.com/frankaemika/franka_ros/blob/5f90395ef000e0c998fb7aff8f127b9bd3773962/franka_description/robots/common/franka_robot.xacro#L8

Is this left out on purpose?