Segmentation fault with joint_monkey.py and my URDF file

I made a modified version of joint_monkey.py that loads and displays my URDF file. The file is attached to this message. In its current form, the URDF file will cause joint_monkey.py to get a segmentation fault in gym.simulate(sim). I loaded the resulting core file into gdb, and got this:

Program terminated with signal SIGSEGV, Segmentation fault.
#0 0x00007f9420c1cb95 in physx::Dy::FeatherstoneArticulation::setupInternalConstraintsRecursive(physx::Dy::ArticulationLink*, unsigned int, bool, physx::Dy::ArticulationData&, physx::Cm::SpatialVectorF*, float, float, float, float, bool, unsigned int, float) ()
from /mnt/nas/jim/software/nvidia/isaacgym/python/isaacgym/_bindings/linux-x86_64/libcarb.gym.plugin.so
[Current thread is 1 (Thread 0x7f9439bf0740 (LWP 10821))]

If robot_seg_fault.urdf is modified so that the section labeled “This causes a segmentation fault” is commented out and the section labeled “This works” is uncommented out, joint_monkey.py displays the robot correctly. Please let me know if you need any more information about this problem.

robot_seg_fault.urdf (39.2 KB)

I tried to use joint_monkey.py to display robot_seg_fault.urdf with 1.0preview2, and I encountered behavior that differs from that of 1.0preview1. Now, instead of getting a segmentation fault, gym.simulate() hangs. <ctrl>c won’t stop the program; I have to do a “kill -9” from another shell to get joint_monkey.py to exit.

Hi @jim.rothrock,

I will take a look and get back to you.

1 Like

Hi Jim,

This segfault/hang appears to be caused by exceeding PhysX’s articulation limit. Removing any single joint and body from the model fixes the problem, not only the right ankle.

Because this is a limitation in the version of PhysX we are using, we do not currently have a workaround other than removing a joint from the robot somewhere. We expect to be using an updated version of PhysX with a much higher articulation limit on Preview 3.

Cheers,
Brendon

1 Like

This segfault/hang appears to be caused by exceeding PhysX’s
articulation limit.

I suspected it might be something like that, but I thought, “There are only about 60 joints. I couldn’t be hitting a limit already.”

we do not currently have a workaround other than removing a
joint from the robot somewhere

I reduced the ankles to one DOF. Not ideal, but it works around the limitation.

We expect to be using an updated version of PhysX with a much
higher articulation limit on Preview 3.

The finished model is going to have fingers, so I’ll need at least 40 more DOFs. I hope the updated PhysX will handle that. Also, it would be great if an error message were propagated up to the Isaac Gym API when the maximum number of joints is exceeded.

Thanks for checking out this problem.