The thing is i need to control the "zoom" of 2 visual sensors in order to keep track of some objectives, i have searched but i haven' t found a clear way on how to "modify" the zoom of the sensor during the simulation via code. If it is possible i would like to be able to do it via an external API python code, but if it would be enough if it can be done via child scripts and signals from the API. Any possibilities?
Thanks in advance
I need to control the zoom of visual sensor
Re: I need to control the zoom of visual sensor
Hello,
You can modify various settings of a vision sensor programmatically, e.g. in your case:
See also the other object parameter IDs.
Cheers
You can modify various settings of a vision sensor programmatically, e.g. in your case:
Code: Select all
sim.setObjectFloatParam(visionSensorHandle,sim.visionfloatparam_perspective_angle,viewAngle)
sim.setObjectInt32Param(visionSensorHandle,sim.visionintparam_resolution_x,resX)
sim.setObjectInt32Param(visionSensorHandle,sim.visionintparam_resolution_y,resY)
Cheers