-
Notifications
You must be signed in to change notification settings - Fork 190
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error "Inconsistent coordinate dimensionality" #1781
Comments
Hi @xlnwel, This issue is due to the recently released There are two options now:
|
Hello @Adaickalavan I've tried both options, but either way, the following error happens when I run sanity check on the Apple M1 chip Traceback (most recent call last): [100/1508]
File "<string>", line 1, in <module>
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/spawn.py", line 125, in _main
prepare(preparation_data)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/spawn.py", line 236, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
main_content = runpy.run_path(main_path,
File "/opt/anaconda3/envs/chenxw/lib/python3.9/runpy.py", line 288, in run_path
return _run_module_code(code, init_globals, run_name,
File "/opt/anaconda3/envs/chenxw/lib/python3.9/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/opt/anaconda3/envs/chenxw/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/chenxw/Documents/SMARTS/scenarios/sumo/zoo_intersection/tmpfok519n0.py", line 62, in <module>
gen_traffic(
File "/Users/chenxw/Documents/SMARTS/smarts/sstudio/genscenario.py", line 162, in gen_traffic
saved_path = generator.plan_and_save(traffic, name, output_dir, seed=seed)
File "/Users/chenxw/Documents/SMARTS/smarts/sstudio/generators.py", line 188, in plan_and_save
net_file=self.road_network.source,
File "/Users/chenxw/Documents/SMARTS/smarts/sstudio/generators.py", line 363, in road_network
self._cache_road_network()
File "/Users/chenxw/Documents/SMARTS/smarts/sstudio/generators.py", line 297, in _cache_road_network
self._road_network = SumoRoadNetwork.from_spec(map_spec)
File "/Users/chenxw/Documents/SMARTS/smarts/core/sumo_road_network.py", line 180, in from_spec
junction_check_proc.start()
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in __init__
super().__init__(process_obj)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 42, in _launch
prep_data = spawn.get_preparation_data(process_obj._name)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/spawn.py", line 154, in get_preparation_data
_check_not_importing_main()
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/spawn.py", line 134, in _check_not_importing_main
raise RuntimeError('''
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/spawn.py", line 116, in spawn_main
exitcode = _main(fd, parent_sentinel)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/spawn.py", line 125, in _main
prepare(preparation_data)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/spawn.py", line 236, in prepare
_fixup_main_from_path(data['init_main_from_path'])
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/spawn.py", line 287, in _fixup_main_from_path
main_content = runpy.run_path(main_path,
File "/opt/anaconda3/envs/chenxw/lib/python3.9/runpy.py", line 288, in run_path
return _run_module_code(code, init_globals, run_name,
File "/opt/anaconda3/envs/chenxw/lib/python3.9/runpy.py", line 97, in _run_module_code
_run_code(code, mod_globals, init_globals,
File "/opt/anaconda3/envs/chenxw/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/Users/chenxw/Documents/SMARTS/scenarios/sumo/zoo_intersection/tmpfok519n0.py", line 87, in <module>
gen_social_agent_missions(
File "/Users/chenxw/Documents/SMARTS/smarts/sstudio/genscenario.py", line 214, in gen_social_agent_missions
saved = _gen_missions(
File "/Users/chenxw/Documents/SMARTS/smarts/sstudio/genscenario.py", line 392, in _gen_missions
missions = [
File "/Users/chenxw/Documents/SMARTS/smarts/sstudio/genscenario.py", line 393, in <listcomp>
types._ActorAndMission(actor=actor, mission=resolve_mission(mission))
File "/Users/chenxw/Documents/SMARTS/smarts/sstudio/genscenario.py", line 374, in resolve_mission
kwargs["route"] = generator.resolve_route(route, False)
File "/Users/chenxw/Documents/SMARTS/smarts/sstudio/generators.py", line 354, in resolve_route
road_map = self._map_for_route(route)
File "/Users/chenxw/Documents/SMARTS/smarts/sstudio/generators.py", line 324, in _map_for_route
road_map, _ = map_spec.builder_fn(map_spec)
File "/Users/chenxw/Documents/SMARTS/smarts/core/default_map_builder.py", line 148, in get_road_map
road_map = map_class.from_spec(map_spec)
File "/Users/chenxw/Documents/SMARTS/smarts/core/sumo_road_network.py", line 180, in from_spec
junction_check_proc.start()
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in __init__
super().__init__(process_obj)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 42, in _launch
prep_data = spawn.get_preparation_data(process_obj._name)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/spawn.py", line 154, in get_preparation_data
_check_not_importing_main()
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/spawn.py", line 134, in _check_not_importing_main
raise RuntimeError('''
RuntimeError:
An attempt has been made to start a new process before the
current process has finished its bootstrapping phase.
This probably means that you are not using fork to start your
child processes and you have forgotten to use the proper idiom
in the main module:
if __name__ == '__main__':
freeze_support()
...
The "freeze_support()" line can be omitted if the program
is not going to be frozen to produce an executable.
/opt/anaconda3/envs/chenxw/lib/python3.9/site-packages/trimesh/curvature.py:12: DeprecationWarning: Please use `coo_matrix` from the `scipy.sparse` namespace, the `scipy.sparse.coo` namespace is deprecated.
from scipy.sparse.coo import coo_matrix
dyld[6594]: Library not loaded: /opt/homebrew/opt/gdal/lib/libgdal.31.dylib
Referenced from: /opt/anaconda3/envs/chenxw/lib/python3.9/site-packages/sumo/bin/netconvert
Reason: tried: '/opt/homebrew/opt/gdal/lib/libgdal.31.dylib' (no such file), '/usr/local/lib/libgdal.31.dylib' (no such file), '/usr/lib/libgdal.31.dylib' (no such file)
WARNING:SumoRoadNetwork:unable to use netconvert tool to normalize coordinates: Command '['netconvert', '--offset.disable-normalization=FALSE', '--seed', '923909729', '-s', 'scenarios/sumo/zoo_intersection/map.net.xml', '-o', 'scenarios/sumo/zoo_intersection/shifted_map-AUTOGEN.net.xml']' returned non-zero exit status 250.
./tests/test_setup.py
PYTHONPATH=/Users/chenxw/Documents/SMARTS PYTHONHASHSEED=42 pytest -v \
--doctest-modules \
--forked \
--dist=loadscope \
--junitxml="sanity_test_result.xml" \
-n `expr \( \`nproc\` \/ 2 \& \`nproc\` \> 3 \) \| 2` \
./smarts/core/tests/test_python_version.py::test_python_version \
./smarts/core/tests/test_sumo_version.py::test_sumo_version \
./smarts/core/tests/test_dynamics_backend.py::test_set_pose \
./smarts/core/tests/test_sensors.py::test_waypoints_sensor \
./smarts/core/tests/test_smarts.py::test_smarts_doesnt_leak_tasks_after_reset \
./examples/tests/test_examples.py::test_examples[multi_agent] \
./smarts/env/tests/test_social_agent.py::test_social_agents
/bin/sh: nproc: command not found
/bin/sh: nproc: command not found
expr: syntax error
/bin/sh: pytest: command not found
make: *** [sanity-test] Error 127 I further tried to run /opt/anaconda3/envs/chenxw/lib/python3.9/site-packages/trimesh/curvature.py:12: DeprecationWarning: Please use `coo_matrix` from the `scipy.sparse` namespace, the `scipy.sparse.coo` namespace is deprecated.
from scipy.sparse.coo import coo_matrix
/opt/anaconda3/envs/chenxw/lib/python3.9/site-packages/trimesh/curvature.py:12: DeprecationWarning: Please use `coo_matrix` from the `scipy.sparse` namespace, the `scipy.sparse.coo` namespace is deprecated.
from scipy.sparse.coo import coo_matrix
/opt/anaconda3/envs/chenxw/lib/python3.9/site-packages/trimesh/curvature.py:12: DeprecationWarning: Please use `coo_matrix` from the `scipy.sparse` namespace, the `scipy.sparse.coo` namespace is deprecated.
from scipy.sparse.coo import coo_matrix
Traceback (most recent call last):
File "/Users/chenxw/Documents/SMARTS/examples/multi_agent.py", line 77, in <module>
main(
File "/Users/chenxw/Documents/SMARTS/examples/multi_agent.py", line 32, in main
env = gym.make(
File "/opt/anaconda3/envs/chenxw/lib/python3.9/site-packages/gym/envs/registration.py", line 145, in make
return registry.make(id, **kwargs)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/site-packages/gym/envs/registration.py", line 90, in make
env = spec.make(**kwargs)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/site-packages/gym/envs/registration.py", line 60, in make
env = cls(**_kwargs)
File "/Users/chenxw/Documents/SMARTS/smarts/env/hiway_env.py", line 131, in __init__
envision_client = Envision(
File "/Users/chenxw/Documents/SMARTS/envision/client.py", line 152, in __init__
self._process.start()
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/process.py", line 121, in start
self._popen = self._Popen(self)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/context.py", line 224, in _Popen
return _default_context.get_context().Process._Popen(process_obj)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/context.py", line 284, in _Popen
return Popen(process_obj)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 32, in __init__
super().__init__(process_obj)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/popen_fork.py", line 19, in __init__
self._launch(process_obj)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/popen_spawn_posix.py", line 47, in _launch
reduction.dump(process_obj, fp)
File "/opt/anaconda3/envs/chenxw/lib/python3.9/multiprocessing/reduction.py", line 60, in dump
ForkingPickler(file, protocol).dump(obj)
AttributeError: Can't pickle local object 'EnvisionStateFilter.default.<locals>.default_override' |
Hi @xlnwel, Consider pip installing the $ cd <path/to>/SMARTS
$ python3.8 -m venv ./.venv
$ source ./.venv/bin/activate
$ pip install --upgrade pip wheel setuptools
$ pip install -e .[camera_obs,dev,test]
$ make sanity-test |
Hi @Adaickalavan Thank you so much for the help. I now able to run SMARTS on my local machine without issues |
/opt/anaconda3/envs/ggplz/bin/python /Users/heshouliang/smart/pymarl-master/src/SMARTS/examples/e3_multi_agent.py 我在运行官网多智能体的例子时也发生同样问题,请问如何解决? |
Hi @ggplz, Given this issue had been previously closed by the original author, and the significant codebase changes since then, please consider opening a new issue for us to better clarify any concerns. |
BUG REPORT
High Level Description
Run into Error "Inconsistent coordinate dimensionality" when running the sanity check.
Related Post
#1773 (comment)
SMARTS version
0.7.0rc0
Steps to reproduce the bug
The error happens when running
make sanity-test
.Resulting and expected behaviour
Should expect no errors.
Error logs and screenshots
System information
pip freeze
]Impact [If known]
The text was updated successfully, but these errors were encountered: