simple actuator?
Posted: Sun Jan 23, 2011 1:20 pm
Hi everyone!
I use btRotationalLimitMotor for simulating simple actuator exerting specified torque on attached bodies.
I tried to implement gravity compensation using Jacobian Transpose method, but noticed that exerting torques are too large. E.g. in the following scene setting target force for motor between cones to "T = m * cross(motor->getAxis(), upperCone->getCOMPosition() - constraint->getPosition())" leads to oscillation around equilibrium configuration. Even when I decrease torque 10 times behaviour is the same.
Is there a better way to implement servo motor? Does the btRotationalLimitMotor use units other than N·m?
I use btRotationalLimitMotor for simulating simple actuator exerting specified torque on attached bodies.
Code: Select all
void BulletRotationalServoMotor::setTargetForce(float targetForce_)
{
targetForce = targetForce_;
motor->m_maxMotorForce = fabs(targetForce);
motor->m_enableMotor = motor->m_maxMotorForce > 0.01f;
if (motor->m_enableMotor) {
motor->m_targetVelocity = targetForce / motor->m_maxMotorForce * btScalar(BT_LARGE_FLOAT);
}
}
Is there a better way to implement servo motor? Does the btRotationalLimitMotor use units other than N·m?