Commits

John Hsu committed 67d6d98

fix error correction to gearbox

Comments (0)

Files changed (2)

deps/opende/src/joints/gearbox.cpp

                      + shortest_angular_distance(cumulative_angle2,ang2);
 
     double err = shortest_angular_distance(cumulative_angle1,
-      ratio * cumulative_angle2);
+      -ratio * cumulative_angle2);
 
     // printf("a1(%f) a2(%f) e(%f)\n", ang1, ang2, err);
 

sdf/worlds/gearbox.world

         <ode>
             <solver>
                 <type>quick</type>
-                <dt>0.001000</dt>
+                <dt>0.000100</dt>
                 <iters>100</iters>
                 <precon_iters>0</precon_iters>
                 <sor>1.300000</sor>
         <joint name="joint_13" type="gearbox">
             <parent>link_1</parent>
             <child>link_3</child>
-            <gear_ratio>-0.01</gear_ratio>
+            <gear_ratio>-0.5</gear_ratio>
             <reference_body>link_2</reference_body>
             <axis>
               <xyz>1.000000 0.000000 0.000000</xyz>