bambooflow Note

7.4

最終更新:

bambooflow

- view
メンバー限定 登録/ログイン

7.4. General

The joint geometry parameter setting functions should only be called after the joint has been attached to bodies, and those bodies have been correctly positioned, otherwise the joint may not be initialized correctly. If the joint is not already attached, these functions will do nothing.
ジョイントの幾何学パラメータの設定する関数はジョイントの剛体の接続 を行った後でなければならない。そして、それらの剛体は正確な位置を持っている。そうでなければ、ジョイントは正確に初期化されない可能性がある。もし、 ジョイントがまだ接続されてない場合、これらの関数は何もしない。

For the parameter getting functions, if the system is out of alignment (i.e. there is some joint error) then the anchor/axis values will be correct with respect to body 1 only (or body 2 if you specified body 1 as zero in the dJointAttach function).
パラメータを取得する関数で、システムが配置外(たとえば、ジョイントエラーであるとか)のとき、アンカー/軸値は剛体1(もしくはdJointAttach関数でゼロとして剛体1が指定されている場合は剛体2)に関してのみ正しくなるだろう。

The default anchor for all joints is (0,0,0). The default axis for all joints is (1,0,0).
すべてのジョイントのデフォルトのアンカーは(0,0,0)である。すべてのジョイントのデフォルト軸は(1,0,0)である。

When an axis is set it will be normalized to unit length. The adjusted axis is what the axis getting functions will return.
軸が設定されるとそれは単位長に正規化される。調整された軸は、軸を取得した関数が返す。

When measuring a joint angle or position, a value of zero corresponds to the initial position of the bodies relative to each other.
ジョイントの角度もしくは位置を測定するとき、お互いに関係する剛体の初期位置はゼロの値と一致する。

Note that there are no functions to set joint angles or positions (or their rates) directly, instead you must set the corresponding body positions and velocities.
注意として、直接ジョイントの角度、位置(または、これらの比率)を設定する関数はない。そのかわり、剛体の位置と速度を一致すように設定しなければならない。

7.5. Stop and motor parameters ストップとモータパラメータ

When a joint is first created there is nothing to prevent it from moving through its entire range of motion. For example a hinge will be able to move through its entire angle, and a slider will slide to any length.
ジョイントが初めて生成されたときは、動きの全範囲において移動を防ぐ ものは何もない。例えば、ヒンジはその全角度を通って移動することができる。また、スライダーは任意の長さで動く。

This range of motion can be limited by setting stops on the joint. The joint angle (or position) will be prevented from going below the low stop value, or from going above the high stop value. Note that a joint angle (or position) of zero corresponds to the initial body positions.
動きの範囲はジョイントのストップを設定することで拘束できる。ジョイ ント角度(位置)は下限ストップ値を下まわるか、上限ストップ値を上まわってから防がれる。注意することとして、ゼロのジョイント角度(位置)は初期の剛 体のポジションに相当する。

As well as stops, many joint types can have motors. A motor applies a torque (or force) to a joint's degree(s) of freedom to get it to pivot (or slide) at a desired speed. Motors have force limits, which means they can apply no more than a given maximum force/torque to the joint.
ストップと同様に、多くのジョイントの種類はモータを持つことができ る。モータは希望の速度で回転(スライド)させるために自由度のジョイント角度(s)にトルク(力)を与える。

Motors have two parameters: a desired speed, and the maximum force that is available to reach that speed. This is a very simple model of real life motors, engines or servos. However, is it quite useful when modeling a motor (or engine or servo) that is geared down with a gearbox before being connected to the joint. Such devices are often controlled by setting a desired speed, and can only generate a maximum amount of power to achieve that speed (which corresponds to a certain amount of force available at the joint).
モータには2つのパラメータがある:希望の速度、そして指定速度範囲内 で利用可能な最大の力である。これは実際のエンジン・サーボモータのとても単純なモデルである。しかしながら、ジョイントに接続される前のギヤボックスで 減速させたモータ(エンジン・サーボ)の場合には、大いに有用である。そのような装置は、希望の速度設定で頻繁に制御され、その速度を達成する最大量の力 を単に生成することができる(ジョイントで利用可能なある量の力に相当するどれか)。

Motors can also be used to accurately model dry (or Coulomb) friction in joints. Simply set the desired velocity to zero and set the maximum force to some constant value - then all joint motion will be impeded by that force.
モータはジョイントの乾き(クーロン)摩擦の正確なモデルにも用いることができる。単純にゼロの速度に設定され、いくつかの定数で最大の力を設定する。そのとき全てのジョイントの動きはその力によって邪魔される。

The alternative to using joint stops and motors is to simply apply forces to the affected bodies yourself. Applying motor forces is easy, and joint stops can be emulated with restraining spring forces. However applying forces directly is often not a good approach and can lead to severe stability problems if it is not done carefully.
ストップとモータ(運動)のジョイントを使用することを選ぶには、剛体に単純に力を与えることである。モータの力を与えることは簡単で、ジョイントのストップはスプリングの力で静止することによってエミュレートできる。しかしながら直接力を与えることはあまり良い方法ではなく、注意しなければ深刻な不安定な問題を起こしかねない。

Consider the case of applying a force to a body to achieve a desired velocity. To calculate this force you use information about the current velocity, something like this:
force = k * (desired speed - current speed)

This has several problems. First, the parameter k must be tuned by hand. If it is too low the body will take a long time to come up to speed. If it is too high the simulation will become unstable. Second, even if k is chosen well the body will still take a few time steps to come up to speed. Third, if any other ``external'' forces are being applied to the body, the desired velocity may never even be reached (a more complicated force equation would be needed, which would have extra parameters and its own problems).

Joint motors solve all these problems: they bring the body up to speed in one time step, provided that does not take more force than is allowed. Joint motors need no extra parameters because they are actually implemented as constraints. They can effectively see one time step into the future to work out the correct force. This makes joint motors more computationally expensive than computing the forces yourself, but they are much more robust and stable, and far less time consuming to design with. This is especially true with larger rigid body systems.

Similar arguments apply to joint stops.

7.5.1. Parameter Functions

Here are the functions that set stop and motor parameters (as well as other kinds of parameters) on a joint:
ジョイントにおいての停止とモータのパラメータ(他の種類のパラメータ と同様)を設定する関数:

void dJointSetHingeParam (dJointID, int parameter, dReal value);
void dJointSetSliderParam (dJointID, int parameter, dReal value);
void dJointSetHinge2Param (dJointID, int parameter, dReal value);
void dJointSetUniversalParam (dJointID, int parameter, dReal value);
void dJointSetAMotorParam (dJointID, int parameter, dReal value);
dReal dJointGetHingeParam (dJointID, int parameter);
dReal dJointGetSliderParam (dJointID, int parameter);
dReal dJointGetHinge2Param (dJointID, int parameter);
dReal dJointGetUniversalParam (dJointID, int parameter);
dReal dJointGetAMotorParam (dJointID, int parameter);
Set/get limit/motor parameters for each joint type. The parameter numbers are:
書くジョイントの種類に対して限界/モータ パラメータの設定/取得する。パラメータ番号は次のとおり:
dParamLoStop Low stop angle or position. Setting this to -dInfinity (the default value) turns off the low stop. For rotational joints, this stop must be greater than - pi to be effective.角度か位置の下限。-dInfinity(デフォルト値) を設定すると下限をなくす。回転するジョイントについては、この限度は有効にするには-piより大きくなければはならない。
dParamHiStop High stop angle or position. Setting this to dInfinity (the default value) turns off the high stop. For rotational joints, this stop must be less than pi to be effective. If the high stop is less than the low stop then both stops will be ineffective. 角度か位置の上限。dInfinity(デフォルト値)を 設定すると上限をなくす。回転するジョイントについては、この限度が有効にするにはpi未満でなければならない。下限より大きく、上限より小さい場合、両 方の拘束は効果を持たない。
dParamVel Desired motor velocity (this will be an angular or linear velocity). 希望のモータ速度(これは角速度か線形速度になる)。
dParamFMax The maximum force or torque that the motor will use to achieve the desired velocity. This must always be greater than or equal to zero. Setting this to zero (the default value) turns off the motor. 希望速度に達するためにモータが使用する最大の力またはトルク。これはいつもに0以上である。0(デフォルト値)に設定するとモータは動かない。
dParamFudgeFactor The current joint stop/motor implementation has a small problem: when the joint is at one stop and the motor is set to move it away from the stop, too much force may be applied for one time step, causing a ``jumping'' motion. This fudge factor is used to scale this excess force. It should have a value between zero and one (the default value). If the jumping motion is too visible in a joint, the value can be reduced. Making this value too small can prevent the motor from being able to move the joint away from a stop.現在のジョイントの停止/モータの技術は少し問題がある: ジョイントが1つの停止にあり、モータは、停止から動くように設定した場合、あまりに力が必要となり、1ステップで適用され、その結果"飛ぶ"動作を引き 起こす。このあいまいな要因はこの過剰な力を計るために使用される。それは、0と1(デフォルト値)の間の値で設定する。飛ぶ動作がジョイントにおいて目 障りな場合、値は縮小することができる。この値を小さくしすぎると、モータが停止からジョイントを動かすことできなくなるかもしれない。
dParamBounce The bouncyness of the stops. This is a restitution parameter in the range 0..1. 0 means the stops are not bouncy at all, 1 means maximum bouncyness. 停止の弾力性。これは範囲0..1の範囲の反発係数であ る。0はすべてで弾力がなくなり、1は弾力性が最大であることを意味する。
dParamCFM The constraint force mixing (CFM) value used when not at a stop. 停止でない場合に使用される拘束力混合(CFM)値。
dParamStopERP The error reduction parameter (ERP) used by the stops. 停止で使用されるエラー縮小パラメータ(ERP)。
dParamStopCFM The constraint force mixing (CFM) value used by the stops. Together with the ERP value this can be used to get spongy or soft stops. Note that this is intended for unpowered joints, it does not really work as expected when a powered joint reaches its limit. 停止で使用される拘束力混合(CFM)値。ERP値と一緒 に、これは吸収性・柔軟性をもった停止を得るために使用できる。ここで注意することは、これは動力を持たないジョイントのために提供される。動力が供給さ れたジョイントがその限界に到着する場合、実際に予定通りに作動しない。
dParamSuspensionERP Suspension error reduction parameter (ERP). Currently this is only implemented on the hinge-2 joint.サスペンションのエラー縮小パラメーター(ERP)。現 在、これはhinge-2だけに使用される。
dParamSuspensionCFM Suspension constraint force mixing (CFM) value. Currently this is only implemented on the hinge-2 joint.サスペンションの拘束力混合(CFM)。現在、これは hinge-2だけに使用される。


If a particular parameter is not implemented by a given joint, setting it will have no effect.
特別なパラメータが、与えられたジョイントによって実行されない場合、 それの設定は効果がない。

These parameter names can be optionally followed by a digit (2 or 3) to indicate the second or third set of parameters, e.g. for the second axis in a hinge-2 joint, or the third axis in an AMotor joint. A constant dParamGroup is also defined such that: dParamXi = dParamX + dParamGroup * (i-1)

7.6. Setting Joint Torques/Forces Directly

Motors (see above) allow you to set joint velocities directly. However, you may instead wish to set the torque or force at a joint instead. These functions do just that. Note that they don't affect the motor, but simply call dBodyAddForce/dBodyAddTorque on the bodies attached to it.
モータ(上記参照)は、ジョイントの速度を直接設定することができる。 しかしながら、ジョイントでトルクか力を代わりに設定したいと思うかもしれない。これらの関数は単にそれをする。それらはモータに影響しないが、それに付 けられた剛体上のdBodyAddForce /dBodyAddTorqueを単に呼ぶことに注意する。

dJointAddHingeTorque(dJointID joint, dReal torque)
Applies the torque about the hinge axis. That is, it applies a torque with magnitude torque, in the direction of the hinge axis, to body 1, and with the same magnitude but in opposite direction to body 2. This function is just a wrapper for dBodyAddTorque

dJointAddUniversalTorques(dJointID joint, dReal torque1, dReal torque2)
Applies torque1 about the universal's axis 1, and torque2 about the universal's axis 2. This function is just a wrapper for dBodyAddTorque.

dJointAddSliderForce(dJointID joint, dReal force)
Applies the given force in the slider's direction. That is, it applies a force with magnitude force, in the direction slider's axis, to body1, and with the same magnitude but opposite direction to body2. This function is just a wrapper for dBodyAddForce.

dJointAddHinge2Torques(dJointID joint, dReal torque1, dReal torque2)
Applies torque1 about the hinge2's axis 1, and torque2 about the hinge2's axis 2. This function is just a wrapper for dBodyAddTorque.

dJointAddAMotorTorques(dJointID joint, dReal torque0, dReal torque1,
                      dReal torque2)
Applies torque0 about the AMotor's axis 0, torque1 about the AMotor's axis 1, and torque2 about the AMotor's axis 2. If the motor has fewer than three axes, the higher torques are ignored. This function is just a wrapper for dBodyAddTorque.

タグ:

ODE
記事メニュー
ウィキ募集バナー