Re: [ros-users] Unable to get double parameters

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: User discussions
Date:  
To: User discussions
Subject: Re: [ros-users] Unable to get double parameters
Hi Armin,

You are right. With your hint it was quite easy

int main(int argc, char** argv)
{
    QApplication app( argc, argv, false );
    setlocale(LC_NUMERIC,"C");


resets the locale that is used for number formatting to "C"-locale. And
now it works.

These little problems make live so colourful.

Regards
Christian
> Hi Christian!
>> I found out what the problem is. But I do not have a solution to it
>> right now.
>>
>> #include <ros/ros.h>
>> #include <QtGui>
> [...]
>
> Do you have any locale environment / language setting that uses "," as
> delimiter? I once ran into a very hard to find similar bug, where
> whenever I was using Qt somewhere, stream parsing in all code wanted my
> system locale (German, "1,5") instead of "1.5", happily changing all
> parameters when parsed.
>
> I don't remember exactly, but there's a way to explicitly set the locale
> back in the code or an environment variable if you're working on a
> non-English system.
>
> Best regards,
> Armin
>



--
___________________________________________
REC GmbH
Dr. Christian Verbeek
Robert-Koch-Str. 2, 82152 Planegg

Tel:    +49 89 85689672
Fax:    +49 89 85902327
Mobile: +49 160 7056589
e-mail: 


Geschäftsführer: Dr. Christian Verbeek
Registergericht: AG München (HRB 154463)
____________________________________________