Robotics StackExchange | Archived questions

Is there any alternative fot SetLinearVel() in ignition gazebo?

I am writing the HydraDemoPlugin for which I need to assign the velocity to the model. In Gazebo, there's a simple function called SetLinearVelocity. How to set the velocity of the model in ignition gazebo?

This is the code

double joyX = this->hydraMsgPtr->right().joy_x();
  double joyY = this->hydraMsgPtr->right().joy_y();

  // Move the model.
  this->model->SetLinearVel(
      ignition::math::Vector3d(-joyX * 0.2, joyY * 0.2, 0));

Asked by Adwait on 2021-05-05 02:31:51 UTC

Comments

Answers