jhavl / swift

MIT License
92 stars 22 forks source link

Error in documentation #20

Open olmerg opened 3 years ago

olmerg commented 3 years ago

The import of backends has changed in the last version now has to be:

from roboticstoolbox.backends.swift import Swift
env =  Swift()
env.launch(realtime=True)
env.add(robot)
for i in range(0,10*n):
        robot.q=q_m[i%n,:]
        env.step(Ts)
tomawang commented 2 years ago

Hello: Follow up and more test as the following. Is this error from RTB or swift?
Please help to check ! Thanks! Sincerely, Tom Wang

PC

Default Edge browser, win 10 64-bits,, python 3.7.6 (Anaconda 3), roboticstoolbox-python Version: 0.11.0 (conda install).

Code:

>>> from roboticstoolbox.backends.swift import Swift
>>> env =  Swift()
>>> env.launch(realtime=True)
>>> import roboticstoolbox as rtb          # test
>>> robot = rtb.models.URDF.Panda()    # test
>>> env.add(robot)  

Output:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "d:\Anaconda3\lib\site-packages\swift\Swift.py", line 367, in add
    show_robot=show_robot, show_collision=show_collision
TypeError: _to_dict() got an unexpected keyword argument 'show_robot'
>>>