Olivier Michel
Olivier Michel
My suggestion is to add (and maintain) python getters and setters in addition to the functions derived from Swig (to keep backwards compatibility).
@AhmedMoamen62: can you provide a simple example to explain what you mean?
OK, I see. But `WbCameraRecognitionObject` is a special case. In most cases, we have API functions like `webots::Camera::getImage()` (in C++) which we would like to translate in Python to `Camera.image`...
Yes, if you can quickly make a minimal proof-of-concept, that would be helpful.
> I wasn't sure about the names you export them as though. In the C documentation, these are given names beginning upper-case WB_ so I think that would lead someone...
The list of constants is computed by the [matlab script](https://github.com/cyberbotics/webots/blob/master/src/controller/matlab/mgenerate.py#L587-L706) and they will appear as files in the [matlab](https://github.com/cyberbotics/webots/tree/master/lib/controller/matlab) folder with uppercase filenames (not on github, but in your local...
> Also, is the roundabout import into Python using `ROTATIONAL = ctypes.c_int.in_dll(_wb, 'wb_ROTATIONAL').value` really necessary? I was under the (perhaps mistaken) impression that for vanilla types like ints, `ROTATIONAL =...
> If one version will be used only under the hood in the C source code (will it?), and the other version will be exported for other people to use,...
> The more explicit type conversion like that we have to do, the more annoying it will be to write the Python controller manually, though I can probably jerry-rig a...
I just added a helper function to make it easier for us to retrieve constants.