Search code examples
omnet++veinssumo

Unsupported TraCI API version, recommend using Sumo version 1.0.1 or 0.32.0


I'd like to use OMNeT++ along with Veins 5.1, Sumo 1.8 in Ubuntu 20.04 and I keep getting an error involving the setApiVersion that recommends to use Sumo 0.32 or Sumo 1.0.1. Is there any way to overcome that and use a later version of Sumo?

void TraCICommandInterface::setApiVersion(uint32_t apiVersion)
{
    try {
        versionConfig = versionConfigs.at(apiVersion);
        TraCIBuffer::setTimeType(versionConfig.timeType);
    }
    catch (std::out_of_range const& exc) {
        throw cRuntimeError(std::string("TraCI server reports unsupported TraCI API version: " + std::to_string(apiVersion) + ". We recommend using Sumo version 1.0.1 or 0.32.0").c_str());
    }
}

Solution

  • In my case the code was written for earlier versions of SUMO and Veins. The cc files used a different declaration of the namespace, with camel case instead of lower case. After changing to lower case the code is working without errors in Sumo 1.8 and Veins 5.1.