Recent changes to 162: Unwrapped Hinge Joint Anglehttps://sourceforge.net/p/opende/patches/162/2013-08-10T23:59:06Z#162 Unwrapped Hinge Joint Angle2013-08-10T23:59:06Z2013-08-10T23:59:06ZOleh Derevenkohttps://sourceforge.net/u/userid-1883720/https://sourceforge.net5bae99233dcc65c6b9aefc992834e537f554848c<div class="markdown_content"><p>Well, a bit more precise estimation ;) shows that the correct number in previous post was 285 years. But still, you should not probably be afraid to be sued for potential losses after your application works that long. ;)</p></div>#162 Unwrapped Hinge Joint Angle2013-08-10T23:47:34Z2013-08-10T23:47:34ZOleh Derevenkohttps://sourceforge.net/u/userid-1883720/https://sourceforge.netd84579ce25619333352c8584a10ced53dedff840<div class="markdown_content"><blockquote>
<p>Storing cumulative angle as a dReal introduces potential numeric problems. As the value grows larger, its ability to precisely represent the actual angle decreases.</p>
</blockquote>
<p>Simple estimation reveals that with minimal precision of 0.001 radian (which is about 1/100 of angular minute) and 1000 hinge rotations per second the precision of double is sufficient to work for more than 35 thousand years.</p></div>#162 Unwrapped Hinge Joint Angle2013-08-10T23:43:09Z2013-08-10T23:43:09ZOleh Derevenkohttps://sourceforge.net/u/userid-1883720/https://sourceforge.neta3b7e8568d9cd63e799500cbb53d7075d6675665<div class="markdown_content"><p>Just coding them more optimally would be enough. :)</p></div>#162 Unwrapped Hinge Joint Angle2013-08-10T02:04:29Z2013-08-10T02:04:29ZJohn Hsuhttps://sourceforge.net/u/hsujohnhsu/https://sourceforge.net5a7eeb2706a5a2cab21cfc4744727f18183a68c8<div class="markdown_content"><p>Thanks for the feedbacks, let me see if there are alternative ways of incorporating this functionality without breaking const-ness of <code>dJointGetHingeAngle()</code>, and clean up the helper functions at the beginnning, possibly moving them into <code>odemath.h</code>?</p></div>#162 Unwrapped Hinge Joint Angle2013-08-09T19:42:28Z2013-08-09T19:42:28ZOleh Derevenkohttps://sourceforge.net/u/userid-1883720/https://sourceforge.nete9380902cc663178f417c185a1e84e755936d8ce<div class="markdown_content"><p>I was saying that constant methods like dJointGetHingeAngle() must not modify object's fields. Otherwise it is potentially possible to call the same function twice in a row and get different results.</p></div>#162 Unwrapped Hinge Joint Angle2013-08-09T18:51:18Z2013-08-09T18:51:18ZJoseph Cooperhttps://sourceforge.net/u/jcooperation/https://sourceforge.netdb75afd917f97a0eb89a4da880914e8b618acac6<div class="markdown_content"><p>Unwrapped joint angles also make it so that joints store dynamic information. Without them, all dynamic state is stored in the bodies and joint state is always computed directly from body state (except for AMotor angles in user mode, which are really ugly). If we're going to store dynamic data in joints, then it seems the right thing to do would be to `step' joints like we step bodies, rather than sticking the accumulation code into the getInfo() methods where it feels rather out-of-place.</p>
<p>Storing cumulative angle as a dReal introduces potential numeric problems. As the value grows larger, its ability to precisely represent the actual angle decreases. Granted, the joint may need to wrap a <em>lot</em> of time for this to be an issue, but it's easily possible in extended simulation. It might be better to use an integer count of the number of times wrapped.<br />
</p>
<p>Still, I like the idea of allowing joint angles to exceed +/- pi, if we could work through the issues.</p></div>#162 Unwrapped Hinge Joint Angle2013-08-04T11:08:16Z2013-08-04T11:08:16ZOleh Derevenkohttps://sourceforge.net/u/userid-1883720/https://sourceforge.netbd9990279df70edc3b6745250acfef171183662e<div class="markdown_content"><p>In addition to inefficiencies in three angle operation functions at beginning the thing I don't like about this patch is that dJointGetHingeAngle() which is supposed to be a constant method by its name, alters value of joint's cumulaive_angle field.</p></div>2012-09-14T21:58:10Z2012-09-14T21:58:10ZDaniel K. O.https://sourceforge.net/u/danielosmari/https://sourceforge.net85b2686858e320eb1712166fc3fa66e06740b874