ApolloAuto / apollo

An open autonomous driving platform
Apache License 2.0
25.23k stars 9.72k forks source link

Question:Can the messages of dreamview websocket be deserialized by "Object.Parser.ParseFrom(stream)" directly? #13073

Open ilovevision opened 3 years ago

ilovevision commented 3 years ago

System information

Steps to reproduce the issue:

This is the test code. "Simualtion.data" is Base64 encoding, and it didn't work. I have tied the format:hex and UTF-8. 微信截图_20201127164118

ntutangyun commented 3 years ago

They are probably protobuf binary data, you have to deserialize with protobuf javascript library.

ilovevision commented 3 years ago

Isn't protobuf cross-platform?

ntutangyun commented 3 years ago

Isn't protobuf cross-platform?

Yes sorry thought you were trying to use javascript to decode it. Essentially you could use any language that Protobuf supports. You may get those libraries from the .proto files in Apollo project.