Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] Polygon coordinates via TraCI

Dear Sumo-Users,

 

we tried to access the polygon information within the C++ TraCI, as proposed in a former issue (see below): 

    […]

    const std::string id            = polygon_ids.at(i);

    const std::string type          = polygon.getType(id);

    const TraCIPositionVector shape = polygon.getShape(id);

    […]

Unfortunately, we obtain the following error in the SUMO-GUI (v0.32)

Error: Storage::writeUnsignedByte(): Invalid value, not in [0, 255]

Quitting (on error).

when we execute the polygon.getShape() method (see above), which is defined in TraCIAPI.cpp as follows:

 

    // ---------------------------------------------------------------------------

    // TraCIAPI::PolygonScope-methods

    // ---------------------------------------------------------------------------

     […]

    TraCIPositionVector

    TraCIAPI::PolygonScope::getShape(const std::string& polygonID) const {

        return myParent.getPolygon(CMD_GET_POLYGON_VARIABLE, VAR_SHAPE, polygonID);

    }

     […]

 

Can you recommend how we could solve that issue?

 

Regards,

Marc

 

 

Von: sumo-user-bounces@xxxxxxxxxxx [mailto:sumo-user-bounces@xxxxxxxxxxx] Im Auftrag von Jakob Erdmann
Gesendet: Mittwoch, 12. September 2018 12:44
An: Sumo project User discussions <sumo-user@xxxxxxxxxxx>
Betreff: Re: [sumo-user] Polygon coordinates via TraCI

 

 

2018-09-12 12:42 GMT+02:00 Thomas Thorn <thorn@xxxxxx>:

Hello everybody,

 

I am new to sumo. I use sumo 0.32 and was wondering if it is possible to get the coordinates of a polygon via TraCI.

 

Best regards,

Thomas

 


_______________________________________________
sumo-user mailing list
sumo-user@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user

 


Back to the top