|
From: Anderson R. <and...@gm...> - 2013-03-23 22:04:09
|
Hi Craig, AFAIK, if we try to retrieve information of a vehicle that does not exist in the simulation, SUMO gives a corresponding error message and finishes gracefully. A segfault occurs when something really wrong happens on SUMO... Could you provide more information on what steps do you execute that triggers the error? Regards, -- Anderson Rocha Tavares http://inf.ufrgs.br/~artavares/ 2013/3/14 Hotmail <cra...@ho...> > Anderson, > > Thank you do much! That worked! :D I've been messing > with such a simple thing for two weeks. I didn't realize the inputs were > optional. Next up, I am trying to call traci.changeTarget(vehID,edgeID). I > use a method that provides a random edge to get the edgeID. I get a > segfault in sumo when I try this. It could be because the car completed its > route and no longer exists or I'm calling it wrong. What do you think? > > Thanks for all the help :). > > -Craig > > On Mar 14, 2013, at 8:38 PM, Anderson Rocha < > and...@gm...> wrote: > > > Hi Craig, > > > > Try omitting the depart time, position, speed and lane as well, making > your > > traci call look like this: > > > > traci.vehicle.add(str(vehID), str(routeID)) > > > > Also, please "answer to all" in the emails so that the other members in > > sumo-user list receive the emails :) > > > > Regards, > > -- > > Anderson Rocha Tavares > > http://inf.ufrgs.br/~artavares/ > > > > > > 2013/3/14 Craig Herndon <cra...@ho...> > > > >> Anderson, > >> > >> I just made your suggested change and sumo no longer > >> sends an error. > >> However, the vehicles still don't see the roadway. I even changed the > >> depart time to -2. > >> I have subscribed to vehicles and I use pprint to print out the > >> subscription results. > >> 80 is the traci constant for road id. 86 is the traci constant for lane > >> position. I don't understand > >> why the cars are never added to the roadway. > >> > >> {'1': {80: '', 86: -1001.0}, > >> '10': {80: '', 86: -1001.0}, > >> '2': {80: '', 86: -1001.0}, > >> '3': {80: '', 86: -1001.0}, > >> '4': {80: '', 86: -1001.0}, > >> '5': {80: '', 86: -1001.0}, > >> '6': {80: '', 86: -1001.0}, > >> '7': {80: '', 86: -1001.0}, > >> '8': {80: '', 86: -1001.0}, > >> '9': {80: '', 86: -1001.0}} > > > |