[ndnSIM] Waypoint Mobility Model

Anthony Dowling dowlinah at clarkson.edu
Wed May 31 10:54:01 PDT 2017


Hello Junxiao,

I realize that, however, it's not clear how to add the path1 to either
'walk' or 'walker'. The documentation I have found is very unclear on how
to do this.

Thanks for your time,
Anthony

On Wed, May 31, 2017 at 1:50 PM, Junxiao Shi <shijunxiao at email.arizona.edu>
wrote:

> Hi Anthony
>
> While I haven't used waypoint mobility model myself, I see an obvious
> problem in your snippet:
> The variable 'path1' isn't associated with 'walk' or 'walker' at all. It's
> initialized but never used.
>
> Yours, Junxiao
>
> On May 31, 2017 10:40, "Anthony Dowling" <dowlinah at clarkson.edu> wrote:
>
> Hello All,
>
> In my research, I am working with ndnSIM, and need to use the Waypoint
> Mobility Model, and after reading the documentation, I believe my code is
> close, because it compiles, however, when I run it, the node doesn't move
> at all. How can I make the Waypoint Mobility Model work correctly? Code is
> below.
>
> //#############################################
>   MobilityHelper walk;
>
> // sets up the initial position of the walker
>   walk.SetPositionAllocator ("ns3::GridPositionAllocator",
>     "MinX", DoubleValue (50.0),
>     "MinY", DoubleValue (20.0),
>     "DeltaX", DoubleValue (20.0),
>     "DeltaY", DoubleValue (20.0),
>     "GridWidth", UintegerValue (3),
>     "LayoutType", StringValue ("RowFirst"));
>
>   ns3::WaypointMobilityModel path1;
>   path1.AddWaypoint( Waypoint( Seconds(5.0) , Vector3D( 0.0, 0.0, 0.0) ));
>   path1.AddWaypoint( Waypoint( Seconds(10.0) , Vector3D( 40.0, 20.0, 0.0)
> ));
>
>   walk.SetMobilityModel("ns3::WaypointMobilityModel");
>   walk.Install(walker);
>
> //###################################################################
>
> Thanks for your time,
> Anthony Dowling
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170531/7832ee93/attachment.html>


More information about the ndnSIM mailing list