Closed kartikeyagg closed 2 years ago
Which version of matplotlib do you have?
matplotlib version :- 3.3.3
Well, I cannot reproduce the issue because I don't have my computer now. However, this might be related to the matplotlib backend. Which one are you using? Qt? TkAgg? Can you try TkAgg?
Please try https://github.com/intrig-unicamp/mininet-wifi/commit/650e89245adab5cee49dc08c2a1c7983ce246639 and let me know if it works for you.
It worked. Thank you very much. I am new to mininet-wifi and will be very grateful if you can help me with the following:- 1.) Is CoppeliaSim necessary for this type of emulations , can I use ROS Gazebo(Iris drone) instead? How UAVs are controlled in this emulations? Is it by sending locations (where?) ? 2.) Can I send velocity instead of position?
Is there any documentation for this script?
Which one?
uav.py and other examples
Do you really need a doc for uav.py?? It has few lines of code.
Its good . Thanks
I am trying to emulate FANET using /uav/uav.py but the script is throwing error stating that :- Warning: Starting a Matplotlib GUI outside of the main thread will likely fail. WARNING: QApplication was not created in the main() thread. I used the command : -sudo python examples/uav/uav.py I have not made any changes in the script The CoppeliaSim is opening and simulating the environment succesfully. I am attaching the complete output of terminal as follows:-
rm: cannot remove 'examples/uav/data/*': No such file or directory Creating nodes Configuring wifi nodes Connecting to wmediumd server /var/run/wmediumd.sock Starting network dr1 dr2 dr3 Starting Socket Server Starting CoppeliaSim /usr/local/lib/python3.6/dist-packages/mininet_wifi-2.6-py3.6.egg/mn_wifi/telemetry.py:61: UserWarning: Starting a Matplotlib GUI outside of the main thread will likely fail. fig, (self.axes) = plt.subplots(1, 1, figsize=(10, 10)) WARNING: QApplication was not created in the main() thread. [CoppeliaSimClient] loading the CoppeliaSim library... QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root' [CoppeliaSimClient] done. [CoppeliaSimClient:loadinfo] launching CoppeliaSim... [CoppeliaSim:loadinfo] CoppeliaSim V4.1.0., (rev. 1), flavor: 1 [CoppeliaSim:loadinfo] Legacy machine ID: 5000-9DEB-FFC4-9CEC-F7E3-841D [CoppeliaSim:loadinfo] Machine ID: 16E3-736C-D0E2-0000-07AB-0101 QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/tmp/runtime-root' [CoppeliaSim:loadinfo] using the default Lua library. [CoppeliaSim:loadinfo] loaded the video compression library. /usr/local/lib/python3.6/dist-packages/mininet_wifi-2.6-py3.6.egg/mn_wifi/telemetry.py:331: UserWarning: Starting a Matplotlib GUI outside of the main thread will likely fail. plt.show() Exception in thread Thread-1: Traceback (most recent call last): File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner self.run() File "/usr/lib/python3.6/threading.py", line 864, in run self._target(*self._args, self._kwargs) File "/usr/local/lib/python3.6/dist-packages/mininet_wifi-2.6-py3.6.egg/mn_wifi/telemetry.py", line 74, in start parseData(nodes, self.axes, single, data_type=data_type, fig=fig, kwargs) File "/usr/local/lib/python3.6/dist-packages/mininet_wifi-2.6-py3.6.egg/mn_wifi/telemetry.py", line 179, in init self.start(nodes, axes, single, data_type, fig, *kwargs) File "/usr/local/lib/python3.6/dist-packages/mininet_wifi-2.6-py3.6.egg/mn_wifi/telemetry.py", line 331, in start plt.show() File "/home/kartikey/.local/lib/python3.6/site-packages/matplotlib/pyplot.py", line 353, in show return _backend_mod.show(args, **kwargs) File "/home/kartikey/.local/lib/python3.6/site-packages/matplotlib/backend_bases.py", line 3544, in show cls.mainloop() File "/home/kartikey/.local/lib/python3.6/site-packages/matplotlib/backends/backend_qt5.py", line 1037, in mainloop signal.signal(signal.SIGINT, signal.SIG_DFL) File "/usr/lib/python3.6/signal.py", line 47, in signal handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler)) ValueError: signal only works in main thread
[CoppeliaSim:loadinfo] if CoppeliaSim crashes now, try to install libgl1-mesa-dev on your system: