zmq error in FlyNetSim (NS3-ardupilot) installation

191 views
Skip to first unread message

Nassima Merabtine

unread,
May 10, 2022, 7:11:41 AM5/10/22
to ns-3-...@googlegroups.com
Hello,

I'm trying to install FlyNetSim which is a network-drone simulator based on NS3 and Ardupilot. It uses zeromq library to link the NS3 and Ardupilot. I have already installed it a pc (ubuntu 16.04, python2.7). Now I'm trying to install in ubuntu 20.04 having python3. The ./waf command finishes with this error:

/usr/bin/ld: scratch/uav-net-sim/uav-net-sim.cc.1.o: undefined reference to symbol 'zmq_sendmsg'
/usr/bin/ld: /usr/local/lib/libzmq.so: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status

uav-net-sim.cc is c++ file added by FlyNetSim to link NS3 and Ardupilot. According to the error message, it seems to be a library linking error, but I do exactly the same thing as in my first installation in ubuntu 16.04 so I don't understand why it won't work this time !!

The output of : sudo ldconfig -p | grep libzmq is as follows :
libzmq.so.5 (libc6,x86-64) => /usr/local/lib/libzmq.so.5
libzmq.so.5 (libc6,x86-64) => /lib/x86_64-linux-gnu/libzmq.so.5
libzmq.so (libc6,x86-64) => /usr/local/lib/libzmq.so
libzmq.so (libc6,x86-64) => /lib/x86_64-linux-gnu/libzmq.so

Any help ??
Thank you in advance,
Nassima.

Charles Pandian

unread,
May 10, 2022, 11:15:01 PM5/10/22
to ns-3-...@googlegroups.com

Hello Nassima,

After seeing your question on the forum, I tried to install  FlyNetSim under "choot" based Debian Environment for better performance. You may check my installation procedure at the following link:
https://www.projectguideline.com/installing-the-flynetsim-integrated-uav-network-simulator-under-chroot/

I have a  few questions for you.

(1) What is the speciality of this FlyNetSim? why do we need this for a ns-3 based FANET simulation?  Could you please explain its use for simulation-based research?
I am asking this because, even without this FlyNetSim we can do a good, realistic FANET simulation under ns-3 (using NetSimulyzer 3D tool for visualization.
(2) In my installation nothing happens interesting after pressing the "Takeoff" button - how to run an ns-3 simulation with it?


Sorry- I  could not understand the use of this FlyNetSim in a typical research work. Your answers will help me to refine my post/article

Charles Pandian,



--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/CAOU%2B3cuy0ifJnw%2B2HBpeoTmobKADce3Yn%3DsYU4VYYJswpXmCOg%40mail.gmail.com.

Charles Pandian

unread,
May 11, 2022, 10:33:19 AM5/11/22
to ns-3-...@googlegroups.com
The  uav-net-sim.cc file is calling a function "zmq_sendmsg" - and the corresponding header (czmq.h?) is already included at the top of uav-net-sim.cc.
So, the problem is : the corresponding header file  (czmq.h?) may not be available in the default path of the system where the linker expects it.

It may be a reason for that error.

Charles Pandian,



On Tue, May 10, 2022 at 4:41 PM Nassima Merabtine <nass...@gmail.com> wrote:

Nassima Merabtine

unread,
May 12, 2022, 4:57:23 AM5/12/22
to ns-3-users
Hello Charles,

Thank you  for your quick response. In fact, as said in my previous email, I have already installed FlyNetSim in ubuntu 16.04, with NS3.27 and pytnon 2.7. Now, I'm trying to install it with python 3. This is because I need to use ns3-ai extension (for machine learning algorithms), which has to be executed exclusively by python3. So the problem I exposed in my previous email is when trying to install FlyNetSim in a ubuntu 20.04, python3, NS3.30. Of course I installed the required packages, and do a conversion of .py files (from python 2 to 3).

Coming to your questions:


1) What is the speciality of this FlyNetSim?
In fact, I'm working on the detection and geolocation of drones based on physical/MAC data. This is said, I have to classify the received signals, according to some criteria, on drone/wifi/blutooth, etc. So I need to work on a realistic drone signals. Using the NS3 extension you mentioned may permit to have a realistic mobility model (to be confirmed) but what about the drone signals? This is why I decide to use Ardupilot based UAV simulator Software-in-the-loop, but at the same time I need a network simulator to create a monitoring infrastructure and to evaluate the efect of interferences and other phenomenas on my drone detection solution. For example, how the drone signal may change on a crowded wifi envirnement, and if this may impact the precision of my solution?

I'm not sur about the effectiveness and reliability of FlyNetSim as I'm still in an early stage of usage. But this was the reasons of choosing this simulator.


(2) In my installation nothing happens interesting after pressing the "Takeoff" button - how to run an ns-3 simulation with it?

After pressing the "Takeoff" button, you will be able to move on the UAV (up, down, etc.) to create the UAV trajectory, and to see the messages exchanged between the GCS and the UAV. As I just said  I do not yet master this FlyNetSim but I think to go more in depth in the experiments it is necessary to go through the code (not only by using the proposed graphical interface).

3) The  uav-net-sim.cc file is calling a function "zmq_sendmsg" - and the corresponding header (czmq.h?) is already included at the top of uav-net-sim.cc. So, the problem is : the corresponding header file  (czmq.h?) may not be available in the default path of the system where the linker expects it.

I think if the compiler can't find the "czmq.h" file, it's supposed to raise a "file not found" or "an import error" No? But the error talk about "libzmq.so.5" which a shared library file.

Ali H. Wheeb

unread,
May 13, 2022, 4:36:10 AM5/13/22
to ns-3-users
Dear
i have question following the valuable discussion. after install the specific simulator , can we develop the routing protocol or transport protocol ?
thanks in advance

Charles Pandian

unread,
May 13, 2022, 4:05:00 PM5/13/22
to ns-3-...@googlegroups.com
"Of course I installed the required packages, and do a conversion of .py files (from python 2 to 3)."

Do you mean that you have successfully installed  FlyNetSim on Ubuntu 20.04 now?

Charles Pandian,


Reply all
Reply to author
Forward
0 new messages