[ros-users] rosjava and message constants

Lorenz Mösenlechner moesenle at in.tum.de
Fri Dec 24 11:53:03 UTC 2010


Hi,

you are right. This has been a bug in the message generator. It has
sort of been fixed in release 0.1.2 so that it at least compiles. But
double quotes were still not added when being specified in the message
file. I fixed that in master now and it will be in 0.1.3

Thanks,
Lorenz

> Hi,
> 
> there seems to be a problem regarding rosjava and constants in ROS messages.
> 
> Consider for example this example for a constant, taken from the ROS Wiki:
> 
> string FOO=foo
> 
> The rosjava implementation seems to turn this into something like
> 
> public static final String FOO = foo;
> 
> , omitting the quotation marks and therefore generating code that won't 
> compile. The C++ implementation on the other hand does add the necessary 
> quotes. Wouldn't be that much of a problem, but by making the generated 
> message work for rosjava:
> 
> string FOO="foo"
> 
> , the C++ implementation will still add the quotes, so the value of the 
> constant results in "\"foo\"".
> 
> kind regards
> Máté
> 

-- 
Lorenz Mösenlechner            | moesenle at in.tum.de
Technische Universität München | Boltzmannstr. 3
85748 Garching bei München     | Germany
http://ias.cs.tum.edu/         | Tel: +49 (89) 289-26910



More information about the ros-users mailing list