Class: MSPhysics::Servo
- Defined in:
- RubyExtension/MSPhysics/joint_servo.rb
Overview
Constant Summary
- DEFAULT_MIN =
-180.0.degrees
- DEFAULT_MAX =
180.0.degrees
- DEFAULT_LIMITS_ENABLED =
false- DEFAULT_RATE =
360.degrees
- DEFAULT_POWER =
0.0- DEFAULT_REDUCTION_RATIO =
0.1- DEFAULT_CONTROLLER =
nil
Constants inherited from Joint
Joint::DEFAULT_BODIES_COLLIDABLE, Joint::DEFAULT_BREAKING_FORCE, Joint::DEFAULT_SOLVER_MODEL, Joint::DEFAULT_STIFFNESS
Instance Method Summary collapse
-
#controller ⇒ Numeric?
Get servo controller.
-
#controller=(value) ⇒ Object
Set servo controller.
-
#cur_alpha ⇒ Numeric
Get current angular acceleration in radians per second per second.
-
#cur_angle ⇒ Numeric
Get current angle in radians.
-
#cur_omega ⇒ Numeric
Get current angular velocity in radians per second.
-
#initialize(world, parent, pin_tra, group = nil) ⇒ Servo
constructor
Create a servo joint.
-
#limits_enabled=(state) ⇒ Object
Enable/disable min & max angle limits.
-
#limits_enabled? ⇒ Boolean
Determine whether min & max angle limits are enabled.
-
#max ⇒ Numeric
Get maximum angle in radians.
-
#max=(value) ⇒ Object
Set maximum angle in radians.
-
#min ⇒ Numeric
Get minimum angle in radians.
-
#min=(value) ⇒ Object
Set minimum angle in radians.
-
#power ⇒ Numeric
Get rotational power in Watts.
-
#power=(value) ⇒ Object
Set rotational power in Watts.
-
#rate ⇒ Numeric
Get maximum angular rate in radians per second.
-
#rate=(value) ⇒ Object
Set maximum angular rate in radians per second.
-
#reduction_ratio ⇒ Numeric
Get angular reduction ratio.
-
#reduction_ratio=(value) ⇒ Object
Set angular reduction ratio.
Methods inherited from Joint
#address, all_joints, #bodies_collidable=, #bodies_collidable?, #breaking_force, #breaking_force=, #child, #connect, #connected?, #destroy, #disconnect, #dof, #get_pin_matrix, #get_pin_matrix2, #group, joint_by_address, #name, #name=, #parent, #set_pin_matrix, #solver_model, #solver_model=, #stiffness, #stiffness=, #type, #valid?, validate, #world
Methods inherited from Entity
Constructor Details
#initialize(world, parent, pin_tra, group = nil) ⇒ Servo
Create a servo joint.
Instance Method Details
#controller ⇒ Numeric?
Get servo controller.
#controller=(value) ⇒ Object
Set servo controller.
#cur_alpha ⇒ Numeric
Get current angular acceleration in radians per second per second.
#cur_angle ⇒ Numeric
Get current angle in radians.
#cur_omega ⇒ Numeric
Get current angular velocity in radians per second.
#limits_enabled=(state) ⇒ Object
This option has no effect if SP mode is enabled.
Enable/disable min & max angle limits.
#limits_enabled? ⇒ Boolean
This option has no effect if SP mode is enabled.
Determine whether min & max angle limits are enabled.
#max ⇒ Numeric
Get maximum angle in radians.
#max=(value) ⇒ Object
Set maximum angle in radians.
#min ⇒ Numeric
Get minimum angle in radians.
#min=(value) ⇒ Object
Set minimum angle in radians.
#power ⇒ Numeric
A power value of zero represents maximum power.
Get rotational power in Watts.
#power=(value) ⇒ Object
A power value of zero represents maximum power.
Set rotational power in Watts.
#rate ⇒ Numeric
Get maximum angular rate in radians per second.
#rate=(value) ⇒ Object
Set maximum angular rate in radians per second.
#reduction_ratio ⇒ Numeric
Reduction ratio is a feature that reduces angular rate of the joint when
its current angle nears its desired angle. Angular reduction ratio starts
acting upon the angular rate of the joint when the difference between the
current angle and the desired angle of the joint is less than rate *
reduction_ratio radians.
A reduction ratio of zero disables the reduction feature.
A typical reduction ratio value is 0.1.
Get angular reduction ratio.
#reduction_ratio=(value) ⇒ Object
Reduction ratio is a feature that reduces angular rate of the joint when
its current angle nears its desired angle. Angular reduction ratio starts
acting upon the angular rate of the joint when the difference between the
current angle and the desired angle of the joint is less than rate *
reduction_ratio radians.
A reduction ratio of zero disables the reduction feature.
A typical reduction ratio value is 0.1.
Set angular reduction ratio.