Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Setting acceleration of object using plugins

Hi,

I was going through the Gazebo model plugin tutorials (http://gazebosim.org/tutorials?tut=plugins_model&ver=1.9%2B&cat=write_plugin). I was successfully able to set velocity of the object and make it move.

bold However,without changing anything else, instead of using SetLinearVel, when I used SetLinearAccel, the box did not move at all.bold

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.

Setting acceleration of object using plugins

Hi,

I was going through the Gazebo model plugin tutorials (http://gazebosim.org/tutorials?tut=plugins_model&ver=1.9%2B&cat=write_plugin). I was successfully able to set velocity of the object and make it move.

bold However,without changing anything else, instead of using SetLinearVel, when I used SetLinearAccel, the box did not move at all.bold

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.

Setting acceleration of object using plugins

Hi,

I was going through the Gazebo model plugin tutorials (http://gazebosim.org/tutorials?tut=plugins_model&ver=1.9%2B&cat=write_plugin). 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) SetLinearAccel)

public: void OnUpdate(const common::UpdateInfo & /_info/)
    /*_info*/)
{
   // Apply a linear acceleration to the model.

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.