update sumo relative path and sumo vehicle name in mininet wifi
Hi,
I create a subclass of "sumo". There are some updates compared with its parent class:
- It allows us to customise the sumo map by both relative path and absolute path. In the sumo class, the path is hard-coded into the "data" directory.
- It allow us to use a more readable vehicle ID. In previous implementation, only numerous name are acceptable.
- PS: extra commands parameters for sumo use different format. For example, Previous:
["--delay 1000"]=>Current: ["--delay", "1000"]. It is because we used thePopenin there withoutshell=True
We recently make certain optimisations about v2x on mininet-wifi. We will push these updates soon in there.
Best, Yichao
This seems interesting. Thank you! :)
Just a question:
What does vlc in sumo_vlc_ctl mean?
This seems interesting. Thank you! :)
Just a question: What does
vlcinsumo_vlc_ctlmean?
The vlc means the vehicle. I used the term because we are developing a v2x project (vehicle to thing).
Hi,
I also add some more files there. I was wondering whether these functionalities blow are acceptable by Mininet-wifi?
SumoVehicle,SumoTrafficLightallow us to access and change the status of the cars (such as speed, lane, safe gap) as well as the traffic lights.SumoStepControllerandSumoControlThreadprovide us with a mechanism to control the behaviors in each step during simulating.- There also is an example in
examples/v2x/change_lane, where the two cars change from lane0 to lane1 under the control of theirCarController. This example shows how to use these classes. (PS. Please use the commandsudo -E python3 main.pyto execute the example)
Besides, we also implemented some methods to allow a car to send and receive packets by a specific network interface. However, I currently do not push them there, because I am not sure whether they are the expected functionalities for Mininet-wifi. If they are, please tell me and I update them in a new request.
Best, Yichao
Yichao,
I also add some more files there. I was wondering whether these functionalities blow are acceptable by Mininet-wifi?
I was wondering if those new features aren't supported by /sumo/traci. I can use it to change the status of the cars, tls, etc.
Yes, most functionalities wrap Traci methods, but they are more object-oriented. For example, if we need to change a car from lane 0 to lane 1, in Traci API, the function related is "traci.changeLane(car_id, lane_id, duration)”; in this one, we can create an instance scar for class SumoVehicle and use the property scar.lane = 1, which should be more understandable.
Besides, there also are additional ones for calculating the distance of two cars, or stoping the car etc.