Multiple Copies of same sensor plugin
I'm trying to write a sensor for Vizard that simply regurgitates a text file of (x, y, z) positions whenever the update function is called. Internally, it uses a vector to keep track of which sensor is associated with which file. This works as expected with one sensor.
When a second sensor is added, however, no data is returned and Vizard simply gets (0, 0, 0). I've tried outputting the memory address of the sensor that is passed as a parameter to the DLS and it is always the same. This suggests that either Vizard is never calling the update function with the second sensor, or that it is calling it with a pointer to the same sensor. I should note that each sensor does call the initialize function properly and that two separate memory addresses are received when they are initialized.
Any help would be greatly appreciated. Thanks!
|