Using roiRoads and roiRects (VEINS)

312 views
Skip to first unread message

Joanne

unread,
Mar 16, 2014, 10:59:49 PM3/16/14
to omn...@googlegroups.com
I have a question about roiRoads and roiRects, maybe I am missing something but what exactly are they expecting, I created my own simple sumo network that I want to use instead of the provided erlangen roads, but when I do I get an error that the node is outside of the playground. I read that the I needed to set a region of interest. But I'm not exactly sure how to fill out the fields.

Is roiRoads a list of edges?
And what exactly is roiRects? Is this coordinates?

Christoph Sommer

unread,
Mar 17, 2014, 4:53:35 AM3/17/14
to omn...@googlegroups.com
Dear Joanne,

Joanne wrote:
> Is roiRoads a list of edges?
> And what exactly is roiRects? Is this coordinates?

This is documented briefly in the .ned and .h files [1] [2].

The Regions of Interest (given either as rectangles on the map, or as
road names) describe those regions of the SUMO simulation that will be
simulated in OMNeT++ as well.

Note that roiRects expects TraCI Coordinates (that is, X/Y Coordinates
as displayed in SUMO).


Best,

Christoph


[1]
https://github.com/sommer/veins/blob/veins-2.2/src/modules/mobility/traci/TraCIScenarioManagerLaunchd.ned#L55
[2]
https://github.com/sommer/veins/blob/veins-2.2/src/modules/mobility/traci/TraCIScenarioManager.h#L254

--
Dr.-Ing. Christoph Sommer
Institute of Computer Science
University of Innsbruck, Austria
Phone: +43 512 507-53285 / Fax: -53079
http://ccs.uibk.ac.at/~sommer/

Joanne

unread,
Mar 17, 2014, 8:29:25 PM3/17/14
to omn...@googlegroups.com
I guess I am not understanding how to prevent the "outside the playground" error. I have a simple map thats 2.5km x 2 km the convBoundary="0.00,0.00,2500.00,2000.00".

If I want to prevent areas outside the map being simulated I have to set the region of interest so:

roiRects = "0,0-2500,2500 0,0-2000,2000" assuming "x-min,x-min-x-max,x-max y-min,y-min-y-max,y-max" is that the format?

When I do this I still get the error so I'm assuming I'm missing something really simple. Like misinterpreting coordinates.

Christoph Sommer

unread,
Mar 18, 2014, 5:43:57 AM3/18/14
to omn...@googlegroups.com
Joanne wrote:
> roiRects = "0,0-2500,2500 0,0-2000,2000" assuming
> "x-min,x-min-x-max,x-max y-min,y-min-y-max,y-max" is that the format?

No. The Format is "x,y-X,Y" for one rectangle, "x,y-X,Y x,y-X,Y" for two
rectangles and so on. Again, note that roiRects expects TraCI
Coordinates (that is, X/Y Coordinates as displayed in SUMO). This means
your coordinates might be huge if offset normalization was disabled
during network import. Hover your mouse cursor on your SUMO map to
easily see which TraCI coordinates correspond to which point on the map.

Best,

Christoph

--
Dr.-Ing. Christoph Sommer
Institute of Computer Science
University of Innsbruck, Austria
Phone: +43 512 507-53285 / Fax: -53079
http://www.ccs-labs.org/~sommer/
Reply all
Reply to author
Forward
0 new messages