The soda-sim-proto-v1 includes implementation of the generic snesors messages for the SodaSim.
- camera.hpp - generic cameras message (sends via ZMQ)
- lidar.hpp - generic LiDAR message (sends via UDP)
- radar.hpp - generic radar message (sends via UDP)
- ultrasonic.hpp - generic ultrasonic message (sends via UDP)
- vehicleState.hpp - generic vehicle state message (sends via UDP)
Serialization example:
std::stringstream stream_out(std::ios_base::out | std::ios_base::binary);
int points_count = soda::write(sout, Scan);
if (!stream_out)
{
std::cout << "Serialization error";
return;
}
const uint8* data = (const uint8*)stream_out.str().data();
size_t size = stream_out.str().length();
Deserialization example:
std::istringstream stream_in(std::string(data, size));
soda::read(stream_in, Scan);
if (!stream_in )
{
std::cout << "Deserialization error" << std::endl;
return;
}
Please feel free to provide feedback or ask questions by creating a Github issue. For inquiries about collaboration, please email us at sim@soda.auto.