Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

String values in message definitions are not parsed correctly #292

Open
noirb opened this issue Aug 18, 2022 · 0 comments
Open

String values in message definitions are not parsed correctly #292

noirb opened this issue Aug 18, 2022 · 0 comments

Comments

@noirb
Copy link

noirb commented Aug 18, 2022

Describe the bug
When generating messages from ROS2 message definitions, default values can result in a C# class which cannot be compiled.

To Reproduce
Steps to reproduce the behavior:

  1. Generate C# class for a message definition which contains string constants or default values, e.g.:
int32 status
int32 OK = 200
int32 ERROR = 300

string msg
string OK_MSG = "Everything is fine"
string ERROR_MSG = "Something is wrong"
  1. After message generation, the int32 constants will be fine, but the string constants will be formatted incorrectly:
...
public int status;
public int OK = 200;
public int ERROR = 300;

public string msg;
public string OK_MSG = ""Everything is fine"";
public string ERROR_MSG = ""Something is wrong"";
...

Expected behavior
All standard features of ROS2 message definitions should be handled.

Environment (please complete the following information, where applicable):

  • Unity Version: Unity 2020.3.8f1
  • Unity machine OS + version: Windows 10
  • ROS machine OS + version: Ubuntu 20.04, ROS Galactic
  • ROS–Unity communication: Docker
  • Branch or version: 0.7.0-preview
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant