plugin in gazebo
Hi I am trying to make a plugin in gazebo to control a 1 joint urdf model. I am able to give it tourque by this command -
this->only_joint_->SetForce(0,(-10*(this->only_joint_->GetAngle(0)));
but if i try giving a different command like-
this->only_joint_->SetForce(0,(-3*this->only_joint_->GetVelocity(0)+10*(this->only_joint_->GetAngle(0)));
it isn't willing to compile. any idea?
Thanks Nachum
For questions like this, it is very helpful if you add the actual error message you encounter. (You can edit your post to do that)
GetAngle(0) returns a gazebo::math::Angle object, you need to invoke the GetAngle().GetAsRadian() member function as you did in your own answer below.