Hi Jim,<div>The reason your spring damper setup is unstable is because the service calls in your setup is not fast enough to update every simulation cycle.  Just for the sake of experimentation, if you slowed down simulation by throttling simulation update rate, adding:</div>

<div>  <updateRate>100.0</updateRate></div><div>to <physics:ode> block in empty.world, then the spring damper model should work correctly.  This is not the right solution, ultimately, it is better to model the spring damper system as a transmission or using gazebo plugins; this way, the forces are updated at every simulation time step.  Let's chat off-line if you want to talk about implementation.</div>

<div>hope this helps.</div><div>John</div><div><br><br><div class="gmail_quote">On Tue, Feb 1, 2011 at 7:51 PM, Jim Rothrock <span dir="ltr"><<a href="mailto:jim.rothrock@wunderkammerlab.com">jim.rothrock@wunderkammerlab.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I am writing a package that simulates a Traxxas E-Maxx RC truck in Gazebo. Since springs (for the shock absorbers) cannot be specified in a URDF dynamics block, I've created a node that reads the shock absorber joint positions (they are prismatic joints), uses Hooke's law to compute spring forces, then applies the forces to the springs. The node also simulates damping. No matter what damping coefficient I use, the truck continues to oscillate. Sometimes it appears that Gazebo's ground contact force simulation is kicking the wheels into the air, but that's just a hypothesis. I've attached a test package to this message, and I'd really appreciate it if someone could take a look at it. To execute the test, run "roslaunch test test.launch" in one window, then run "rosrun test test.py" in another. The oscillating truck should be displayed in a Gazebo window.<br>

<font color="#888888">
<br>
-- <br>
Jim Rothrock | Wunderkammer Laboratory<br>
<a href="mailto:jim.rothrock@wunderkammerlab.com" target="_blank">jim.rothrock@wunderkammerlab.com</a><br>
<br>
</font><br>_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div><br></div>