intrig-unicamp / mininet-wifi

Emulator for Software-Defined Wireless Networks
https://mn-wifi.readthedocs.io/
Other
454 stars 244 forks source link

Set coordinates / mobility question #259

Closed Diggensag closed 4 years ago

Diggensag commented 5 years ago

Hi,

I've ran into another issue. I have no real idea, where this goes wrong and I am not sure if it is me again or a bug.

Let me first show my small scenario: the car starts at a little left from sta1 and moves over to the right in a straight line. grafik This works when I use the mobility thread like:

    info("*** Starting mobility\n")
    net.startMobility(time=0, repetitions=1)
    net.mobility(car1, 'start', time=50, position='10.0,10.0,0.0')
    net.mobility(car1, 'stop', time=100, position='240.0,10.0,0.0')
    net.stopMobility(time=300)

All my staX logs (from the software there running) show that they've received messages from car1, if it passed them by.

But when I use the socket option or modify the car1.params directly like:

car1.params['position'][0] = int(completeMove[i][0])
car1.params['position'][1] = int(completeMove[i][1])

The net.plotGraph(max_x=300, max_y=200) shows me the movement of car1, but as my logs point out, car1 is just moving in the GUI, but the net-traffic remains at the same place. It seems like car1-wlan0 is still stuck at 10.0,10.0,0.0, while the car in the GUI is moving. Only sta1 and sta2 see messages from the car. The telemetry approach also shows the movement. Hence I do something telemetry incompatible in my software, telemetry stops as soon as I start my program inside staX (I can open a Issue for that too).

I also tried to start a emtpy mobility thread:

    info("*** Starting mobility\n")
    net.startMobility(time=0, repetitions=1)
    net.stopMobility(time=300)

which makes no difference.

edit: In the meantime, I will play around with replay mobility. I have a feeling that this could help me in fixed scenarios really well :-)

ramonfontes commented 5 years ago

Can you repeat the same experiment with the most recent commit? I'd like to make sure that we're working with the same code.