Your browser was unable to load all of the resources. They may have been blocked by your firewall, proxy or browser configuration.
Press Ctrl+F5 or Ctrl+Shift+R to have your browser try again.

Getting Segfault when loading a URDF #20

Hi Prof. Hauser,

Klampt version: 0.8.2 complied from source, with assimp.
I am testing a simple URDF file with only one link, attached here:
Capture.JPG
. However, I am getting this error when opening it using RobotTest: Capture2.JPG. Do you know what could be wrong?
Best, Yifan Zhu

  • replies 4
  • views 4.6K
  • likes 0
#2

Could you please post the URDF as code so this can actually be debugged?

Also, please run GDB on this so that the offending function can be identified.

#3

Here is the code:

<?xml version="1.0"?>
<!-- This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner (brawner@gmail.com) 
     Commit Version: 1.5.1-0-g916b5db  Build Version: 1.5.7152.31018
     For more information, please see http://wiki.ros.org/sw_urdf_exporter -->
<robot
  name="support">
  <link
    name="support">
    <inertial>
      <origin
        xyz="1.8474E-17 -1.74959999999683E-07 0.0051827"
        rpy="0 0 0" />
      <mass
        value="0.069915" />
      <inertia
        ixx="3.6479E-05"
        ixy="-9.2155E-21"
        ixz="-1.5378E-20"
        iyy="0.00011166"
        iyz="-2.24059999998037E-10"
        izz="0.00014372" />
    </inertial>
    <visual>
      <origin
        xyz="0 0 0"
        rpy="1.5707963267949 0 0" />
      <geometry>
        <mesh
          filename="package://support/meshes/support.STL" />
      </geometry>
      <material
        name="PLA">
        <color
          rgba="0.79216 0.81961 0.93333 1" />
        <texture
          filename="package://support/textures/" />
      </material>
    </visual>
    <collision>
      <origin
        xyz="0 0 0"
        rpy="1.5707963267949 0 0" />
      <geometry>
        <mesh
          filename="package://support/meshes/support.STL" />
      </geometry>
    </collision>
  </link>
<klampt package_root="../.." use_vis_geom="1" >
</robot>

Here is the result from GDB:

Thanks for the reply!

(base) motion@motion:~/Klampt/bin$ gdb ./RobotTest ../../Documents/support/urdf/support.urdf 
GNU gdb (Ubuntu 7.11.1-0ubuntu1~16.5) 7.11.1
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from ./RobotTest...(no debugging symbols found)...done.
"/home/motion/Klampt/bin/../../Documents/support/urdf/support.urdf" is not a core dump: File format not recognized
#4

First of all, to run a program with GDB you need to first run it with the program name, then type "run [ARGS]".

Second, there's nothing wrong with the URDF model import, it's just that the RobotTest GUI assumes there will be at least one actuator in the robot, and there's 0 in your model. I just pushed a fix.

#5

Yes. It is working on URDFs with joints now. Thanks for the help. Also, for other users, it seems like that if you pip installed Klamp't, you won't be able to load robot geometries in .stl format.

Best,
Yifan Zhu