[Rock-dev] New JointState / Joints representation type

Jakob Schwendner jakob.schwendner at dfki.de
Fri Jun 14 12:35:52 CEST 2013


On 06/14/2013 12:26 PM, Jakob Schwendner wrote:
> On 06/06/2013 02:53 PM, Sylvain Joyeux wrote:
>> On 06/06/2013 01:51 PM, Janosch Machowinski wrote:
>>> Hi,
>>> sorry for the late response.
>>> I am missing the possibility to represent
>>> joints with multiple positions. (E.g. Asguard / Spaceclimber joint)
>> You create two joints. I can't speak for SpaceClimber, but that is
>> definitely what Asguard is: two separate joints with the same axis.
>>
>>> Also I wonder why everything is a float, I thought we
>>> agreed on using double...
>> Yes, and we started reconsidering that choice. Since that reduces the
>> size of the structure significantly, and since the precision is really
>> not needed there, we settled for float.
> even when using cummulative revolutions for position? I haven't done the
> calculation for that though. Maybe its still not relevant, but did you
> consider this when choosing float?
>
> other than that, what's the current status here? We would like to use
> that type for the spacebot setup. Ready to go?
>
> Jakob
> _______________________________________________
> Rock-dev mailing list
> Rock-dev at dfki.de
> http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev
#include <iostream>

int main(void)
{
     double d = 0;
     float f = 0;

     double offset = 0.01;

     const size_t mi = 100000;
     for(int i=0; i<mi; i++)
     {
     d += offset;
     f += offset;

     if( i % (mi/10) == 0 )
         std::cout << d << ": " << (d - f) << std::endl;
     }
}

[/tmp]% ./test
0.01: 2.23517e-10
100.01: -0.00295471
200.01: 0.0306299
300.01: 0.0185144
400.01: -0.0791418
500.01: -0.176798
600.01: -0.274424
700.01: -0.37208
800.01: -0.469736
900.01: -0.567393

it does seem to make a difference... what do you think?

cheers,

Jakob


More information about the Rock-dev mailing list