Bug 1210 - Pyviz visualizer bounds are hardcoded and may be misaligned with mobility
Pyviz visualizer bounds are hardcoded and may be misaligned with mobility
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: visualizer
ns-3.11
All Linux
: P5 normal
Assigned To: Gustavo J. A. M. Carneiro
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-07-06 09:58 UTC by Nicholas Loulloudes
Modified: 2018-06-07 14:48 UTC (History)
3 users (show)

See Also:


Attachments
NS2 Mobility Traces (590.71 KB, application/octet-stream)
2011-07-06 10:16 UTC, Nicholas Loulloudes
Details
Patch to automatically increase visualisation bounds when a node moves (934 bytes, patch)
2018-05-23 10:58 UTC, Matthew Bradbury
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Nicholas Loulloudes 2011-07-06 09:58:01 UTC
Hi, 

I am trying to use PyViz with NS2 traces derived from VanetMobiSim. The generated traces are in the range of X(4000-5000m) and Y(7000-8000m).

However, the following problem appears. When i load the NS2 Traces using the NS2MobilityHelper, and then run the simulation with PyViz, the simulation area bounds are from X(-3000,+3000m) and Y(-3000,+3000). Therefore, the NS2 traces are not visible.

I am attaching the traces in a text file, so as to reproduce this problem.

Is this a known bug?
Comment 1 Nicholas Loulloudes 2011-07-06 10:16:53 UTC
Created attachment 1189 [details]
NS2 Mobility Traces
Comment 2 Gustavo J. A. M. Carneiro 2011-09-25 11:37:07 UTC
It's true, visualizer bounds are hardcoded initially to +/-3000 m.  It is only possible to change it with a Python API only at the moment.
In the mean time, if you want to change the hardcoded value, look for this line:

        self.canvas.set_bounds(-10000, -10000, 10000, 10000)

in src/visualizer/visualizer/core.py.  That value is 3 times the value in meters.
Comment 3 Matthew Bradbury 2018-05-23 10:58:17 UTC
Created attachment 3097 [details]
Patch to automatically increase visualisation bounds when a node moves

I have encountered this issue myself, with nodes mobile over a 40KM^2 area. The default bounds of the visualiser are insufficient to display all the nodes present, as nodes initially start close to each other and then move away from each other.

The attached patch will increase the bounds when a node moves outside the starting area.
Comment 4 Tom Henderson 2018-06-07 14:48:53 UTC
fixed in changeset 13629:29680b2a505e