original articles, from " Blog Park, _ Aaron Clliu " http://www.cnblogs.com/clliu/, reprint please indicate the original article source.
First of all, the summer vacation early to graduate boss work, the task is very heavy, so there is little time to write essays. Need to contact me.
Yesterday, a netizen asked me webots how to add a spring, said to be a flexible robot. The rationale in the Adams add spring on the addition of one spring (in the use of webots before I use Adams), but webots inside like no spring this node, check the reference found webots inside or there, Just webots the spring damping into the servo.
Let's take a look at what the official references say:
Springs and Dampers
ThespringConstant
field specifies the value of the spring constant (or spring stiffness), usually denoted asK. ThespringConstant
Must be positive or zero. If thespringConstant
is zero (the default), no spring torque/force would be applied to the servo. If thespringConstant
is greater than zero, then a spring force would be computed and applied to the servo in addition to the other forces (i.e., Damping force). The spring force was calculated according to Hooke's law:F =-kx, whereKis thespringConstant
andxis the current servo position as represented by theposition
Field. Therefore, the spring force was computed so as to being proportional to the current servo position, and to move the servo back To its initial position. When designing a robot model that uses springs, it's important to remember that the spring's resting position for each SE Rvo would correspond to the initial position of the servo.
The dampingConstant
field specifies the value of the servo damping constant. The value of dampingConstant
must be positive or zero. If dampingConstant
is zero (the default), no damping torque/force would be added to the servo. If dampingConstant
is greater than zero, a damping torque/force would be applied to the servo in addition to the other forces (i.e., , spring force). This damping Torque/force was proportional to the effective servo velocity: F =-bv, where B is the Dampi NG constant, and v = dx/dt is the effective servo velocity computed by the physics simulator.
Simply put, the servo node can output motor forces, springs, damping, and we generally want a single spring force or damping force. This time need to take out the motor force, this can not use ode inside the common method, the servo Type property is set to none. Because the direction vectors of the spring force and damping are dependent on the direction vectors of the servo, we can set the motor force to 0 and the Maxfirce property to 0.
Here is an example, a demonstration of a heavy object oscillating under a spring, and this example should be more classic.
The model painting is rough, we forgive, the middle is also empty part, but the effect of this oscillation is realized.
This setting is also not very complex, it is necessary to set the type of the motor that acts as the spring as linear (linear), the servo shaft to do the right, the black line in the GIF. Set Maxfirce = 0,springconstant > 0 can be, this springconstant is the spring stiffness coefficient k.
The following gives the source file, do not see the specific look at the file settings.
source file Download
Webots Self-study note (ix) Spring and damping added