Servo Motion?

Could someone explain how servo motion works and how the new types of controllers work? Thanks.

the controllers below… do search you should find info on the new motion actuators…

things like that page don’t help me that much.

Servo motion can be considered motion in the physical world, so it’s affected by gravity and friction, and the object as inertia (the object needs to be an Actor)

Motion is the decomposition of the previous: if you use dloc your are applying a delta of location to your object (a change in position, if you prefer)

I can’t tell you much more (my physics class was a loooong time ago :-). I’m experimenting myself …

ok tell be when you find out how you use this thing.

sorry, I don’t understand what you mean exactly in your last question …

Maybe if you could have a more precise question after trying it out yourself (on a simple cube object for example), it would help orient the answer.

By the way, using the freshly published 2.47 version motion seems limited to loc and rotate motion (no more torque and such)

no there is torque still. I have tryed the servo motion and it still seems like it did before 2.47 so I don’t see a difference.

Servo motion is a powerful way to achieve motion in the physical world. It consists in a servo controller that adjusts the force on the object in order to achieve a given speed, hence the name servo motion.

Achieving speed through force is a very natural method because this is how the real world works. It produces natural movements, avoids the collision problem unlike dLoc and interacts correctly with gravity unlike linV.

At the heart of the servo motion actuator there is a PID servo controller: it measures the speed error (= the difference between the target speed and the actual speed) and updates the force based on the error by applying a force that is proportional to the error (the ‘P’ coefficient) and proportional to the integral of the error (the ‘I’ coefficient). The higher the coefficients, the “harder” the speed control (= quick reaction); the lower the coefficients, the “softer” the speed control (=slow reaction, sliding effect).
Additionally you can limit the force along each axis so that the accelaration (or braking) force is limited.

To compare with the cruise control in a car, the P and I coefficient define how precise will be the control and the limit coefficients define the power of the engine and thus how quickly it will reach the target speed.

You can achieve a great variety of movement styles with the servo motion actuator, for example, by not limiting the force along the transversal axis, you get a strong reaction to sliding, which is equivalent to anysotropic friction.

The servo motion actuator applies forces; it is therefore not compatible with other actuators that sets the force too, i.e a simple motion force actuator or another servo motion, although it is possible to combine two servo motion actuators that works on different axis.

Here for example a request for Franky’s falling behavior during the Apricot dev: when Franky is falling, its falling speed should be limited (say to 10), as if there was air friction. The idea is to compensate the gravity when the speed reaches the limit. These settings will achieve the goal:

Local flag is not set => the speed is measured and the force is applied in global coordinates, required as we are compensating the gravity.
By setting small force limits on the X and Y axis, the horizontal movements of Franky are not disturbed, just a small friction.
The speed target of -9 on the Z axis sets the target falling speed.
The max force of 15 is sufficient to compensate the gravity (assuming the object mass is 1 and gravity is 9.81, the weigth is 9,81). If the object is heavier, increase that limit.
The min force of 0 means that the servo motion controller will no be able to speed-up the falling (would require negative force), Franky will fall naturally until it reaches -9 from which speed the servo motion will start to apply a positive force to block the speed.
The I coefficient of 0 means no bouncing in the speed: Franky will not slow down, it will simply stop falling faster.
The P coefficient of 10 means that a speed error of 1 is necessary to achieve a negative force that is high enough to compensate the gravity => the actual falling speed will be -10. Note that P is independent to mass: the actual force applied = Perrormass.

I hope this example sheds light on the operations of the servo motion actuator. You will have to experiment to explore all the possibilities.

OMG that deserves a copypasta to the wiki

post deleted by user

ah thank you for that. Would someone mind telling me how to make it seem like ice (I feel like a noob again, but no tuts :frowning: ah.)

Is servo motion applicable to actions (rigged animations)???
I can use motion to get the action going plus a motion actuator, but if i try servo motion I get the anim but no movement ???

Is servo motion applicable to actions (rigged animations)???

servo motion uses force; it is only applicable to dynamic object. It should NOT be used on rigid body as it does not control the rotation, only the speed.

To use it on a rigged character, set the skeleton to dynamic (don’t know if that works) or better, create an invisible object that will be the dynamic parent of the skeleton.

Note that to get object displacement that is perfectly synchronized with action, you can combine Ipo add mode actuator + action actuator. Ipo add mode allows to get precise displacement from the current position so that it’s easy to synchronize with the action. Ipo add mode works best with dloc/drot Ipo curves. Ipo add mode is not suitable for general purpose movements but it is ideal for complex animation, like the character climbing on a ledge.

Woah! This seems usefull but a bit hard to understand XD

On simple words if I have a box that I want to move around using forces so it accelerates nicely but I don’t want to make it accelerate infinitelly, then Servo Control would be the way to go isn’t it?

Another (long) question:
the normal way to make a character is to parent the armature to a box, this box is the thing that the player actually controls, the problem of this is that when the “character” runs over a slope it goes flying away using the slope angle, this can be solved with Servo control too? Or a more elaborated setup is needed anyways?

First question: yes

Second question: I’m not sure what you mean by flying away but running on slope is possible in two ways: 1) just use a servo motion, as it controls force, it will allow you to climb happily on slope: it will increase automatically the force to a level that is sufficient to beat the friction (within the limits you specify of course) 2) use the new direction constraint actuator: it will automatically align the box to the slope (good for cars, etc.)

I made a simple demo that demonstrate how the direction constraint actuator and the servo motion actuator can be combined : slidingProblem.blend

oh, i see my slope system is now obsolete, ill migrate to that one to see how well it works

I made a simple demo that demonstrate how the direction constraint actuator and the servo motion actuator can be combined : slidingProblem.blend

Awesome! This is exactly what I mean, thank Ben! Kudos for you.

Hi everyone!
I currently try to build some simple racing game and found this thread while searching.
Basically I would need a very similar control on my object(a shuttle) to the one that is used for the cube in the slidingproblem.blend file above.(at least thats what I think is a good option)

However I do not understand some aspects and would appreciate if you could explain them to me.
-For the UpKey in state2: Why ist he Z dimension limited in the actuator, that is triggered by the uparrow key as well. The up key does not do any movent to the Z direction right?
-Then in the state2 part of the logic bricks there is a sensor of the type “Actuator” which is connected to a “State” actuator. This state actuator obviously copies the logic bricks from state1 or not depending whether the constraint named “sliding” is active or not. But as far as I got it the actuator with the name “sliding” is always active – so it never copies the bricks (because of the NAND)??? So in my opinion this logic chain does not have any effect. Is that right?
-Moreover I do not really understand the first logic chain in state1 which always triggers a “Orientation constraint” actuator. Can anyone explain the effect on this scene. I read the general description of this actuator. But somehow I cant figure out the effect in this file.

Another thing is that I would like the my object not to have the same distance from the ground all the time. When my shuttle (or car – don’t know yet) is jumping over a jump I would like it to fly some time before it gets back to the ground.However the constraint actuator keeps the distance constant here.

Moreover I d like to add some kind of “jump” ability. I tried it with a simple Loc in Z direction but unfortionatly the cube comes back down completely skew and does not land on its bottom.

Thanks for your help!!


I love servo so far.

Only problem is I have to compromise between the following two things:

  1. Not limiting the transverse axis, to avoid Tokyo Drift
  2. Allowing the character to slide along walls.

I’ve tried using actual anistropic friction, but it has the same results against the walls (the character cannot move sideways and won’t slide along walls.)

Any idea how I can keep the character from sliding around like he’s on ice, while not snagging on to walls?