控制相扑中的变道决策



我在我的项目中使用了VEINS 4.4,OMNET 5.0和SUMO 0.25。 我想阻止车辆在靠近十字路口时改变车道。

我在谷歌搜索过,但没有得到答案

请问该怎么做?

您需要实现一个 Traci 命令来控制 Veins 中不断变化的车道。我在 burtonwilliamt github rep 中遇到了这个实现:

void TraCICommandInterface::Vehicle::setLaneChangeMode(int32_t bitset) {
uint8_t variableId = VAR_LANECHANGE_MODE;
uint8_t variableType = TYPE_INTEGER;
TraCIBuffer buf = traci->connection.query(CMD_SET_VEHICLE_VARIABLE, TraCIBuffer() << variableId << nodeId << variableType << bitset);
ASSERT(buf.eof());
}

我还没有测试过你。

最新更新