sidewalklabs / sumo-web3d Goto Github PK
View Code? Open in Web Editor NEWWeb-based 3D visualization of SUMO microsimulations using TraCI and three.js.
License: Eclipse Public License 2.0
Web-based 3D visualization of SUMO microsimulations using TraCI and three.js.
License: Eclipse Public License 2.0
From a fresh install of sumo-web3d and SUMO_HOME set to C:/Program Files (x86)/DLR/Sumo
sumo-web3d
fails to run
See below for the error log:
$ sumo-web3d
Traceback (most recent call last):
File "c:\tools\anaconda\lib\runpy.py", line 184, in _run_module_as_main
"__main__", mod_spec)
File "c:\tools\anaconda\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Tools\anaconda\Scripts\sumo-web3d.exe\__main__.py", line 9, in <module>
File "c:\tools\anaconda\lib\site-packages\sumo_web3d\server\server.py", line 596, in run
main(args)
File "c:\tools\anaconda\lib\site-packages\sumo_web3d\server\server.py", line 560, in main
scenarios = load_scenarios_file({}, SCENARIOS_PATH)
File "c:\tools\anaconda\lib\site-packages\sumo_web3d\server\server.py", line 471, in load_scenarios_file
scenario = Scenario.from_config_json(new_scenario)
File "c:\tools\anaconda\lib\site-packages\sumo_web3d\server\server.py", line 119, in from_config_json
for xml in [parse_xml_file(f) for f in additional_files]:
File "c:\tools\anaconda\lib\site-packages\sumo_web3d\server\server.py", line 119, in <listcomp>
for xml in [parse_xml_file(f) for f in additional_files]:
File "c:\tools\anaconda\lib\site-packages\sumo_web3d\server\xml_utils.py", line 10, in parse_xml_file
return xmltodict.parse(f.read(), attr_prefix='')
File "c:\tools\anaconda\lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 27814: character maps to <undefined>
I created a multi client by adding a unique tag when starting traci. After i opened two browser extension (it works). But when i added to car, sometimes ı just see vehicles on one of browser. How can i fix this problem?
Hi,
I am trying to load a saved state using the --load-state option under --sumo-args. Although both Sumo and the web browser are opening, the simulation does not work either in Sumo or in the browser. Any idea how to fix this??
Thanks in advance
Hi,
Thanks for putting this project together! Is there some way to control the controls of the vehicles? It doesn't seem to be drawing the colors from the traci colors and I'm having trouble figuring out where to control the color choices.
Thanks!
Eugene
It defaults to 1 second which is too jerky for smooth playback.
You can change this via sumo-web3d --sumo-args "--step-length 0.01"
, but that requires restarting the simulation. SUMO doesn't currently support changing the step length after the simulation has started.
I have a project that requires the simulating a network which is quite large, The UI renders it quickly in the beginning but as ore cars are added to the network, the flow slows down. The animation becomes choppy.
The fps gets dropped to 4-5 frames per second which is quite choppy.
In order to reduce the time taken for simulation, I am actually reading the states of the simulation from a DB that I have created. So there is essentially no simulation involved, it is just visualizing how the network performed.
Is there a limit to how many cars/ how large a network can be simulated with this?
When I inspect the performance using chrome webtools, I can see that initially the webGLRenderer takes around 40 milli seconds, but later on it takes up 100ms when there are more cars. See attached figfure.
Do you have any suggestion in order to speed up rendering for a smooth playback?
Hello,
Is it possible to start the simulation with TRACI start() method? If not, how can I use Traci with sumo-web3d?
Thanks!
$ python setup.py install
running install
running bdist_egg
running egg_info
creating sumo_web3d.egg-info
writing sumo_web3d.egg-info\PKG-INFO
writing dependency_links to sumo_web3d.egg-info\dependency_links.txt
writing entry points to sumo_web3d.egg-info\entry_points.txt
writing requirements to sumo_web3d.egg-info\requires.txt
writing top-level names to sumo_web3d.egg-info\top_level.txt
writing manifest file 'sumo_web3d.egg-info\SOURCES.txt'
reading manifest file 'sumo_web3d.egg-info\SOURCES.txt'
I have successfully installed sumo-web3d, but the following error appears when starting the server. How can I solve it?
sumo-web3d
Traceback (most recent call last):
File "D:\Users\Anaconda3\envs\tf2-gpu\Scripts\sumo-web3d-script.py", line 33, in <module>
sys.exit(load_entry_point('sumo-web3d', 'console_scripts', 'sumo-web3d')())
File "c:\sumo\tools\sumo-web3d\sumo_web3d\server\server.py", line 608, in run
main(args)
File "c:\sumo\tools\sumo-web3d\sumo_web3d\server\server.py", line 588, in main
app = setup_http_server(task, SCENARIOS_PATH, scenarios)
File "c:\sumo\tools\sumo-web3d\sumo_web3d\server\server.py", line 518, in setup_http_server
functools.partial(scenario_attribute_route, scenario_file, scenarios, 'additional', None)
File "D:\Users\Anaconda3\envs\tf2-gpu\lib\site-packages\aiohttp-4.0.0a1-py3.7-win-amd64.egg\aiohttp\web_urldispatcher.py", line 1069, in add_get
resource.add_route(hdrs.METH_HEAD, handler, **kwargs)
File "D:\Users\Anaconda3\envs\tf2-gpu\lib\site-packages\aiohttp-4.0.0a1-py3.7-win-amd64.egg\aiohttp\web_urldispatcher.py", line 294, in add_route
expect_handler=expect_handler)
File "D:\Users\Anaconda3\envs\tf2-gpu\lib\site-packages\aiohttp-4.0.0a1-py3.7-win-amd64.egg\aiohttp\web_urldispatcher.py", line 817, in __init__
resource=resource)
File "D:\Users\Anaconda3\envs\tf2-gpu\lib\site-packages\aiohttp-4.0.0a1-py3.7-win-amd64.egg\aiohttp\web_urldispatcher.py", line 144, in __init__
", got {!r}".format(handler))
TypeError: Only async functions are allowed as web-handlers , got functools.partial(<function send_as_http_response.<locals>.func_wrapper at 0x000001A7A4098048>, 'c:\\sumo\\tools\\sumo-web3d\\sumo_web3d\\server\\..\\scenarios.json', {'bologna-acosta': <sumo_web3d.server.server.Scenario object at 0x000001A7A40A3E48>, 'downtown-toronto': <sumo_web3d.server.server.Scenario object at 0x000001A7A6512B88>, 'queens-quay': <sumo_web3d.server.server.Scenario object at 0x000001A7A4099848>, 'cross3ltl': <sumo_web3d.server.server.Scenario object at 0x000001A7A40C8108>, 'pedestring-striping': <sumo_web3d.server.server.Scenario object at 0x000001A7A4099A48>, 'person-number': <sumo_web3d.server.server.Scenario object at 0x000001A7A4F70BC8>}, 'additional', None)
(tf2-gpu)
Hi,
I want to change the colour of the roads in frontend. After editing the material.ts file on ubuntu. How to build it so as to see the effect in visualization.
Thanks
i added the uniq label argumant when start traci. i start new traci with uniq traci When i opened the new browser. But When i close the any browser, traci is closing. But ı want to close just traci which have uniq ıd.
either for points of interest or for vehicle classes. It would be nice to add trees to the simulation, for examples.
hello,sir,my result has no building.how can i solve it?
After installation, I ran this command to successfully load the map
sumo-web3d -c path/to/your/simulation.sumocfg
But without a vehicle, I don’t know how to run,please help me.
Hi,
when I run sumo-web3d and point my browser to local host at port 5000, I get the blank page with the word 'loading...'.
From the web console in Firefox, the problem appears to do with a
failure to load index.bundle.js
and also something to do with
index.bundle.js being loaded with the MIME type text/plain which it doesn't regard as a valid JavaScript MIME type.
please does anyone have any idea how I could resolve this.
I have attached screenshots below
I want to see SUMO in the web browser with another computer connected to the same network, but I can't. Does sumoweb3d support this? If so, what should I pay attention to in order to do this?
Dear Sir,
I am able to run the command from cmd now but getting the following error, could you kindly advice?
https://drive.google.com/open?id=1fzFbLR9T53VZ54i5cqXl0hrzXnB_A_2C
Thank you.
Best Regards
Nasim
Hello everyone,
I was able to to visualize map but I did't see any vehicles on road?
How can I fix this issue?
Thank you
SUMO-Web3D works with SUMO 0.32 but not with the 1.0.x. series.
The culprit is probably in this section of TraCI changes:
http://sumo.dlr.de/wiki/ChangeLog#Other_3
Hi,
I am able to run the simulation but I don't any movement in there, just the scenarios can be loaded. Any help will be highly appreciated.
Thank you.
Regards
Nasim
TypeError: getSubscriptionResults() missing 1 required positional argument: 'objectID'
I got this error, but I cannot resolve it.
The initial frontend work well, but it doesn't simulate anything(vehicles, pedestrians)
Can help?
Ubuntu 16.04 (Docker image)
sumo-1.0.1
$SUMO_HOME set to /~~~/sumo-1.0.1/
I followed this instructions
This issue was automatically created by Allstar.
Security Policy Violation
Security policy not enabled.
A SECURITY.md file can give users information about what constitutes a vulnerability and how to report one securely so that information about a bug is not publicly visible. Examples of secure reporting methods include using an issue tracker with private issue support, or encrypted email with a published key.
To fix this, add a SECURITY.md file that explains how to handle vulnerabilities found in your repository. Go to https://github.com/sidewalklabs/sumo-web3d/security/policy to enable.
For more information, see https://docs.github.com/en/code-security/getting-started/adding-a-security-policy-to-your-repository.
This issue will auto resolve when the policy is in compliance.
Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.
Server starts successfully but I get an error when attempting to load a model (any model):
Error in connection handler
Traceback (most recent call last):
File "C:\Python\Python38-32\lib\site-packages\websockets\server.py", line 192, in handler
await self.ws_handler(self, path)
File "C:\Dev\Traffic\SUMO\sumo-web3d-master\sumo-web3d-master\sumo_web3d\server\server.py", line 313, in websocket_simulation_control
sumo_start_fn()
File "C:\Dev\Traffic\SUMO\sumo-web3d-master\sumo-web3d-master\sumo_web3d\server\server.py", line 578, in
lambda: sumo_start_fn(getattr(current_scenario, 'config_file')),
File "C:\Dev\Traffic\SUMO\sumo-web3d-master\sumo-web3d-master\sumo_web3d\server\server.py", line 347, in start_sumo_executable
for light_id in traci.trafficlights.getIDList():
AttributeError: module 'traci' has no attribute 'trafficlights'
Any ideas as to why and how to fix?
In the Sumo3D.ts class this.transform is initialized based the nodes passed to it. If all the nodes are in a line with y = 0, it doesn't correctly create a rectangle around it.
Hello, how can I connect SUMO to Unity3D? I have cloned your projects and simulation is running but unfortunately connection between Unity3D with SUMO is not working.
Hi, this is a nice work. I tried it, however, got the following error on Win10 with SUMO 1.1.0. Maybe the mixed use of slash and backslack and bad path .../joined.rou.xml joined_busses.rou.xml
lead the problem.
(base) ...>sumo-web3d
Listening on:
127.0.0.1:5000 (HTTP)
127.0.0.1:5678 (WebSockets)
Switching to bologna-acosta
Executing ...\Sumo\bin\sumo -c ...\sumo_web3d\server\..\scenarios/bologna-acosta/run.sumo.cfg
Loading configuration... done.
Error: The route file '...\sumo_web3d\server\..\scenarios/bologna-acosta/joined.rou.xml joined_busses.rou.xml' is not accessible.
Quitting (on error).
Error in connection handler
Traceback (most recent call last):
File "...\websockets\server.py", line 152, in handler
yield from self.ws_handler(self, path)
File "...\sumo_web3d\server\server.py", line 309, in websocket_simulation_control
sumo_start_fn()
File "...\sumo_web3d\server\server.py", line 565, in <lambda>
lambda: sumo_start_fn(getattr(current_scenario, 'config_file')),
File "...\sumo_web3d\server\server.py", line 339, in start_sumo_executable
traci.start(args)
File "...\Sumo\tools\traci\__init__.py", line 99, in start
return getVersion()
File "...\Sumo\tools\traci\__init__.py", line 208, in getVersion
return _connections[""].getVersion()
File "...\Sumo\tools\traci\connection.py", line 337, in getVersion
result = self._sendExact()
File "...\Sumo\tools\traci\connection.py", line 99, in _sendExact
raise FatalTraCIError("connection closed by SUMO")
traci.exceptions.FatalTraCIError: connection closed by SUMO
Traceback (most recent call last):
File "...\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "...\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "...\sumo-web3d.exe\__main__.py", line 9, in <module>
File "...\sumo_web3d\server\server.py", line 596, in run
main(args)
File "...\sumo_web3d\server\server.py", line 591, in main
loop.run_forever()
File "...\lib\asyncio\base_events.py", line 421, in run_forever
self._run_once()
File "...\lib\asyncio\base_events.py", line 1390, in _run_once
event_list = self._selector.select(timeout)
File "...\lib\selectors.py", line 323, in select
r, w, _ = self._select(self._readers, self._writers, [], timeout)
File "...\lib\selectors.py", line 314, in _select
r, w, x = select.select(r, w, w, timeout)
KeyboardInterrupt
After avoiding use of the relative dir in myown testing files, I cannot get the vehicle animation either.
In the browser,
Stats
time: 0.000 s
payload: 0.0 KB
simulate: 0.00 ms
snapshot: 0.00 ms
Vehicle Summary
Click Summary
N/A
In the cmd,
(base) ...>sumo-web3d -c "...\sim.sumocfg"
Listening on:
127.0.0.1:5000 (HTTP)
127.0.0.1:5678 (WebSockets)
Switching to sim.sumocfg
Switching to sim.sumocfg
Executing ...\Sumo\bin\sumo -c ...\sim.sumocfg
Loading configuration... done.
***Starting server on port 16902 ***
Loading net-file from '...\sim.net.xml'... done (2ms).
Warning: Missing yellow phase in tlLogic '65', program '65' for tl-index 0 when switching to phase 1
Loading done.
Simulation started with time: 0.00
...\Sumo\tools\traci\domain.py:113: UserWarning: The domain trafficlights is deprecated, use trafficlight instead.
self._name, self._deprecatedFor)) # , DeprecationWarning)
This issue was automatically created by Allstar.
Security Policy Violation
No protection found for branch master
This issue will auto resolve when the policy is in compliance.
Issue created by Allstar. See https://github.com/ossf/allstar/ for more information. For questions specific to the repository, please contact the owner or maintainer.
Dear Sir,
(using windows 10)
I am using your code in one of my university project to simulate a transportation network in SUMO. I have cloned your repository and when I run it in IntelliJ I get the following error:
https://drive.google.com/open?id=1gjp94EWLG93A14MhQL46GANEYsjzLNvk
I will be very thankful to you for an advice.
Thank you.
Best Regards
Nasim from Frankfurt am Main
Germany
Complete output (1 lines):
error in sumo-web3d setup command: "values of 'package_data' dict" must be a list of strings (got 'sumo_web3d/static/*')
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
We currently select all objects under the cursor, even if they're hidden.
Hello
I tried to install sumo-web3d but I got the error as below:
pip3 install sumo-web3d
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-l1m2n5og/sumo-web3d/setup.py'"'"'; __file__='"'"'/tmp/pip-install-l1m2n5og/sumo-web3d/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-install-l1m2n5og/sumo-web3d/pip-egg-info
cwd: /tmp/pip-install-l1m2n5og/sumo-web3d/
Complete output (1 lines):
error in sumo-web3d setup command: "values of 'package_data' dict" must be a list of strings (got 'sumo_web3d/static/*')
----------------------------------------
ERROR: Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
I also modified the setup file by changin in to list as it was mentioned in previous issue but it still doesn't work.
Any idea to solve this problem?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.