MarkFzp/Deep-Whole-Body-Control

Segfault on visualization

Closed this issue · 1 comments

Hi again, thank you for your great work!
During the execution of the training code, I've encountered segmentation fault on visualization.
In specific, the Segmentation fault occurred at:

self.viewer = self.gym.create_viewer(
self.sim, gymapi.CameraProperties())

It seems a bit weird to me, because I was able to execute the example codes provided with issac Gym(e.g. 1080_balls_of_solitude.py). In addition, if I train with headless mode(with --headless argument), I was able to train without error. Full output messages are as follows:

$ python3 ./scripts/train.py --exptid 1 --run_name test --physx
Importing module 'gym_37' (/opt/isaacgym/python/isaacgym/_bindings/linux-x86_64/gym_37.so)
Setting GYM_USD_PLUG_INFO_PATH to /opt/isaacgym/python/isaacgym/_bindings/linux-x86_64/usd/plugInfo.json
PyTorch version 1.10.0+cu113
Device count 1
/opt/isaacgym/python/isaacgym/_bindings/src/gymtorch
Using /home/ytcho/.cache/torch_extensions/py37_cu113 as PyTorch extensions root...
Emitting ninja build file /home/ytcho/.cache/torch_extensions/py37_cu113/gymtorch/build.ninja...
Building extension module gymtorch...
Allowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
ninja: no work to do.
Loading extension module gymtorch...
wandb: Currently logged in as: ytcho. Use `wandb login --relogin` to force relogin
wandb: Tracking run with wandb version 0.16.2
wandb: Run data is saved locally in /home/ytcho/workspace/Deep-Whole-Body-Control/legged_gym/legged_gym/wandb/run-20240123_154503-e0rkv4rw
wandb: Run `wandb offline` to turn off syncing.
wandb: Syncing run 1_test
wandb: ⭐️ View project at https://wandb.ai/ytcho/manip-loco
wandb: 🚀 View run at https://wandb.ai/ytcho/manip-loco/runs/e0rkv4rw
wandb: WARNING Saving files without folders. If you want to preserve sub directories pass base_path to wandb.save, i.e. wandb.save("/mnt/folder/file.h5", base_path="/mnt")
Setting seed: 1
Not connected to PVD
+++ Using GPU PhysX
Physics Engine: PhysX
Physics Device: cuda:0
GPU Pipeline: enabled
Terrain heightsamples shape:  (600, 10000)
Terrain heightsamples stat:  [0.         0.16855    0.03124721 0.04623586 0.        ]
------------------------------------------------------
num_actions: 18
num_torques: 18
num_dofs: 20
num_bodies: 27
dof_names:  ['FL_hip_joint', 'FL_thigh_joint', 'FL_calf_joint', 'FR_hip_joint', 'FR_thigh_joint', 'FR_calf_joint', 'RL_hip_joint', 'RL_thigh_joint', 'RL_calf_joint', 'RR_hip_joint', 'RR_thigh_joint', 'RR_calf_joint', 'widow_waist', 'widow_shoulder', 'widow_elbow', 'widow_forearm_roll', 'widow_wrist_angle', 'widow_wrist_rotate', 'widow_left_finger', 'widow_right_finger']
dof_names_to_idx: [('FL_hip_joint', 0), ('FL_thigh_joint', 1), ('FL_calf_joint', 2), ('FR_hip_joint', 3), ('FR_thigh_joint', 4), ('FR_calf_joint', 5), ('RL_hip_joint', 6), ('RL_thigh_joint', 7), ('RL_calf_joint', 8), ('RR_hip_joint', 9), ('RR_thigh_joint', 10), ('RR_calf_joint', 11), ('widow_waist', 12), ('widow_shoulder', 13), ('widow_elbow', 14), ('widow_forearm_roll', 15), ('widow_wrist_angle', 16), ('widow_wrist_rotate', 17), ('widow_left_finger', 18), ('widow_right_finger', 19)]
body_names: ['base', 'trunk', 'FL_hip', 'FL_thigh', 'FL_calf', 'FL_foot', 'FR_hip', 'FR_thigh', 'FR_calf', 'FR_foot', 'RL_hip', 'RL_thigh', 'RL_calf', 'RL_foot', 'RR_hip', 'RR_thigh', 'RR_calf', 'RR_foot', 'wx250s/shoulder_link', 'wx250s/upper_arm_link', 'wx250s/upper_forearm_link', 'wx250s/lower_forearm_link', 'wx250s/wrist_link', 'wx250s/gripper_link', 'wx250s/ee_gripper_link', 'wx250s/left_finger_link', 'wx250s/right_finger_link']
body_names_to_idx: [('base', 0), ('trunk', 1), ('FL_hip', 2), ('FL_thigh', 3), ('FL_calf', 4), ('FL_foot', 5), ('FR_hip', 6), ('FR_thigh', 7), ('FR_calf', 8), ('FR_foot', 9), ('RL_hip', 10), ('RL_thigh', 11), ('RL_calf', 12), ('RL_foot', 13), ('RR_hip', 14), ('RR_thigh', 15), ('RR_calf', 16), ('RR_foot', 17), ('wx250s/shoulder_link', 18), ('wx250s/upper_arm_link', 19), ('wx250s/upper_forearm_link', 20), ('wx250s/lower_forearm_link', 21), ('wx250s/wrist_link', 22), ('wx250s/gripper_link', 23), ('wx250s/ee_gripper_link', 24), ('wx250s/left_finger_link', 25), ('wx250s/right_finger_link', 26)]
penalized_contact_names: ['FL_thigh', 'FR_thigh', 'RL_thigh', 'RR_thigh', 'trunk']
termination_contact_names: []
feet_names: ['FL_foot', 'FR_foot', 'RL_foot', 'RR_foot']
EE Gripper index: 24
origin x_bounds [-3.75, -3.0]
origin y_bounds [-115.0, 115.0]
penalized_contact_indices: tensor([ 3,  7, 11, 15,  1], device='cuda:0')
termination_contact_indices: tensor([], device='cuda:0', dtype=torch.int64)
feet_indices: tensor([ 5,  9, 13, 17], device='cuda:0')
Segmentation fault (core dumped)

I'm a newbie to the Issac Gym, so I'd be appreciated for any help, especially whoever succeeded rendering. Thanks!!

It turned out that the pytorch and cuda version aren't compatible with my GPU(RTX 4070Ti).
Followed thishttps://github.com/leggedrobotics/legged_gym/issues/57, and finally got code working.