SetLinearVel() is not constant ?
Hello !
I am using GAZEBO 7 and ROS to make a simulation on pioneer3-AT for my internship.
I am facing a problem that is just blocking me for days, I have my plugin that at a specific moment is using the fonction SetLinearVel(), however, I can see that the model got an accéleration and then stop and just slide.
I wanted to know if there is a way to solve this issue ? I do need a constant velocity and I don't know how to do, here are my 2 functions :
void definirVitesseLineaire(const double x, const double y){
this->model->SetLinearVel(math::Vector3(x, y, 0));
}
void definirVitesseAngulaire(const double z){
this->model->SetAngularVel(math::Vector3(0, 0, z));
}
Even if my robot are going the same speed, they wont actually follow each other as they're supposed to do ( with my code ) because the ammount of time both of the functions above are being called is different from a robot to another. This is why I need a constant velocity.
Thank you in advance !
Consider posting you comment as an answer, esp the last sentence )
hello guys, sloretz thank you for that information. Now it's working pretty well, I am calling these functions at every world frame.
I converted the comment to an answer. I'm glad it working now shenki
shenki, accept the answer, please