Describe the bug
I'm currently using the ROS–TCP–Endpoint (ROS2) in my research project.
While running communication tests between Unity and ROS 2, I found a decoding issue in server.py that can cause incoming JSON payloads to be truncated.
Specifically, the current line:
message_json = data.decode("utf-8")[:-1]
unconditionally removes the last byte of the message.
Expected behavior
The decoded JSON string should be preserved intact.
Replacing the line with the following resolves the issue:
message_json = data.decode("utf-8")
Environment (please complete the following information, where applicable):
- ROS machine OS + version: [Ubuntu 22.04 (LTS), ROS 2 Humble]
- ROS–Unity communication: [Direct TCP over LAN]
- Branch or version: [main-ros2]