Setting acceleration of object using plugins
Hi,
I was going through the Gazebo model plugin tutorials (http://gazebosim.org/tutorials?tut=pluginsmodel&ver=1.9%2B&cat=writeplugin). I was successfully able to set velocity of the object and make it move.
However,without changing anything else, instead of using SetLinearVel, when I used SetLinearAccel, the box did not move at all.
This is the relevant section of my code (all I did was to replace SetLinearVel in the Original code with SetLinearAccel)
public: void OnUpdate(const common::UpdateInfo & /*_info*/)
{
// Apply a linear acceleration to the model.
this->model->SetLinearAccel(math::Vector3(1,0,0));
printf("Acceleration Set\n"); //Just to see whether the function is working (and it did print it)
}
Please help me figure out what the problem is.