Hey,
thanks a lot for your answer. I checked the Python example and adapted it to my needs and it worked. I then prepared the minimal example
for C++ and while doing that, I think I found the solution. However, I still didn’t fully understand why… Maybe you could give me a little hint, just for understanding. My subscription to both vehicles and persons around a vehicle works fine now. If I only
subscribe to persons though, the program crashes straight after starting it. So, if I comment line 66 it crashes (which is what I did in my not-minimal-example and why I asked for help), if I comment line 67 it works and if I don’t comment either of those
two lines, it works, too.
You can find the cpp-file here:
https://syncandshare.lrz.de/dl/fiWxH8FERhgLwXaDorAyFmW1/SumoConnect.cpp
Thanks for the amazing help here!
Jakob Kaths
Von: sumo-user-bounces@xxxxxxxxxxx [mailto:sumo-user-bounces@xxxxxxxxxxx]
Im Auftrag von Jakob Erdmann
Gesendet: Mittwoch, 20. Dezember 2017 09:32
An: Sumo project User discussions <sumo-user@xxxxxxxxxxx>
Betreff: Re: [sumo-user] Context Subscription of a Vehicle to Values of Persons (TraCI API C++)
subscribing to persons around an object and subscribing to things around a person should be working. (at least it does in our tests since version 0.31.0).
Can send a small scenario where it fails for you?
regards,
Jakob
2017-12-19 17:59 GMT+01:00 Kaths, Jakob <jakob.kaths@xxxxxx>:
Hello!
I was wondering if it’s possible to retrieve values of pedestrians in SUMO by subscription. I know, that
in Context Subscription in the Wiki (http://sumo.dlr.de/wiki/TraCI/Object_Context_Subscription) pedestrians are not mentioned. However, I found the corresponding value
(CMD_GET_PERSON_VARIABLE 0xae) in the TraCIConstants.h and tried to subscribe, but it failed. Is there a possibility to retrieve position, angle, speed etc. from pedestrians via subscription without modelling them as vehicles? If not, is this planned for the
future or could you give a hint of how to implement this?
Thanks in advance!
Jakob
--
Dipl.-Ing.
Jakob Kaths
Technische Universität München
Ingenieurfakultät Bau Geo Umwelt
Lehrstuhl für Verkehrstechnik
jakob.kaths@xxxxxx
_______________________________________________
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