ROS-TCP-Connector
ROS-TCP-Connector copied to clipboard
String values in message definitions are not parsed correctly
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:
- 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"
- After message generation, the
int32constants 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