NetAnim: Unable to see wireless nodes move

586 views
Skip to first unread message

Avinash Sridhar

unread,
May 21, 2014, 5:33:00 PM5/21/14
to ns-3-...@googlegroups.com
Hi Team,

I am trying to implement a model where we have two access points and a single wifi station.

THe two wireless APs are modelled using ConstantPositionMobilityModel (working fine).

I have implemented the wireless station such that it will move (mobile) and check the behaviour wiht the two access points defined above.

The issue is that when I implement this scenario on NetAnim, I am able to see the access points being places correctly, however the wireless station is never seen to move and is simply stuck on (0,0). If I place the wireless station using constant position it works. It is just that for a mobile station, I am not able to see the movements.

As per the guide : http://www.nsnam.org/wiki/NetAnim_3.105#For_mobile_nodes , it is mentioned that we just need to implement a mobility model and the NetAnim will print based on the poll interval which is a default value of 250 ms.

I have  used the following models so far : waypoint, random 2d walk, constant velocity and none of them seem to show the movement of nodes on NetAnim.

Is this a feature that is supported and should work? I did check a couple of videos / documents and they mention that such scenarios should work too. There is also a video here that demonstrates nodes mobility on NetAnim. This is exactly what I am trying to achieve but it does not show on NetAnim.

Here are the code snippets for reference:

  mobility_sta.SetMobilityModel ("ns3::WaypointMobilityModel");
  mobility_sta.Install(stas.Get(0));

  Ptr<WaypointMobilityModel> points = DynamicCast<WaypointMobilityModel>( stas.Get(0)->GetObject<MobilityModel>());
  points->AddWaypoint (Waypoint (Seconds (1.0), Vector (20.0, 0.0, 0.0)));
  points->AddWaypoint (Waypoint (Seconds (5.0), Vector (20.0, 50.0, 50.0)));
  points->AddWaypoint (Waypoint (Seconds (9.0), Vector (20.0, 150.0, 50.0)));

 AnimationInterface::SetBoundary (0, 0, 1000, 1000);

AnimationInterface anim ("apstanew.xml");

Any tips on how I can proceed will be appreciated.

Kind Regards,
Avinash
Message has been deleted

Avinash Sridhar

unread,
May 21, 2014, 5:39:09 PM5/21/14
to ns-3-...@googlegroups.com
Hi,

Here is the link where I saw node mobility being implemented on netanim:

http://www.youtube.com/watch?v=vLOyaJJ70oc

However, it does not seem work in any of the models as indicated above. It will be helpful to receive any tips or ways to move forward on the same.

Thanks,
Avinash

John Abraham

unread,
May 21, 2014, 5:42:27 PM5/21/14
to ns-3-...@googlegroups.com
Hi
so which version of ns-3 and NetAnim is this?
There was a bug, where there was no movement , when no packet traffic was present in the simulation.
Also please send your xml file.
john



--
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 post to this group, send email to ns-3-...@googlegroups.com.
Visit this group at http://groups.google.com/group/ns-3-users.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted
Message has been deleted

Avinash Sridhar

unread,
May 21, 2014, 6:12:58 PM5/21/14
to ns-3-...@googlegroups.com
Hi John,

Please find the xml file attached --> apstanew.xml

The NetAnim is latest as I just performed a hg clone of it and updated all the files. The issue still pertains. I am using ns-3 version 3.19

Also, there is Wireless packet transmission between station and AP nodes.

Thanks,
Avinash
apstanew.xml

John Abraham

unread,
May 21, 2014, 6:17:19 PM5/21/14
to ns-3-...@googlegroups.com
if yes, what version does the version.txt file show in netanim

I recently changed the URL to point to netanim 3.105

John Abraham

unread,
May 21, 2014, 6:20:04 PM5/21/14
to ns-3-...@googlegroups.com
further are you using ns-3-dev or ns-3.19? I see the version in the xml you sent to be 3.105. I recall changing the version to 3.105 only in ns-3-dev

Avinash

unread,
May 21, 2014, 6:34:57 PM5/21/14
to ns-3-...@googlegroups.com, ns-3-...@googlegroups.com
Hi John,

version.txt under netanim/ shows 3.104 . Yes, I did a hg clone of the path you mentioned and around 184
files got updated in the process.

Sorry, I'm using ns-3 dev I think ie. in VERSION it shows "3-dev".

Regards,
Avinash

Typed from Iphone. Please excuse any typos.
You received this message because you are subscribed to a topic in the Google Groups "ns-3-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ns-3-users/kaxWdnHmz6g/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ns-3-users+...@googlegroups.com.

John Abraham

unread,
May 21, 2014, 6:42:55 PM5/21/14
to ns-3-...@googlegroups.com
at the minimum you have a version mismatch

please cd into a new folder and do

hg clone http://code.nsnam.org/ns-3-dev
hg clone http://code.nsnam.org/netanim

Avinash

unread,
May 21, 2014, 7:13:18 PM5/21/14
to ns-3-...@googlegroups.com, ns-3-...@googlegroups.com
Hi John,

Are you suggesting I do a fresh install or just an update?

Regards,
Avinash

Typed from Iphone. Please excuse any typos.

John Abraham

unread,
May 21, 2014, 8:24:53 PM5/21/14
to ns-3-...@googlegroups.com
Please install in a new folder

Sent from my iPhone

Avinash Sridhar

unread,
May 21, 2014, 9:23:58 PM5/21/14
to ns-3-...@googlegroups.com
HI John,

I installed ns-3-dev and netanim in fresh new folders.

The netanim folder only has a set of c++ and their respective header files. I don't see a NetAnim* executable for opening the simulation software anymore.

~Avinash

John Abraham

unread,
May 21, 2014, 9:30:54 PM5/21/14
to ns-3-...@googlegroups.com
build NetAnim, based on instructions here.

Avinash Sridhar

unread,
May 21, 2014, 9:32:49 PM5/21/14
to ns-3-...@googlegroups.com

HI John,

Also, initially when I first installed NS-3 I did it by downloading ns3-all-in-one using mercurial -->
hg clone http://code.nsnam.org/ns-3-allinone

~Avinash

John Abraham

unread,
May 21, 2014, 9:35:13 PM5/21/14
to ns-3-...@googlegroups.com
i see, 
well, if you cloned netanim directly.... then you have to do the build steps in

Avinash Sridhar

unread,
May 21, 2014, 9:47:00 PM5/21/14
to ns-3-...@googlegroups.com
Hi John,

Awesome, I can see the station moving now successfully after using the new patch.

Thanks for your help. Much appreciated!

~Avinash

John Abraham

unread,
May 21, 2014, 9:43:54 PM5/21/14
to ns-3-...@googlegroups.com
since you are already using ns-3-dev, you can ignore any comments i made about ns-3-dev, if you are not familiar with how to build it.

ns-3-dev generates netanim-3.105 trace files, therefore you need to use netanim-3.105 (the one packaged in the ns-allinone is probably netanim-3.104).

Reply all
Reply to author
Forward
0 new messages