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]<mailto:[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]>
[mailto:[email protected]<mailto:[email protected]>] Im
Auftrag von Jakob Erdmann
Gesendet: Freitag, 12. Oktober 2018 09:00
An: Sumo project User discussions
<[email protected]<mailto:[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]<mailto:[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<http://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]>
[mailto:[email protected]<mailto:[email protected]>] Im
Auftrag von Jakob Erdmann
Gesendet: Mittwoch, 12. September 2018 12:44
An: Sumo project User discussions
<[email protected]<mailto:[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]<mailto:[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]<mailto:[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]<mailto:[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]<mailto:[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