sumo
sumo copied to clipboard
C# TraCI not working in sumo 1.13.0
Add your issue description here.
If possible, upload an example that shows your problem.
SUMO-version: sumo 1.13.0 operating system: ubuntu 20.04
I was using the code provided by the https://github.com/CodingConnected/CodingConnected.Traci site in the sumo 1.12.0 version.
After installing version 1.13.0 on a new computer, it does not work properly. sumoclient.SubscribeContextData("0", 50); It works well when you annotate the above code, but the above code stops the simulation with the "NullReferenceException: Object reference not set to an instance of an object" error at ControlCommands.cs 69 line tmp
I would appreciate it if you could help me with this.
It works well when you annotate the above code
Do you mean, "when you remove this line of code by turning it into a comment" ?
- can you check whether TracCI.NET-Usage-example is working with 1.13?
- can you explain where the method
SubscribeContextDatacomes from? It doesn't appear to exist in the linked repo
"when you remove this line of code by turning it into a comment" Yes. it is.
- can you check whether TracCI.NET-Usage-example is working with 1.13? It works, but in that example, if you enter the C key, you will do "to make context subscription", which will stop the simulation.
The code does not stop immediately where the corresponding SubscriptionContext code returns, but it will subsequently stop at "CodingConnected.TraCI.NET/Commands/ControlCommands.cs line 69".
- can you explain where the method SubscribeContextData comes from? It doesn't appear to exist in the linked repo It is in "CodingConnected.Traci/CodingConnected.TraCI.NET/Commands/TraCIContextSubscribableCommand.cs"
* can you explain where the method SubscribeContextData comes from? It doesn't appear to exist in the linked repoIt is in "CodingConnected.Traci/CodingConnected.TraCI.NET/Commands/TraCIContextSubscribableCommand.cs"
I can only find SubscribeContext but not SubscribeContextData in that file. Is this the one you mean?
https://github.com/CodingConnected/CodingConnected.Traci/blob/56fe20c626cc098620b4f5b671320352ba33ca50/CodingConnected.TraCI.NET/Commands/TraCIContextSubscribableCommand.cs#L52
@behrisch @schwamborn did anything change in the way we return context subscriptions in 1.13.0?
@namdre not that I know of. @Taeng-ioio Can you confirm it works on the same machine with sumo 1.12.0?
Well there was #8388 but I don't think this is the reason here. I would also like to know what SubscribeContextData does
@namdre Whoops, I'm sorry. As you said, SubscriptionContext is correct, not SubscriptionContextData.
@schwamborn Normal operation on 1.12.0. It works on the project I created, and it works fine on the TraCI.NET-Usage-example.
I'll leave you a working screen
Below is a screen that works normally at 1.12.0.

Below is a screen that does not work with 1.13.0.

To explain a little bit more about the operation, After running in 1.12.0, press "to make context subscription" through the "C" button and enter vehicle number 0 to get the relevant vehicle information.
@Taeng-ioio Is there any information on how to build this for Linux?
@namdre @behrisch Perhaps I could help on that.
@Taeng-ioio Feel free to add more comments if you have more information. For now I think we should rather continue here: #11712