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());
    }
}
Christina
  • 70
  • 7
  • Could you share the error message you are getting? – Christoph Sommer Apr 18 '21 at 09:31
  • You are most likely using a version of SUMO that is either too old, a version of Veins that is too old, or you are connecting to something that is not SUMO. From what I can tell, Veins 5.1 supports [TraCI versions up to version 20](https://github.com/sommer/veins/blob/veins-5.1/src/veins/modules/mobility/traci/TraCICommandInterface.cc#L39) and [SUMO 1.8 is using TraCI version 20](https://github.com/eclipse/sumo/blob/v1_8_0/src/libsumo/TraCIConstants.h#L43) – Christoph Sommer Apr 18 '21 at 09:34
  • I was trying to run a code from GitHub that was written in a different version of Veins, using a different version of SUMO. There were some differences in how the cc files were written. – Christina Apr 27 '21 at 04:30

1 Answers1

1

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.

Christina
  • 70
  • 7