SofaDefrost / SofaGym

Machine Learning framework for Sofa
68 stars 10 forks source link

[envs] SimpleMaze, component removed #11

Closed hunoutl closed 1 year ago

hunoutl commented 1 year ago

SimpleMaze contains components that have been removed from Sofa. I tried some tweaks on the sphere object but it wasn't great and this is only the 1st mistake of this type. I think this scene has others. The error output:

[ERROR]   [SofaRuntime] ValueError: Object type Sphere<> was not created  
The object is not in the factory.  
This component has been REMOVED since SOFA v20.06 (deprecated since v19.12). Please consider updating your scene. If this component is crucial to you please report that to sofa-dev@ so that we can reconsider this component for future re-integration.  

Traceback (most recent call last):
  File "/home/hunoutl/SOFA/SofaGym/sofagym/rpc_client.py", line 174, in <module>
    root = init_simulation(config, _startCmd, mode='simu')
  File "/home/hunoutl/SOFA/SofaGym/sofagym/simulate.py", line 49, in init_simulation
    create_scene(root,  config, mode = mode)
  File "/home/hunoutl/SOFA/SofaGym/sofagym/envs/SimpleMaze/SimpleMazeScene.py", line 86, in createScene
    sphere.addObject("Sphere", radius='2.0', name='0', color=[255, 0, 0, 255])
[ERROR]   [SofaRuntime] ValueError: Object type Triangle<> was not created  
The object is not in the factory.  
This component has been REMOVED since SOFA v20.06 (deprecated since v19.12). Please consider updating your scene. If this component is crucial to you please report that to sofa-dev@ so that we can reconsider this component for future re-integration.  

Traceback (most recent call last):
  File "/home/hunoutl/SOFA/SofaGym/sofagym/rpc_client.py", line 174, in <module>
    root = init_simulation(config, _startCmd, mode='simu')
  File "/home/hunoutl/SOFA/SofaGym/sofagym/simulate.py", line 49, in init_simulation
    create_scene(root,  config, mode = mode)
  File "/home/hunoutl/SOFA/SofaGym/sofagym/envs/SimpleMaze/SimpleMazeScene.py", line 118, in createScene
    maze.addObject("Triangle", group=1)
alxbilger commented 1 year ago

Try with SphereModel and TriangleModel

hunoutl commented 1 year ago

Like this ? sphere.addObject("SphereModel", radius='2.0', name='0', color=[255, 0, 0, 255]) Doesn't work

alxbilger commented 1 year ago

Do you have an error message with SphereModel?

alxbilger commented 1 year ago

And with SphereCollisionModel and TriangleCollisionModel?