mininet-wifi icon indicating copy to clipboard operation
mininet-wifi copied to clipboard

update sumo relative path and sumo vehicle name in mininet wifi

Open samhsu-dev opened this issue 3 years ago • 5 comments

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 the Popen in there without shell=True

We recently make certain optimisations about v2x on mininet-wifi. We will push these updates soon in there.

Best, Yichao

samhsu-dev avatar Feb 17 '22 09:02 samhsu-dev

This seems interesting. Thank you! :)

Just a question: What does vlc in sumo_vlc_ctl mean?

ramonfontes avatar Feb 18 '22 12:02 ramonfontes

This seems interesting. Thank you! :)

Just a question: What does vlc in sumo_vlc_ctl mean?

The vlc means the vehicle. I used the term because we are developing a v2x project (vehicle to thing).

samhsu-dev avatar Feb 19 '22 04:02 samhsu-dev

Hi,

I also add some more files there. I was wondering whether these functionalities blow are acceptable by Mininet-wifi?

  • SumoVehicle, SumoTrafficLight allow us to access and change the status of the cars (such as speed, lane, safe gap) as well as the traffic lights.
  • SumoStepController and SumoControlThread provide 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 their CarController. This example shows how to use these classes. (PS. Please use the command sudo -E python3 main.py to 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

samhsu-dev avatar Feb 19 '22 05:02 samhsu-dev

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.

ramonfontes avatar Feb 19 '22 09:02 ramonfontes

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.

samhsu-dev avatar Feb 19 '22 23:02 samhsu-dev