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

Comments

Are you sure your simulation is able to achieve this update rate? At default the time step is 0.001 s. Is that enough for your case? Did you modify the step size?

kumpakri gravatar imagekumpakri ( 2019-06-20 08:19:31 -0500 )edit