The issue is fixed in the latest development version.
regards,
Jakob

Am So., 14. Okt. 2018 um 20:29 Uhr schrieb Jakob Erdmann <
[email protected]>:

> Thank you for the example data which allowed identifying the issue:
> https://github.com/eclipse/sumo/issues/4707
>
>
> Am So., 14. Okt. 2018 um 07:59 Uhr schrieb Marc Zofka <[email protected]>:
>
>> Hi Jakob,
>>
>>
>>
>> i traced down the error and found out that it is caused by a specific
>> polygon in the polygon description file. When I detect this polygon during
>> runtime to prevent the application from reading out its shape (see attached
>> minimal example), it totally works for every other polygon. So the error is
>> potentially linked to the polygon’s definition. I also attached the polygon
>> description file to this mail.
>>
>>
>>
>> Regards,
>>
>> Marc
>>
>>
>>
>>
>>
>> *Von:* [email protected] [mailto:
>> [email protected]] *Im Auftrag von *Jakob Erdmann
>> *Gesendet:* Freitag, 12. Oktober 2018 22:20
>> *An:* Sumo project User discussions <[email protected]>
>> *Betreff:* Re: [sumo-user] Polygon coordinates via TraCI
>>
>>
>>
>> I am unable to reproduce the issue (testing with 1.0.1 and also with
>> 0.32.0).
>>
>> Please provide a minimal TraCI script that causes the error on your side.
>>
>>
>>
>>
>>
>> Am Fr., 12. Okt. 2018 um 19:46 Uhr schrieb Marc Zofka <[email protected]>:
>>
>> Hi Jakob,
>>
>>
>>
>> I checked your hints from the last mail:
>>
>> ·         The error appears regardless of whether I call
>> polygon.getShape() immediately after TraCIAPI::connect() or after setting
>> up some subscriptions.
>>
>> ·         I am using the following code
>>
>> […]
>>
>>   const std::vector<std::string> polygon_ids = polygon.getIDList();
>>
>>   for(std::size_t i=0; i < polygon_ids.size(); i++)
>>
>>   {
>>
>>     const std::string id                           = polygon_ids.at(i);
>>
>>     const std::string type                      = polygon.getType(id);
>>
>>     const TraCIPositionVector shape = polygon.getShape(id);
>>
>>     const TraCIColor color                    = polygon.getColor(id);
>>
>>     Polygon p(id, type, shape, color);
>>
>>   }
>>
>> […]
>>
>> and the error only occurs, if polygon.getShape(id) is called. The error
>> does not occur when I comment polygon.getShape() out.
>> I also tried to comment **only** polygon.getType() out, since I had
>> assumed that its invocation might could have caused the problem, but the
>> error persisted.
>>
>>
>>
>> So from my point of view, I assume that the problem is directly linked to
>> the polygon.getShape() function.
>>
>>
>>
>> I would appreciate any ideas.
>>
>>
>>
>> Best regards,
>>
>> Marc
>>
>>
>>
>>
>>
>> *Von:* [email protected] [mailto:
>> [email protected]] *Im Auftrag von *Jakob Erdmann
>> *Gesendet:* Freitag, 12. Oktober 2018 11:59
>> *An:* Sumo project User discussions <[email protected]>
>> *Betreff:* Re: [sumo-user] Polygon coordinates via TraCI
>>
>>
>>
>> - Can you reproduce the error when polygon.getShape() is the only traci
>> call (after initialization)?
>>
>> - Can you retrieve other polygon values without error?
>>
>>
>>
>>
>>
>>
>>
>> Am Fr., 12. Okt. 2018 um 10:28 Uhr schrieb Marc Zofka <[email protected]>:
>>
>> Hi,
>>
>>
>>
>> we are working with SUMO-GUI v.032 and the TraCI C++ code from v0.32.
>>
>>
>>
>> Best regards,
>>
>> Marc
>>
>>
>>
>> *Von:* [email protected] [mailto:
>> [email protected]] *Im Auftrag von *Jakob Erdmann
>> *Gesendet:* Freitag, 12. Oktober 2018 09:00
>> *An:* Sumo project User discussions <[email protected]>
>> *Betreff:* Re: [sumo-user] Polygon coordinates via TraCI
>>
>>
>>
>> Hello,
>>
>> shape retrieval is working in our currents tests. The error might be
>> caused by mixing client version 1.0.0+ with sumo version 0.32.0 (there was
>> a protocol change in 1.0.0)
>>
>> regards,
>>
>> Jakob
>>
>>
>>
>> Am Do., 11. Okt. 2018 um 08:59 Uhr schrieb Marc Zofka <[email protected]>:
>>
>> 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:* [email protected] [mailto:
>> [email protected]] *Im Auftrag von *Jakob Erdmann
>> *Gesendet:* Mittwoch, 12. September 2018 12:44
>> *An:* Sumo project User discussions <[email protected]>
>> *Betreff:* Re: [sumo-user] Polygon coordinates via TraCI
>>
>>
>>
>> Yes.
>> http://www.sumo.dlr.de/daily/pydoc/traci._polygon.html#PolygonDomain-getShape
>>
>>
>>
>> 2018-09-12 12:42 GMT+02:00 Thomas Thorn <[email protected]>:
>>
>> 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
>> [email protected]
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/sumo-user
>>
>>
>>
>> _______________________________________________
>> sumo-user mailing list
>> [email protected]
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/sumo-user
>>
>> _______________________________________________
>> sumo-user mailing list
>> [email protected]
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/sumo-user
>>
>> _______________________________________________
>> sumo-user mailing list
>> [email protected]
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/sumo-user
>>
>> _______________________________________________
>> sumo-user mailing list
>> [email protected]
>> To change your delivery options, retrieve your password, or unsubscribe
>> from this list, visit
>> https://dev.eclipse.org/mailman/listinfo/sumo-user
>>
>
_______________________________________________
sumo-user mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/sumo-user

Reply via email to