Indentations in message definitions do not play well with some of ROS tools & libraries (such as rosbag's python implementation & ros_type_introspection). ros_msg_utils in rosnodejs already generates definitions without indentations, but a lot of users will still use gennodejs.
|
def write_message_definition(s, msg_context, spec): |
|
with Indent(s): |
|
s.write('static messageDefinition() {') |
|
with Indent(s): |
|
s.write('// Returns full string definition for message') |
|
definition = genmsg.compute_full_text(msg_context, spec) |
|
lines = definition.split('\n') |
|
s.write('return `') |
|
for line in lines: |
|
s.write('{}'.format(line)) |
|
s.write('`;') |
|
s.write('}') |
|
s.newline() |
Indentations in message definitions do not play well with some of ROS tools & libraries (such as rosbag's python implementation & ros_type_introspection).
ros_msg_utilsinrosnodejsalready generates definitions without indentations, but a lot of users will still use gennodejs.gennodejs/src/gennodejs/generate.py
Lines 701 to 713 in 779c415