pydy / pydy-tutorial-human-standing

PyDy tutorial materials for MASB 2014, PYCON 2014, and SciPy 2014/2015.
http://pydy.org
160 stars 70 forks source link

n06_equations_of_motion // cannot unpack non-iterable RigidBody object #119

Closed miercat0424 closed 3 years ago

miercat0424 commented 3 years ago

Hi, I'm following the 2016 "Simulating Robot ~~" tutorial video and i stuck on

https://www.youtube.com/watch?v=r4piIKV4sDw&t=6375s 1:51:28 here

fr , frstar = kane.kanes_equations(loads,bodies)

TypeError : cannot unpack non-iterable RigidBody object

it shows different result from the video

can you help me ?

moorepants commented 3 years ago

If you are using a newer version of SymPy the API has changed:

kanes_equations(bodies, loads)

See: https://docs.sympy.org/latest/modules/physics/mechanics/api/kane_lagrange.html#sympy.physics.mechanics.kane.KanesMethod.kanes_equations

miercat0424 commented 3 years ago

Thanks! I changed

fr, frstar = kane.kanes_equations(loads , bodies) to fr, frstar = kane.kanes_equations(bodies , loads) it works ! I love that tutorial thanks a lot ! have a nice day