[ros-users] parameter types

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: Aaron Solochek
Date:  
To: ros-users
Subject: [ros-users] parameter types
I'm trying to store two serial numbers as ros parameters. The first,
00000292 works in that I can rosparam set it and get the same value.

The second 00000303 is apparently assumed to be in octal, so when I read
it I get 195 decimal.

To be clear:

> rosparam set /foo/ser1 "00000292"
> rosparam set /foo/ser2 "00000303"
> rosparam get /foo/ser1

00000292
> rosparam get /foor/ser2

195

Now if I set them programmatically, I get a different inconsistency.

n_.setParam("/foo/Ser1", "00000292");
n_.setParam("/foo/Ser2", "00000303");

> rosparam get /foo/ser1

00000292
> rosparam get /foo/ser2

'00000303'

So my general question is how can I force my parameter to be
a certain type?

-Aaron