ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to make sure URDF exported correctly from SW2URDF?

asked 2020-11-10 15:06:19 -0500

Huma gravatar image

I am using SW2URDF plugin to export a complicated assembly. what i noticed that when i identify joints, links and origins manually and hit export everything exported correctly! and the package is created successfully. but when i do all the steps automatically. the package exported successfully! even it's a way different from the manual assignment for (joints, links and origins). however, the robot isn't shown in RVIZ,Gazebo and urdf online viewer. so, how to make sure the robot exported successfully from solidwork?

my URDF:

    <?xml version="1.0" encoding="utf-8"?>

<robot
  name="bringup">
  <link
    name="base_link">
    <inertial>
      <origin
        xyz="8.4499366132184E-08 0.0413899524421433 0.448353944324747"
        rpy="0 0 0" />
      <mass
        value="483.642774354836" />
      <inertia
        ixx="66.5589352522489"
        ixy="-8.18075396774199E-06"
        ixz="-1.26985095232434E-06"
        iyy="77.7009885551722"
        iyz="-3.41648589132718"
        izz="99.8657529755009" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://bringup/meshes/base_link.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.752941176470588 0.752941176470588 0.752941176470588 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://bringup/meshes/base_link.STL" />
      </geometry>
    </collision>
  </link>
  <link
    name="link_s_1">
    <inertial>
      <origin
        xyz="-1.0333E-07 0.38162 0.062421"
        rpy="0 0 0" />
      <mass
        value="308.66" />
      <inertia
        ixx="65.642"
        ixy="1.2699E-06"
        ixz="8.1808E-06"
        iyy="96.94"
        iyz="-3.4086"
        izz="75.402" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://bringup/meshes/link_s_1.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="0.31765 0.24706 0.20784 1" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://bringup/meshes/link_s_1.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="joint_s_1"
    type="fixed">
    <origin
      xyz="0 0 0.16346"
      rpy="1.5708 0 -3.1416" />
    <parent
      link="base_link" />
    <child
      link="link_s_1" />
    <axis
      xyz="0 0 0" />
  </joint>
  <link
    name="19018">
    <inertial>
      <origin
        xyz="-0.275342770725246 0.684594248011687 -0.468812087034703"
        rpy="0 0 0" />
      <mass
        value="2194.81064038651" />
      <inertia
        ixx="843.25644940157"
        ixy="-13.5712727706793"
        ixz="-3.94365348150686"
        iyy="1059.35447907852"
        iyz="-76.5582504592004"
        izz="655.443533049817" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://bringup/meshes/19018.STL" />
      </geometry>
      <material
        name="">
        <color
          rgba="1 1 1 0.25" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="0 0 0" />
      <geometry>
        <mesh
          filename="package://bringup/meshes/19018.STL" />
      </geometry>
    </collision>
  </link>
  <joint
    name="19018"
    type="fixed">
    <origin
      xyz="-0.4318 -0.254 0.2224"
      rpy="1.5708 0 -1.5708" />
    <parent
      link="base_link" />
    <child
      link="19018" />
    <axis
      xyz="0 0 0" />
  </joint>
  <link ...
(more)
edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2020-11-15 13:09:14 -0500

First make sure your meshes are in the correct path, then you can use such a launch file to open this urdf in Rviz

https://github.com/mn-banjar/ros-move...

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-11-10 15:06:19 -0500

Seen: 119 times

Last updated: Nov 15 '20