Use native C++ API or python bindings

Hi! I’m wondering if there is a possibility to load in plugins in our robot for custom sensors/controllers/etc. In some of the URDF examples I found a references to a gazebo plugin which hinted at the possibility to use native C++:

  <!-- <gazebo>
  <plugin name="gazebo_ros_control" filename="libgazebo_ros_control.so">
    <robotNamespace>/${robot_name}</robotNamespace>
  </plugin>
</gazebo> -->

I’m aware that it is commented in the URDF but I’m wondering if there is a way to make something like this work (maybe using python bindings)?

Thank you,
Fuda van diggelen

1 Like

Hi @fuda.van.diggelen ,

We don’t support direct C/C++ access in Isaac Gym, but you can certainly use PyBind to call into C++ code from Python to do whatever you want on the control side. You won’t have any additional sensor access that way however - all physics state tensor reading still needs to go through the Python APIs, and you’d have to pass data from there to C++.

We’re looking at providing some example code for this kind of integration in the future, but we don’t have anything currently available.

Take care,
-Gav

1 Like

Hi Gav,

Would using Cython be a possible work around to this, to regain some of the speed of C/C++?

Or would there be compatibility issues preventing this?