Adding a custom camera sensor to a drone file?


The computer on which I’m running Sphinx does not have a GPU so that I cannot use the onboard simulated camera.

I’m thinking about using a basic pinhole camera within sphinx but I do not know how to correctly set it up. Is there any possibility to add one object within a .drone file directly ?

Thanks for your help.


You can’t add a new camera from within a .drone file. The only way you could do this would be by adding a simple camera model in your world with an attached model plugin that would move the camera at the same position as the actual front camera position of the drone. But that would be quite cumbersome to implement.

If you just want to see the view from the front camera in sphinx-client, you can right-click the drone and select follow, then change the GUI track_visual parameters to move the GUI camera in front of the drone.

Well, my requirement is to have a camera published to ROS to experiment with Sphinx. So, I would say, only the first cumbersome solution you suggest seems to fit, right ?

Even if cumbersome, I will probably give a try to that suggestion. Would have any resource to suggest for writing this model plugin and probably also having access to the appropriate link names.

Thanks for your help.

This tutorial explains how to create a model plugin:

You just have to write your own OnUpdate method like so:


and attach it to a camera model. Your camera model will then have the same pose as your drone.

Thanks for your help ; I will follow these directions.