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));