-
Hi, I wanted to do a modification of Batch sensor, where you would only supply one sensor along with a parametrized position in a xml file (ie. automatically expanding one sensor into bunch of sensors on a line with equidistant spacing). However I have trouble finding, how to make a proper deep copy of an object ?
And I would like to take the sensor instance and copy it N times, each as a new unique sensor, but with the same parameters. Is there any clean way of doing this ? I'm quite lost. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Hi @xacond00 , I think you can define a new "shell" sensor type and leverage the
and then within your xml for instance you would have
I've likely omitted some steps here, but hopefully this is enough to give you the general idea. I would also recommend looking at the implementation of the Distant radiancemeter sensor |
Beta Was this translation helpful? Give feedback.
Hi @xacond00 ,
I realised it's a bit more involved so I had a quick go at implementing what I had suggested:
src/sensors/repeater.cpp