Why not gazebo in python?
I wonder that why i can't find any wrapper module of gazebo into python(with boost.Python) so that one can
- import the python module
- setup the world
- load sdf or urdf dynamically
- run the world step by step
tips: I have tried the existed code pygazebo, but it is just a topic client in python, not really a python wrapper of gazebo(including server/physics and so on).
Asked by alpha on 2017-08-07 02:38:34 UTC
Answers
I actually did this for one my own applications. The way I did it though is not by wrapping a gazebo plugin, since I am not sure if that is even possible, but instead by wrapping a C++ library that is in charge of passing messages directly to Gazebo with the ignition transport library. On the Gazebo end I have a world plugin that handles these messages and forwards the callbacks. The C++ library is wrapped using Boost Python.
It would be interesting to know if there is a way to directly wrap Gazebo code; either a Gazebo plugin or any library able to obtain the world pointer dynamically.
Asked by hamzamerzic on 2017-08-07 05:22:42 UTC
Comments
Thank you for your time! expect directly wrap Gazebo code, there are two compromise solution: 1. wrap a message node(as you and pygazebo do) 2. wrap a gazebo stand alone program. both are not general solutions. I did 2 for one of my own applications, but i came up with ImportError when import the module i wrapped (i tried advice in https://stackoverflow.com/questions/11643666/python-importerror-undefined-symbol-for-custom-c-module, but it seems not work), do you have experience about this?
Asked by alpha on 2017-08-07 20:29:28 UTC
I have solved the ImportError.
Asked by alpha on 2017-08-07 21:26:34 UTC
I am glad you solved the issue! Could you please post more details here on how you made it work - from the standalone gazebo program, to the python issues that you mentioned. I know a lot of people (including me) will find that useful. Thank you very much! EDIT: I would be particularly interested to see how you managed to get the world pointer from a standalone program, so just a small snippet would be more than helpful! @alpha
Asked by hamzamerzic on 2017-08-08 08:29:04 UTC
Comments