Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Drop indentations in message definitions #20

Open
ZHOUYue67 opened this issue Nov 7, 2019 · 2 comments
Open

Drop indentations in message definitions #20

ZHOUYue67 opened this issue Nov 7, 2019 · 2 comments

Comments

@ZHOUYue67
Copy link

ZHOUYue67 commented Nov 7, 2019

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()

@ZHOUYue67
Copy link
Author

Related issue in rosnodejs:
RethinkRobotics-opensource/rosnodejs#38

@ZHOUYue67
Copy link
Author

I can do a pull request. But first I need some comments and feedback from other people.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant