Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sumo-user] TraCI GUI Screenshot

Hello Mirko,

thank you for the reply. 
I don‘t calculate a simulation step after the screenshot. My use case is to pause simulation, loop over a set of different cars and save a screenshot for each of them, before the simulation continues. Waiting for the next simulation step is not really an option, as the screenshot is used immediately to visualize how a situation evolves assuming a certain driver behavior. 

From the github issue I can see that the „screenshot event is bound to the execution of a simulation step“. Before version 1.3.0 the screenshot was taken immediately (or a simulation step was performed without my knowledge). Actually my code didn‘t change but the screenshot behavior did. I think decoupling screenshot event and simulation would make sense as the current behavior is somewhat hard to anticipate.

Best regards,
Marcus

Am 30.10.2019 um 09:07 schrieb "m.barthauer@xxxxxxxxxxx" <m.barthauer@xxxxxxxxxxx>:

Do you also calculate a simulation step afterwards? The screenshot is only taken before the next step (see https://github.com/eclipse/sumo/issues/6153 )

 

Regards

Mirko

 

 

 

-----Original-Nachricht-----

Betreff: [sumo-user] TraCI GUI Screenshot

Datum: 2019-10-30T14:58:25+0100

Von: "Marcus Müller" <mail4m.mueller@xxxxxxxxx>

An: "Sumo project User discussions" <sumo-user@xxxxxxxxxxx>

 

 

 

 
Dear Sumo-Experts,
 
it looks like the TraCI Api for creating a screenshot has changed without the change being documented.
 
According to 
 
the function still expects the arguments "view ID" and "filename". If I use TraCI4Matlab to send these to Arguments, I receive the error message that a "compound object" is expected by TraCI. Checking the C++ Code unveils that the arguments filename, height and width now seem to be mandatory. I changed the TraCI4Matlab interface in order to send a compound object including all three arguments. Now I don't get an error message anymore and my code runs through, but still no screenshot is created. 
 
Can you please provide an example of how to create a screenshot from Matlab or Python? I am running on a two weeks old nightly build of SUMO.
 
Many thanks in Advance,
Marcus

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

Back to the top