Skip to content

soda-auto/soda-sim-proto-v1

Repository files navigation

soda-sim-proto-v1

The soda-sim-proto-v1 includes implementation of the generic snesors messages for the SodaSim.

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)
  • 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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published