Gazebo | Ignition | Community
Ask Your Question

How to simulate a compression spring

asked 2015-04-09 19:48:54 -0500

Cerin gravatar image

How would you model a piston-like compression spring, which would look essentially like a cylinder attached something at either end, but whose length changes by a configurable amount, asserting a force in proportion to Hooke's law?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2015-04-12 23:57:46 -0500

scpeters gravatar image

Drawing from the, here's a model with a single prismatic joint that has the spring_stiffness parameter applied:

<?xml version="1.0" ?>
<sdf version="1.4">
  <model name="model_6_prismatic_sdf">
    <pose>0.0 1.5 0.6  0 0 0</pose>
    <link name="link">
      <visual name="visual">
      <collision name="collision">
    <joint name="joint" type="prismatic">
      <pose>0.0 0.0 0.5  0 0 0</pose>
        <xyz>0.0 0.0 1.0</xyz>
edit flag offensive delete link more


not work when set parent link as other link in the gazebo scene

jacknlliu gravatar imagejacknlliu ( 2017-11-08 23:07:48 -0500 )edit

2 follow-up questions: Does the `spring_stiffness` parameter represent the spring constant (Hooke's Law) or is it different? What are the units of the `spring_stiffness` parameter? (Trying to simulating gas spring in Gazebo)

josephcoombe gravatar imagejosephcoombe ( 2018-06-12 13:08:53 -0500 )edit
Login/Signup to Answer

Question Tools


Asked: 2015-04-09 19:48:54 -0500

Seen: 3,254 times

Last updated: Apr 12 '15