Sensor data is not updating at a desired rate

asked 2019-06-14 16:57:58 -0500

Kal4394 gravatar image

I am creating a rotational 16 beam Lidar using gpuraysensor. I am controlling the rotational speed by using a ModelPlugin. In one complete rotation I wanted 2048 different position of joint. I loaded my sensor and joint in the Load function. Joint control and getting sensor data is done in onUpdate() function which is called from the Load function using this->updateConnection = event::Events::ConnectWorldUpdateBegin(std::bind(&myjoint::onUpdate, this));

I tracked the joint angle using joint->Position() and apply appropriate force such that I can achieve that. For each joint position, I also need the raysensor data. _mygpuraysensor->Ranges(vector_of_range); However, I am getting the same range value for multiple joint position. Does this mean that my sensor is not updating fast enough? I even increase the update rate in sdf file to very high value but it didn't make any difference. Is there any way to achieve this?

edit retag flag offensive close merge delete