Skip to content

Ubuntu20.04 下 Scipy1.10.1 报错TypeError: array type complex256 is unsupported in linalg #7

Description

@VirtualCoder0

错误信息 TypeError: array type complex256 is unsupported in linalg

python main.py
/home/xs/anaconda3/envs/hongjun/lib/python3.9/site-packages/HongJun-0.1-py3.9.egg/HongJun/SimulatorControlDriver
2025-04-16 22:20:34.800 | INFO | HongJun.SimulatorControlDriver.SimulatorConnector:init:69 - ['UAV1', 'UAV10', 'UAV11', 'UAV12', 'UAV13', 'UAV14', 'UAV2', 'UAV3', 'UAV4', 'UAV5', 'UAV6', 'UAV7', 'UAV8', 'UAV9']
2025-04-16 22:20:38.202 | INFO | HongJun.SimulatorControlDriver.SimulatorConnector:run:128 - WSserver正在启动
2025-04-16 22:20:38.203 | INFO | HongJun.SimulatorControlDriver.SimulatorController:init:32 - simulator_connector初始化中
2025-04-16 22:20:38.204 | INFO | HongJun.SimulatorControlDriver.SimulatorConnector:initWSserver:133 - ws run
~~
Server started!
2025-04-16 22:20:38.208 | INFO | HongJun.SimulatorControlDriver.SimulatorController:init:34 - ['UAV1', 'UAV10', 'UAV11', 'UAV12', 'UAV13', 'UAV14', 'UAV2', 'UAV3', 'UAV4', 'UAV5', 'UAV6', 'UAV7', 'UAV8', 'UAV9']
2025-04-16 22:20:48.177 | INFO | main::42 - 0
2025-04-16 22:20:48.177 | INFO | main::42 - 1
2025-04-16 22:20:48.177 | INFO | main::42 - 2
2025-04-16 22:20:48.178 | INFO | main::42 - 3
2025-04-16 22:20:48.178 | INFO | main::42 - 4
2025-04-16 22:20:48.178 | INFO | main::42 - 5
2025-04-16 22:20:48.179 | INFO | main::42 - 6
2025-04-16 22:20:48.179 | INFO | main::42 - 7
2025-04-16 22:20:48.180 | INFO | main::42 - 8
2025-04-16 22:20:48.180 | INFO | main::42 - 9
2025-04-16 22:20:48.264 | INFO | main::42 - 10
2025-04-16 22:20:48.265 | INFO | main::42 - 11
2025-04-16 22:20:48.265 | INFO | main::42 - 12
2025-04-16 22:20:48.266 | INFO | main::42 - 13
Traceback (most recent call last):
File "/home/xs/Desktop/HongJunSimulator/HongJun/HongJun/Tasks/CustomTasks/TestTask1/main.py", line 50, in
stateMats = control_formation(posalive)
File "/home/xs/anaconda3/envs/hongjun/lib/python3.9/site-packages/HongJun-0.1-py3.9.egg/HongJun/Tasks/Libraries/ODE/controller_3.py", line 229, in control_formation
_A = find_gains(qs.T.flatten(), adj)
File "/home/xs/anaconda3/envs/hongjun/lib/python3.9/site-packages/HongJun-0.1-py3.9.egg/HongJun/Tasks/Libraries/ODE/controller_3.py", line 141, in find_gains
_U, _, _ = np.linalg.svd(
File "<array_function internals>", line 200, in svd
File "/home/xs/anaconda3/envs/hongjun/lib/python3.9/site-packages/numpy/linalg/linalg.py", line 1624, in svd
t, result_t = _commonType(a)
File "/home/xs/anaconda3/envs/hongjun/lib/python3.9/site-packages/numpy/linalg/linalg.py", line 147, in _commonType
raise TypeError("array type %s is unsupported in linalg" %
TypeError: array type complex256 is unsupported in linalg
Connected> s5-23G19cxNkunMQAAAB, total: 1
Disconnected> s5-23G19cxNkunMQAAAB, total: 0

应该是Scipy1.10.1的BUG,但是airgym又只支持Scipy1.10.1,不能通过下载新版Scipy解决,请问有好的解决方案吗?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions