Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Issue] Segmentation Fault when running urdf2graspit_node #68

Open
flydog521 opened this issue Nov 28, 2024 · 1 comment
Open

[Issue] Segmentation Fault when running urdf2graspit_node #68

flydog521 opened this issue Nov 28, 2024 · 1 comment

Comments

@flydog521
Copy link

Dear Author,

I hope this message finds you well. First of all, I would like to express my gratitude for the urdf2graspit tool, which has been incredibly useful for my work.

I am writing to report an issue I encountered while using the urdf2graspit_node. When attempting to convert a URDF file into a GraspIt! model, I experienced a segmentation fault. The command I used was as follows:

> rosrun urdf2graspit urdf2graspit_node \
>     ~/catkin_ws/src/gripper/urdf/gripper.urdf \
>     ~/catkin_ws/src/gripper/graspit_models \
>     base_link left_gripper right_gripper

The conversion process seemed to proceed normally until the very end, at which point the program crashed with a "Segmentation fault (core dumped)" message. I have verified that my input files are correct and that I followed the instructions in the documentation.

Here is the full terminal output, which may help in diagnosing the problem:

[ INFO] [1732804980.297763005]: URDF file: /home/kf/catkin_ws/src/gripper/urdf/gripper.urdf
[ INFO] [1732804980.297900374]: Output dir: /home/kf/catkin_ws/src/gripper/graspit_models
[ INFO] [1732804980.297948454]: Hand root: base_link
[ INFO] [1732804980.297966328]: Joint: left_gripper
[ INFO] [1732804980.298003187]: Joint: right_gripper
[ INFO] [1732804980.299332601]: output_material: <plastic>
[ INFO] [1732804980.300345559]: scale_factor: <1000.000000>
[ INFO] [1732804980.301103185]: negate_joint_movement: <0>
[ INFO] [1732804980.305118827]: Starting model conversion...
[ INFO] [1732804980.305358959]: ### Loading from URDF file /home/kf/catkin_ws/src/gripper/urdf/gripper.urdf...
[ INFO] [1732804980.305592008]: Setting base model directory to /home/kf/catkin_ws/src/gripper/urdf
[ INFO] [1732804980.306039401]: ### Converting files starting from link base_link
[ INFO] [1732804980.306094775]: ### Preparing for DH conversion...
[ INFO] [1732804980.306122667]: URDF before joining fixed links: 
[ INFO] [1732804980.306174445]: Printing model down from link: base_link
[ INFO] [1732804980.306293028]: **base_link: parent joint NULL
[ INFO] [1732804980.306349625]:    **left_Link: parent joint left_gripper
[ INFO] [1732804980.306383729]:    **right_Link: parent joint right_gripper
[ INFO] [1732804980.306564219]: ### Joining fixed links..
[ INFO] [1732804980.306640913]: ############### Joining fixed links
[ INFO] [1732804980.306710033]: Start from root link: base_link
[ INFO] [1732804980.306981254]: URDF after joining fixed links: 
[ INFO] [1732804980.307062026]: Printing model down from link: base_link
[ INFO] [1732804980.307128511]: **base_link: parent joint NULL
[ INFO] [1732804980.307193704]:    **left_Link: parent joint left_gripper
[ INFO] [1732804980.307258466]:    **right_Link: parent joint right_gripper
[ INFO] [1732804980.307322807]: ### Transforming rotation axes to z...
[ INFO] [1732804980.307403529]: ############### Aligning rotation axis to [0, 0, 1]
[ INFO] [1732804980.311941685]: ### Converting files...
[ INFO] [1732804980.312102077]: ### Urdf2GraspIt::preConvert for robot gripper
[ INFO] [1732804980.312272198]: ##### Computing DH parameters out of model
[ INFO] [1732804980.312361185]: ############### Getting DH params
[ INFO] [1732804980.312484858]: ### Starting DH conversion from link base_link
[ INFO] [1732804980.312574727]: ======== Transforming joint left_gripper to DH parameters.
[ INFO] [1732804980.312709060]: ======== Transforming joint right_gripper to DH parameters.
[ INFO] [1732804980.312830479]: ############### Transform links to DH reference frames
[ INFO] [1732804980.316231874]: --- DH Parameters: ---
[ INFO] [1732804980.316701618]: left_gripper: d=0, r=0, theta=0, alpha=0, dof_idx=0 (prismatic)
[ INFO] [1732804980.316748937]: right_gripper: d=0, r=0, theta=0, alpha=0, dof_idx=1 (prismatic)
[ INFO] [1732804980.316783302]: ##### Scaling DH parameters
[ INFO] [1732804980.316856530]: ############### Scaling model
[ INFO] [1732804980.318060056]: ############### Converting meshes
[ INFO] [1732804980.318233162]: Convert mesh for link 'base_link'
[ INFO] [1732804980.329118339]: Converting mesh file /home/kf/catkin_ws/src/gripper/meshes/base_link.STL with factor 1000
[ INFO] [1732804980.329932502]: Scaling the mesh /home/kf/catkin_ws/src/gripper/meshes/base_link.STL with factor 1000
[ INFO] [1732804980.361712891]: Convert mesh for link 'left_Link'
[ INFO] [1732804980.377005573]: Converting mesh file /home/kf/catkin_ws/src/gripper/meshes/left_Link.STL with factor 1000
[ INFO] [1732804980.377632804]: Scaling the mesh /home/kf/catkin_ws/src/gripper/meshes/left_Link.STL with factor 1000
[ INFO] [1732804980.415787012]: Convert mesh for link 'right_Link'
[ INFO] [1732804980.416224245]: Converting mesh file /home/kf/catkin_ws/src/gripper/meshes/right_Link.STL with factor 1000
[ INFO] [1732804980.416665276]: Scaling the mesh /home/kf/catkin_ws/src/gripper/meshes/right_Link.STL with factor 1000
[ INFO] [1732804980.439283027]: ### Urdf2GraspIt::postConvert for robot gripper
[ INFO] [1732804980.439602779]: ############### Getting XML
[ INFO] [1732804980.440617299]: Conversion done.
段错误 (核心已转储)

my urdf:

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

<!-- This URDF was automatically created by SolidWorks to URDF Exporter! Originally created by Stephen Brawner ([email protected]) 

     Commit Version: 1.6.0-4-g7f85cfe  Build Version: 1.6.7995.38578

     For more information, please see http://wiki.ros.org/sw_urdf_exporter -->

<robot

  name="gripper">

  <link

    name="base_link">

    <inertial>

      <origin

        xyz="0.00071481 1.3035E-08 0.0367"

        rpy="0 0 0" />

      <mass

        value="0.20436" />

      <inertia

        ixx="0.00014463"

        ixy="-1.6371E-10"

        ixz="3.3175E-06"

        iyy="0.00016506"

        iyz="1.533E-10"

        izz="9.367E-05" />

    </inertial>

    <visual>

      <origin

        xyz="0 0 0"

        rpy="0 0 0" />

      <geometry>

        <mesh

          filename="package://gripper/meshes/base_link.STL" />

      </geometry>

      <material

        name="">

        <color

          rgba="0.79216 0.81961 0.93333 1" />

      </material>

    </visual>

    <collision>

      <origin

        xyz="0 0 0"

        rpy="0 0 0" />

      <geometry>

        <mesh

          filename="package://gripper/meshes/base_link.STL" />

      </geometry>

    </collision>

  </link>

  <link

    name="left_Link">

    <inertial>

      <origin

        xyz="-0.013523 0.017097 0.012374"

        rpy="0 0 0" />

      <mass

        value="0.012374" />

      <inertia

        ixx="2.7148E-06"

        ixy="2.3906E-07"

        ixz="-6.5477E-07"

        iyy="3.6615E-06"

        iyz="4.7346E-07"

        izz="1.5304E-06" />

    </inertial>

    <visual>

      <origin

        xyz="0 0 0"

        rpy="0 0 0" />

      <geometry>

        <mesh

          filename="package://gripper/meshes/left_Link.STL" />

      </geometry>

      <material

        name="">

        <color

          rgba="0.52941 0.54902 0.54902 1" />

      </material>

    </visual>

    <collision>

      <origin

        xyz="0 0 0"

        rpy="0 0 0" />

      <geometry>

        <mesh

          filename="package://gripper/meshes/left_Link.STL" />

      </geometry>

    </collision>

  </link>

  <joint

    name="left_gripper"

    type="prismatic">

    <origin

      xyz="-0.0265 0.01 0.0815"

      rpy="0 0 3.1416" />

    <parent

      link="base_link" />

    <child

      link="left_Link" />

    <axis

      xyz="-1 0 0" />

    <limit

      lower="-0.0175"

      upper="0"

      effort="0"

      velocity="0" />

  </joint>

  <link

    name="right_Link">

    <inertial>

      <origin

        xyz="0 0 0"

        rpy="0 0 0" />

      <mass

        value="0" />

      <inertia

        ixx="0"

        ixy="0"

        ixz="0"

        iyy="0"

        iyz="0"

        izz="0" />

    </inertial>

    <visual>

      <origin

        xyz="0 0 0"

        rpy="0 0 0" />

      <geometry>

        <mesh

          filename="package://gripper/meshes/right_Link.STL" />

      </geometry>

      <material

        name="">

        <color

          rgba="0.52941 0.54902 0.54902 1" />

      </material>

    </visual>

    <collision>

      <origin

        xyz="0 0 0"

        rpy="0 0 0" />

      <geometry>

        <mesh

          filename="package://gripper/meshes/right_Link.STL" />

      </geometry>

    </collision>

  </link>

  <joint

    name="right_gripper"

    type="prismatic">

    <origin

      xyz="0.009 -0.009825 0.081803"

      rpy="0 0 0" />

    <parent

      link="base_link" />

    <child

      link="right_Link" />

    <axis

      xyz="-1 0 0" />

    <limit

      lower="-0.0175"

      upper="0"

      effort="0"

      velocity="0" />

  </joint>

</robot>

If there is any additional information or testing that could be helpful, please let me know. I look forward to your response and appreciate your time and assistance in resolving this matter.

Best regards,

[email protected]

@JenniferBuehler
Copy link
Owner

Hello, I am so sorry for the very late response. I hope I will have time over the holidays to look at this. Are there any new developments since you opened the issue? Have you run it through gdb or valgrind?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants