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

TypeError: generate_surface_mesh() got an unexpected keyword argument 'angle_bound' #5

Open
Pengfeicc opened this issue May 30, 2022 · 5 comments

Comments

@Pengfeicc
Copy link

When I was running generate_superquadric_mesh.py, and got a error:

(syntheticGen) chu@U2G:~/pybullet-object-models/pybullet_object_models/superquadric_objects$ python generate_superquadric_mesh.py
Traceback (most recent call last):
File "generate_superquadric_mesh.py", line 36, in
distance_bound=0.005
TypeError: generate_surface_mesh() got an unexpected keyword argument 'angle_bound'

my conda python enviroment is py37 and i have installed all pip packages. The test_load_object_pybullet.py could run sucessfully

@bibbygoodwin
Copy link

I think this is down to the version of pygalmesh that you are using. I had to go to <0.8 in order to get to a version where pygalmesh.generate_surface_mesh takes angle_bound as an argument. I don't think this repo has been updated, so isn't compatible with the newer versions.

I'm still unable to get generate_superquadric_mesh.py to run, though, because of a trimesh issue on L43.

Also, having run generate_urdf_model.py using the .obj included in the repo, I find that test_load_object_pybullet.py doesn't work properly for me - I get a PyBullet error relating to being unable to load the mesh from the .obj file:

b3Printf: /Users/me/Code/pybullet-object-models/pybullet_object_models/superquadric_objects/sq_0.1_0.02_0.1_0.9_0.9/: cannot extract anything useful from mesh '/Users/me/Code/pybullet-object-models/pybullet_object_models/superquadric_objects/sq_0.12_0.12_0.12_0.9_0.9/model.obj'

b3Printf: b3Warning[examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.cpp,558]:

b3Printf: issue extracting mesh from COLLADA/STL file /Users/me/Code/pybullet-object-models/pybullet_object_models/superquadric_objects/sq_0.12_0.12_0.12_0.9_0.9/model.obj

@bibbygoodwin
Copy link

^ For anyone else facing the above error, I hadn't realised that the .obj files currently in the repo are just placeholders/git SHA references.

In the end, the fix for generating .obj with generate_superquadric_mesh.py was to change

meshio.write(os.path.join(obj_dir, "model.obj"), mesh, file_format="stl")
to save into the file format "obj" rather than "stl". This removed the trimesh error I was previously getting. The resulting .obj files (both before and after trimesh filtering) are opened successfully by Pybullet in the context of their URDFs.

@Pengfeicc
Copy link
Author

Pengfeicc commented Sep 20, 2022 via email

@wukongwong
Copy link

I think this is down to the version of pygalmesh that you are using. I had to go to <0.8 in order to get to a version where pygalmesh.generate_surface_mesh takes angle_bound as an argument. I don't think this repo has been updated, so isn't compatible with the newer versions.

I'm still unable to get generate_superquadric_mesh.py to run, though, because of a trimesh issue on L43.

Also, having run generate_urdf_model.py using the .obj included in the repo, I find that test_load_object_pybullet.py doesn't work properly for me - I get a PyBullet error relating to being unable to load the mesh from the .obj file:

b3Printf: /Users/me/Code/pybullet-object-models/pybullet_object_models/superquadric_objects/sq_0.1_0.02_0.1_0.9_0.9/: cannot extract anything useful from mesh '/Users/me/Code/pybullet-object-models/pybullet_object_models/superquadric_objects/sq_0.12_0.12_0.12_0.9_0.9/model.obj'

b3Printf: b3Warning[examples/SharedMemory/plugins/tinyRendererPlugin/TinyRendererVisualShapeConverter.cpp,558]:

b3Printf: issue extracting mesh from COLLADA/STL file /Users/me/Code/pybullet-object-models/pybullet_object_models/superquadric_objects/sq_0.12_0.12_0.12_0.9_0.9/model.obj

how to install pygalmesh of version lower than 0.8?

@bibbygoodwin
Copy link

I think just pip install "pygalmesh<0.8" IIRC

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

3 participants