Vrep simulation time to real time
Posted: 05 Jul 2016, 16:25
Hi,
I have a simulation built up in vrep and it has a floor of 15mx15m.
And I have a model of Pioneer_3dx which uses differential drive.
I published velocities for it left and right motor as 1 and let ros sleep for 1s, hoping that the pioneer will move forward by 1. But it is not, and the avergae distance that it travelled in between this 1s using the velocity is around 0.28.
Here's the code (I'm using torch-ros so the ros code is in lua):
mot_velL_msg.data = 1
mot_velR_msg.data = 1
setMotVelL_pub:publish(mot_velL_msg)
setMotVelR_pub:publish(mot_velR_msg)
ros.Time.sleepUntil(ros.Time.now() + 1)
So I suppose the time in vrep has a different scale from the ros time, or the distance has a different scale? If so can someone help me with it as how to map this scale, as I need a relatively precision on this control?
Thanks in advance!
I have a simulation built up in vrep and it has a floor of 15mx15m.
And I have a model of Pioneer_3dx which uses differential drive.
I published velocities for it left and right motor as 1 and let ros sleep for 1s, hoping that the pioneer will move forward by 1. But it is not, and the avergae distance that it travelled in between this 1s using the velocity is around 0.28.
Here's the code (I'm using torch-ros so the ros code is in lua):
mot_velL_msg.data = 1
mot_velR_msg.data = 1
setMotVelL_pub:publish(mot_velL_msg)
setMotVelR_pub:publish(mot_velR_msg)
ros.Time.sleepUntil(ros.Time.now() + 1)
So I suppose the time in vrep has a different scale from the ros time, or the distance has a different scale? If so can someone help me with it as how to map this scale, as I need a relatively precision on this control?
Thanks in advance!