Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

I don't know how to do this without a plugin, so in a plugin:

to get model linear velocity in x axis :

double vel = this->model->GetRelativeLinearVel().x;

to get joint angular velocity in x axis :

      physics::JointPtr joint;
      joint = this->model->GetJoint("jointName");
      double vel = this->joint->GetVelocity(0);