Skip to content
This repository has been archived by the owner on Jan 1, 2024. It is now read-only.

experiments/grasp_data_collection.py digit rendering error #14

Open
shivanimall opened this issue Apr 21, 2021 · 7 comments
Open

experiments/grasp_data_collection.py digit rendering error #14

shivanimall opened this issue Apr 21, 2021 · 7 comments

Comments

@shivanimall
Copy link

shivanimall commented Apr 21, 2021

Hi @robertocalandra,

I am on a macOS, I am rendering using physicsClient = pb.connect(pb.GUI) instead of physicsClient = pb.connect(pb.DIRECT) in experiments/grasp_data_collection.py and note I also tried changing the visualize sensor argument to True when initializing digits.

these lines result in the following error:
color, depth = digits.render()
digits.updateGUI(color, depth)

    color, depth = digits.render()
  File "/Users/shivanimall/tacto/tacto/sensor.py", line 274, in render
    color, depth = self._render_static()
  File "/Users/shivanimall/tacto/tacto/sensor.py", line 245, in _render_static
    colors, depths = self.static
  File "/Users/shivanimall/tacto/tacto/sensor.py", line 238, in static
    colors, _ = self.renderer.render(noise=False)
  File "/Users/shivanimall/tacto/tacto/renderer.py", line 515, in render
    color, depth = self.r.render(self.scene)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyrender/offscreen.py", line 102, in render
    retval = self._renderer.render(scene, flags, seg_node_map)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyrender/renderer.py", line 125, in render
    self._update_context(scene, flags)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyrender/renderer.py", line 738, in _update_context
    p._add_to_context()
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/pyrender/primitive.py", line 324, in _add_to_context
    self._vaid = glGenVertexArrays(1)
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/OpenGL/latebind.py", line 41, in __call__
    return self._finalCall( *args, **named )
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/OpenGL/wrapper.py", line 674, in wrapperCall
    raise err
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/OpenGL/wrapper.py", line 667, in wrapperCall
    result = wrappedOperation( *cArguments )
  File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/OpenGL/error.py", line 228, in glCheckError
    raise GLError(
OpenGL.error.GLError: GLError(
	err = 1282,
	description = b'invalid operation',
	baseOperation = glGenVertexArrays,
	pyArgs = (1, <object object at 0x12050f2d0>),
	cArgs = (1, array([3], dtype=uint32)),
	cArguments = (1, array([3], dtype=uint32))
)```


seems like comes from pyrender - 
@shivanimall
Copy link
Author

looks similar to this mmatl/pyrender#169

@shivanimall
Copy link
Author

shivanimall commented Apr 22, 2021

Hello @robertocalandra, would appreciate if you can take a look at this, thank you!

1/ also, have a digit related question: I understand that digit is just another mesh object, but wondering what are the units of the default loaded digit object?

@wx405557858
Copy link
Contributor

Hi @shivanimall, yeah, it seems that macOS would have this error. It might caused by conflicting flags between pyrender & pybullet on macOS. Does the pb.DIRECT works for you? Also, is there any chance you could try to run it at Ubuntu? It can be much easier to set up. We will add this recommendation to the README.

The unit of digit should follow the default unit of URDF, which is meters.

@shivanimall
Copy link
Author

shivanimall commented Apr 26, 2021

thanks for the response @wx405557858. yes, pb.Direct does work but that will create a headless simulation. Being able to visualize my simulation would be helpful for my problem. unfortunately, I don't have access to a linux machine with a GUI either.

Any other workarounds so that I can visualize the depth/color maps and see the GUI for the gripper in action?

@shivanimall
Copy link
Author

Hi @wx405557858 - Erwin from bullet mentioned a support for this: bulletphysics/bullet3#3844

@wx405557858
Copy link
Contributor

Hi @shivanimall ,

Wow, this is awesome! So multi-processing should solve the problem! I probably don't have enough bandwidth for testing it this month, but can look into it in the summer! If you are interested, would you mind giving it a try and we can merge the code if it works! Thank you!

@shivanimall
Copy link
Author

shivanimall commented May 18, 2021

Hi @wx405557858,

yes indeed!! yes, I am giving this a try, and that sounds great :) will update once I have something working.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants