Set an instant velocity on Gazebo
Hello,
I am working on Gazebo 7 with ROS kinetic. So, here is my problem, I have that code function :
void SetVelocity(const double &_vel)
{
this->model->GetJointController()->SetVelocityTarget(this->joint->GetScopedName(), _vel);
}
It's used to set a velocity to my pioneer, it's working pretty well but I want the velocity to be instant. For exemple, when I set it to a velocity of 30 and then a velocity of 0, it will take so many time to stop. What are the solutions ? Here is the rest of the code :
this->model = _model;
this->joint = _model->GetJoints()[0];
this->pid = common::PID(0.1, 0, 0, 1000, -1000, 1000, -1000);
this->model->GetJointController()->SetVelocityPID(this->joint->GetScopedName(), this->pid);
Thank in advance.