Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

soda-auto/SodaSimProto

Repository files navigation

SodaSimProto

The SodaSimProto includes the generic messages serialization / deserialization for the SodaSim (mostly for sensors). This repository is used as a submodule for SodaSim and can also be compiled as a separate static library via cmake.

Sensors message serialization / deserialization

  • 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)
  • OXTS.hpp - GNSS/IMU message (sends via UDP). This is original NCOM protocol from OXTS
  • VehicleState.hpp - generic vehicle state message (sends via UDP)

Usage example (for Lidar.hpp, Radar.hpp, Ultrasonic.hpp)

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;
}

Contact

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.

Copyright and License

Copyright © 2023 SODA.AUTO UK LTD. ALL RIGHTS RESERVED.
This software contains code licensed as described in LICENSE.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published