[ros-users] parameter types

Aaron Solochek aarons-ros at aberrant.org
Wed Jun 30 20:47:42 UTC 2010


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



More information about the ros-users mailing list