【问题标题】:Getting vehicle current edge ID获取车辆当前边缘 ID
【发布时间】:2019-05-10 20:33:36
【问题描述】:

我正在尝试获取车辆当前边缘 ID,如下所示:

mobility = Veins::TraCIMobilityAccess().get(getParentModule());
assert(mobility);
traci = mobility->getCommandInterface();
traciVehicle = mobility->getVehicleCommandInterface();
string cur=traciVehicle->getRoadId();

但它返回一个无效的边缘 id,车道 id 也是如此。 怎么了?是否有另一种获取边缘 id 的方法?

请帮我解决这个问题。 谢谢。

【问题讨论】:

    标签: omnet++ veins sumo


    【解决方案1】:

    它应该这样工作:

    mobility = TraCIMobilityAccess().get(getParentModule());
    string cur = mobility->getRoadId();
    

    【讨论】:

      猜你喜欢
      • 2021-10-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-12-14
      • 2020-01-25
      • 1970-01-01
      • 1970-01-01
      • 2017-10-11
      相关资源
      最近更新 更多