defining array size in custom message using constant
I'd like to define the size of an array in a message definition using a constant like this:
int32 NUM_NODES = 128
int32[NUM_NODES] nodes
This doesn't work. I get the following error:
[ 5%] Generating ../msg_gen/lisp/RAW_CONFIG.lisp, ../msg_gen/lisp/_package.lisp, ../msg_gen/lisp/_package_RAW_CONFIG.lisp
Traceback (most recent call last):
File "/opt/ros/fuerte/share/roslisp/rosbuild/scripts/genmsg_lisp.py", line 871, in <module>
generate_msg(sys.argv[1])
File "/opt/ros/fuerte/share/roslisp/rosbuild/scripts/genmsg_lisp.py", line 725, in generate_msg
(_, spec) = roslib.msgs.load_from_file(msg_path, package)
File "/opt/ros/fuerte/lib/python2.7/dist-packages/roslib/msgs.py", line 669, in load_from_file
raise MsgSpecException('%s: %s'%(file_name, e))
roslib.msgs.MsgSpecException: RAW_CONFIG.msg: int32[NUM_NODES] is not a legal message type
Is there a workaround?
add a comment