Genesis icon indicating copy to clipboard operation
Genesis copied to clipboard

[Bug]: Collision error

Open Xu-Xuanhui opened this issue 8 months ago • 0 comments
trafficstars

Bug Description

I modified a 3D model of a spacecraft using Blender and extracted a portion for robot crawling motion learning. However, there were issues with the collision calculation of the model during simulation. The robot will get stuck in the model, but it will not fall through the model. And the model loading speed is very slow. May I ask what caused this? Is there any reco

Image

https://github.com/user-attachments/assets/5ed35f32-8c41-4f34-997f-5893b7934792

mmended way for me to create my own 3D model?

Steps to Reproduce

just run the file

import genesis as gs
import pandas as pd
import numpy as np
import torch
import argparse
from genesis.engine.solvers.rigid.rigid_solver_decomp import RigidSolver
from genesis.engine.force_fields import Point, Wind
from datetime import datetime

def main():
    parser = argparse.ArgumentParser()
    parser.add_argument("-v", "--vis", action="store_true", default=True) # 是否显示图像
    parser.add_argument("-s", "--n_envs", type=int, default=2)  # 并行环境数量

    args = parser.parse_args()
    gs.init(backend=gs.cpu)

    scene = gs.Scene(
        sim_options=gs.options.SimOptions(
            dt=0.03,
            gravity=(0, 0, -1.),
        ),
        show_viewer=args.vis,
    )
    plane = scene.add_entity(gs.morphs.Plane())
    plane.set_friction(1)


    SpaceX = scene.add_entity(
        gs.morphs.URDF(
            file='Spacecraft surface/surface/placesurface/urdf/placesurface.urdf', #'resources/6/6.obj',
            pos=(-0, 0, 5),
            euler=(0, 0, 0),
            scale=3,
            convexify=False,

        ),
    )
    cube = scene.add_entity(
        gs.morphs.Box(
            size=(2, 2, 2),
            pos=(0., 0.0, 14),
        )
    )

    # SpaceSpider = scene.add_entity(
    #     gs.morphs.URDF(
    #         file='resources/SphereAnkle/urdf/SphereAnkle.urdf',
    #         pos=(0, 0, 13),  # pos =(-2, 0., 7),
    #         euler=(0, 0, 0),
    #         # fixed=True,
    #
    #     ),
    #     material=gs.materials.Rigid(gravity_compensation=0),
    # )

    B = args.n_envs

    scene.build(n_envs=B, env_spacing=(40, 40))
    # scene.build()

    for j in range(4000):
        scene.step()


if __name__ == "__main__":
    main()

issue_codeand3dmodel.zip

Expected Behavior

Is it a problem with the model? If it is a problem with the model, some suggestions can be given on how to establish an efficient and accurate 3D model.

Environment

  • OS: [e.g. Windows 10 ]
  • GPU/CPU [e.g. intel 14700h]
  • GPU-driver version (RTX 4070)
  • CUDA / CUDA-toolkit version (12.2)

Release version or Commit ID

genesis-world 0.2.1

Xu-Xuanhui avatar Mar 25 '25 08:03 Xu-Xuanhui