Applying Force Torque - modulabs/gazebo-tutorial GitHub Wiki
Introduction
μ΄μ§μΉ¨μλ μλ¬Όλ μ΄μ μ€μ ν ν¬μ νμ λͺ¨λΈμ κ°νλ λ°©λ²μ λν΄ κΈ°μ ν©λλ€.
Applying force and torque examples
κ°μ 보λ₯Ό μ¬μκ³ , insert tabμΌλ‘ λΆν° simple armμ insert ν©λλ€. κ·Έλ¦¬κ³ ν΄ λ°μ€λ‘ λΆν° λ°μ€λ₯Ό μ½μ μ λλ€, μ΄λ μλ¬Όλ μ΄μ μ λ©μΆμ§ λ§μΈμ

Apply force to a link
μ°λ¦¬λ μ¬νμμ νΉμ λ§ν¬μ νμ κ°νκΈ°λ₯Ό μν©λλ€. λ€λ₯Έ world treeμμ , arm_wrist_lift μ°μΈ‘ λ§μ°μ€ν΄λ¦νκ³ Apply Force/Torquλ₯Ό μ ννλλ€. λνμ°½μ νμ λκ³ , λΉμ μ μ§μ νμ΄νμ 컀λΈ(μμ μ μ΄λμ΄μλ)λ₯Ό 보κ²λ κ²λλ€.
λνμμμ 100n yμΆλ₯Ό μ ννκ³ μν°λ₯Ό μΉ©λλ€. μμ νμ νκΈ° μμν©λλ€. νμ λ§ν¬ y λ°©ν₯μΌλ‘ ν μ€ν μ μ©λμμ΅λλ€, λ°λ¦¬μ΄μ μ€λμ μμ΅λλ€. λ°λΌμ κ·Έμκ°μ ν° νμ΄ νμν©λλ€.

Apply torque to a link
λ§ν¬μ μ μ©νλλ°, νμ μ보μ°λ₯Ό μ νν©λλ€, νμ΄νλ μ΄ λ§ν¬λ₯Ό μμ§μ λλ€. ν ν¬μλμμ 100nm zμΆμ μ λ ₯νκ³ μ½κ°μ μκ°μ μ μ©ν©λλ€. νμ νλκ²μ 보기μν΄.

Apply force with an offset
μ΄μ λ°μ€μ νμ μ μ©ν©λλ€. μ€λ₯Έμͺ½ν€ λ₯Ό λ°μ€μ ν΄λ¦νκ³ , Apply Force/Torqueμ μ νν©λλ€. μλ‘μ λνμ°Έμ΄ λμ΅λλ€.
ν ν¬μλμμ, 100n x μΆμ μ νν©λλ€. λ€μμ μ΄ν리μΌμ΄μ ν¬μΈνΈ, y μΆ , μμͺ½ νμ΄νλ₯Ό λλ¦ λλ€, κ·Έκ²μ΄ 1m λλ¬ν λ κΉμ§, λΉμ μ λΉμ μ΄ νλλλ‘ νμ΄μ΄ μμ§μ΄λκ²μ λ³Όμμμ΅λλ€. μ μνμ μν°λ₯Ό λλ¦ λλ€. λ°μ€λνμ ν κ²λλ€, μν°λ₯Ό νλν©λλ€, λ°λ³΅ν΄μ μ€νμλλ₯Ό λκ² ν©λλ€.

The interface explained
Note: λΉμ μ΄ νμ΄λ ν ν¬λ₯Ό μλ¬Όλ μ΄μ λ©μΆμμλ μ€λ€λ©΄, κ·Έλ€μ μμΆν κ²λλ€. κ·Έλ¦¬κ³ μλ¬Όλ μ΄μ μ΄ μ μ§κ° νλ Έμλ νκΊΌλ²μ μ μ©μ΄ λ©λλ€.
Force
. X, Y, Z : κ°κ°μ νλλ μΌλ§λ λ§μ νμ΄ λ°©ν₯μ μ μ©μ΄ λλμ§ λͺ νν ν©λλ€, μ΄ νλ μμ link μ κ³ μ μ΄ λμ΄μμ΅λλ€.
. Mag: The total magnitude of the force which will be applied, which is the Euclidean norm of the 3 forces above. Changing the magnitude changes the XYZ fields proportionally, maintaining the force direction.
. Clear: Pressing this button will zero the X, Y, Z and Mag fields.
. Application point:By default, force is applied to the link's center of mass. Here you can edit the X, Y and Z fields to give the force an offset with respect to the link's origin expressed in the link's frame. Select Center of mass again to fill the XYZ fields with its coordinates.
Tip: Right-click the model and choose View -> Center of mass to see its position. You might want to also make the model transparent for that.
. Apply Force: νλ² μ€ν μ νλ²μ νμ μ μ©ν λ ν΄λ¦νμΈμ, μκ°μ€ν μ λ°λ¦¬μ΄μ μμλΌλκ²μ μμ§λ§μΈμ, κ·Έλμ ν° μΆ©λμ μ£ΌκΈ°μν΄μλ ν° νμ μ€ νμκ° μμ΅λλ€.
Torque
. X, Y, Z: κ° νλλ μΌλ§λ λ§μ ν ν¬κ° μ μ©μ΄ λλμ§ λ³΄μ¬μ€λλ€. μ΄ νλ μμ λ§ν¬μ κ³ μ λμ΄ μμ΅λλ€.
. Mag: μ 체μ μΈ ν ν¬μ λ±κΈμ΄ μ μ©λ κ²λλ€. xyzνλμ λΉμ¨λ¨μλ‘ λ°κΎΈμ΄ μ€μ μμ΅λλ€. λ°©ν₯μ μ μ§νμ±λ‘. . Clear: λλ₯΄λ©΄ xyz, magdγ £ 0κ° λ©λλ€.
. Apply Torque: ν μ€ν μ λ¨μ§ ν ν¬λ§μ μ μ©ν λ μ΄κ²μ ν΄λ¦νμΈμ. νμμ€ν μ λ°λ¦¬μΈμ»¨λ μμ λͺ μ¬νμΈμ κ·Έλμ ν° κ° μΆ©λμ μ μ©μ νκΈ°μν΄ ν° ν ν¬κ° νμν©λλ€.
Note: ν ν¬λ νμ μ§λμ€μ¬μ μ μ©μ΄ λ©λλ€.
곡ν΅μΌλ‘ μ μ©λλ μ¬ν
νκ³Ό ν ν¬λ λμμ νλ²λ° μ μ©μ΄ λ©λλ€. i.eλ λ μΉμ μ μ©μ΄ λ©λλ€ λμμ μ μ©νκΈ° μν΄ κ·ΈκΈμ λ°λ³΅μ μΌλ‘ ν΄λ¦ λλ μν°λ₯Ό λλ₯΄μΈμ
Rotation tool
νμ΄ν λ°©ν₯μ νμ λ€μ΄μΌλ‘κ·Έ λ°μ€μ νΉμ ν λ°©ν₯μ λ§€μΉκ° λμ΄μμ΅λλ€ μ΄ λ€μ΄μλ‘κ·Έλ‘ λΆν, λ°©ν₯μ xyz λ°κΏμΌλ‘μ λ³κ²½ν μ μμ΅λλ€ κ·Έ λ°©ν₯μ λλ κΉ ν΄μλ λ°κΏμ μμ΅λλ€.