Closed jaagut closed 1 year ago
This does not actually work, as both protobuf files would use the same namespace. Actually launching team comm leads to errors like this:
[team_comm.py-1] TypeError: Couldn't build proto file into descriptor pool!
[team_comm.py-1] Invalid proto descriptor for file "robocup.proto":
[team_comm.py-1] robocup.humanoid.fvec2.x: "robocup.humanoid.fvec2.x" is already defined in file "robocup_extension.proto".
[team_comm.py-1] robocup.humanoid.fvec2.y: "robocup.humanoid.fvec2.y" is already defined in file "robocup_extension.proto".
[team_comm.py-1] robocup.humanoid.fvec2: "robocup.humanoid.fvec2" is already defined in file "robocup_extension.proto".
[team_comm.py-1] robocup.humanoid.fvec3.x: "robocup.humanoid.fvec3.x" is already defined in file "robocup_extension.proto".
[team_comm.py-1] robocup.humanoid.fvec3.y: "robocup.humanoid.fvec3.y" is already defined in file "robocup_extension.proto".
[team_comm.py-1] robocup.humanoid.fvec3.z: "robocup.humanoid.fvec3.z" is already defined in file "robocup_extension.proto".
[team_comm.py-1] robocup.humanoid.fvec3: "robocup.humanoid.fvec3" is already defined in file "robocup_extension.proto".
As far as I understand protobuf it should also not be needed as I explained in #93.
Proposed changes
Compiles both protobuf protocols
robocup_extension.proto
(as previously) androbocup.proto
. We try to parse incoming proto messages as anrobocup_extension.proto
. In case it fails (presumably because the incoming message has no extensions or other extensions, that do not match ours), we try to parse the message as arobocup.proto
. This will only parse the standard fields without extensions.Related issues
Resolves #93
Still needs testing