sw_urdf_exporter插件还有一点小错误好像,我今天弄的时候就遇到了,仔细检查urdf文件后终于发现了这个错误,来源与我们用solidworks生成的文件

[ERROR] [1584194344.911065094]: Ignoring transform for child_frame_id “left_wheel_link” from authority “unknown_publisher” because of a nan value in the transform (-nan -nan -nan) (-nan -nan -nan -nan)
[ERROR] [1584194344.911110119]: Ignoring transform for child_frame_id “left_wheel_link” from authority “unknown_publisher” because of an invalid quaternion in the transform (-nan -nan -nan -nan)
[ERROR] [1584194344.911121302]: Ignoring transform for child_frame_id “right_wheel_link” from authority “unknown_publisher” because of a nan value in the transform (-nan -nan -nan) (-nan -nan -nan -nan)
[ERROR] [1584194344.911130019]: Ignoring transform for child_frame_id “right_wheel_link” from authority “unknown_publisher” because of an invalid quaternion in the transform (-nan -nan -nan -nan)

提示出这样的错误,fixed frame也看不到其他的选项,从错误提示中基本上可以发现错误在哪里

打开urdf模型文件:

<joint
    name="right_wheel_joint"
    type="continuous">
    <origin
      xyz="-0.0040897 0.0066355 -0.026332"
      rpy="1.5708 -1.1142 0" />
    <parent
      link="base_link" />
    <child
      link="right_wheel_link" />
    <axis
      xyz="0 0 0" />
  </joint>

这里的axis是0 0 0,轴怎么能是0 0 0呢,把这个参数修改一下基本就可以了。
例如:

<joint
    name="right_wheel_joint"
    type="continuous">
    <origin
      xyz="-0.0040897 0.0066355 -0.026332"
      rpy="1.5708 -1.1142 0" />
    <parent
      link="base_link" />
    <child
      link="right_wheel_link" />
    <axis
      xyz="0 0 1" />
  </joint>

就这么简单,问题解决。