petercorke / bdsim

Simulate dynamic systems expressed in block diagram form using Python
MIT License
177 stars 34 forks source link

AttributeError during running the sample code #7

Closed MerdanBay closed 2 years ago

MerdanBay commented 2 years ago

Environment

. Windows 10 + conda+ python3.9 . bdsim is installed by pip install git+https://github.com/petercorke/bdsim.git . machinevision is installed by pip install git+https://github.com/petercorke/machinevision-toolbox-python.git . roboticstoolbox is installed by pip install git+https://github.com/petercorke/robotics-toolbox-python.git

ISSUE

When i try to run the sample code, i got these returns

>>> import bdsim
>>> sim = bdsim.BDSim()
package bdsim not found
package roboticstoolbox not found
package machinevisiontoolbox not found

and then

>>> bd = sim.blockdiagram()
>>> sim.blocks()
0  blocks loaded
>>> demand = bd.STEP(T=1, name='demand')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'BlockDiagram' object has no attribute 'STEP'

any idea why this happens?

petercorke commented 2 years ago

Sorry, no idea. I'm not using Windows.

It'd help if you could debug load_blocks which is toward the end of bdsim.py and is invoked when you instantiate BDSim.

petercorke commented 2 years ago

Were you able to resolve this? I have have only recently been able to test under windows, the current version on GH works with windows

MerdanBay commented 2 years ago

@petercorke No, not yet. However, it would be very helpful if we had a working installation document

petercorke commented 2 years ago

You've installed what needs to be installed. If you get a chance please install the latest version from GH and let me know how it goes.