-
Notifications
You must be signed in to change notification settings - Fork 137
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
add vispy renderer to allow offscreen rendering with python #60
Conversation
Hi @wangg12 , thanks for your addition of the vispy renderer. If it yields the same results faster than the glumpy renderer and offscreen, we should definitely add it. I guess pyrender would be another alternative, but vispy has a conveniently similar API to glumpy.
We can still let users adapt pip install -r requirements.txt -e . I use the package this way myself and I think others would benefit as well since the utility functions are also useful outside the |
Hi @MartinSmeyer, I think the hack for egl is not needed after pyopengl updated. I will update the README.md and remove the sys.path stuff. |
Hi @MartinSmeyer @thodan, I have updated the doc, but I am not sure whether it is appropriate. Feel free to tell me how it can be improved. |
Co-authored-by: Martin Sundermeyer <msundermeyer@gmx.de>
Co-authored-by: Martin Sundermeyer <msundermeyer@gmx.de>
Co-authored-by: Martin Sundermeyer <msundermeyer@gmx.de>
Co-authored-by: Martin Sundermeyer <msundermeyer@gmx.de>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @wangg12, I have tested it and it works well.
Hi, in this pull request, I add a
vispy
version renderer to allow offscreen rendering with python. The code is mainly adapted from theglumpy
version python renderer while the rendering engine is changed tovispy
.glumpy
andvispy
have similar apis, however,vispy
allows us to useegl
for offscreen rendering.I have done two types of tests:
(1) compare the difference of the rendered results using "cpp", "python", and "vispy" renderer:
run the code for different types of renderers, and check the difference:
The difference is very small, especially for the
glumpy("python")
andvispy
, since they only differ in some apis. BTW, it seems thevispy
version is faster than thecpp
andglumpy
version.(2) Run the bop evaluation with a sample result file hodan-iros15_lmo-test.csv:
Evaluation results using
cpp
renderer:Evaluation results using
python
(glumpy) renderer:Evaluation results using
vispy
renderer:The
vispy
andpython (glumpy)
evaluation results are exactly the same, and thecpp
version is slightly different.Again, the
vispy
version looks faster.So I think the vispy renderer is safe to be added. Maybe some more tests are also needed.
@thodan @MartinSmeyer Could you take a look into this?