![]() | 1 | initial version |
Have you tried using the SDF - Joint - Stiffness Element?
Example:
<joint name="gas_spring_joint" type="prismatic">
<parent>cylinder</parent>
<child>piston</child>
<pose>0 0 0 0 0 0</pose>
<axis>
<limit>
<lower>-0.1</lower>
<upper>0.1</upper>
</limit>
<xyz>0.0 0.0 1.0</xyz>
<dynamics>
<spring_stiffness>2500</spring_stiffness>
<spring_reference>0.06</spring_reference>
<damping>20.0</damping>
<friction>0.75</friction>
</dynamics>
<use_parent_model_frame>0</use_parent_model_frame>
</axis>
<physics>
<ode>
<implicit_spring_damper>1</implicit_spring_damper>
<cfm_damping>1</cfm_damping>
<limit>
<cfm>0</cfm>
<erp>0.2</erp>
</limit>
</ode>
</physics>
</joint>
![]() | 2 | No.2 Revision |
Have you tried using the SDF - Joint - Stiffness Element?
Example:
<joint name="gas_spring_joint" type="prismatic">
<parent>cylinder</parent>
<child>piston</child>
<pose>0 0 0 0 0 0</pose>
<axis>
<limit>
<lower>-0.1</lower>
<upper>0.1</upper>
</limit>
<xyz>0.0 0.0 1.0</xyz>
<dynamics>
<spring_stiffness>2500</spring_stiffness>
<spring_reference>0.06</spring_reference>
<damping>20.0</damping>
<friction>0.75</friction>
</dynamics>
<use_parent_model_frame>0</use_parent_model_frame>
</axis>
<physics>
<ode>
<implicit_spring_damper>1</implicit_spring_damper>
<cfm_damping>1</cfm_damping>
<limit>
<cfm>0</cfm>
<erp>0.2</erp>
</limit>
</ode>
</physics>
</joint>
Also, see http://answers.gazebosim.org/question/8411/how-to-simulate-a-compression-spring/?answer=8448#post-id-8448