Commit b69e7579 authored by Olivier Lantsoght's avatar Olivier Lantsoght 🏁
Browse files

[MbsInvDyn][NewErr] Python fixes

parent 0851e8ac
......@@ -207,7 +207,7 @@ class MbsInvdyn(object):
error = libmodules.mbs_invdyn_loop(self.mbs_invdyn_ptr, self.mbs.mbs_data_ptr)
# Results(buffer) memory is kept BUT FILES WILL BE WRITTEN LATER
if self.get_options("save2file"):
if error >= 0 and self.get_options("save2file"):
self._load_results()
# finish function is required to close the module and write the results to disk.
......
......@@ -47,7 +47,6 @@ mbs_equil = Robotran.MbsEquil(mbs_data)
# Error: joints have change
# mbs_data.set_qdriven(2)
# Error: impossible cut
# mbs_data.dpt[3][4] = 10.
......@@ -123,9 +122,25 @@ mbs_data.set_qa(4)
mbs_data.set_qa(1)
mbs_data.set_qa(3)
mbs_data.set_qa(2)
# Error: impossible cut
# mbs_data.dpt[3][4] = 10.
# Error: Mass matrix full of 0 does not generate errors:
# We solve (roughly) F=m.a with m=0
mbs_invdyn = Robotran.MbsInvdyn(mbs_data)
mbs_invdyn.set_options(trajectoryqname = "../resultsR/RK4_q.res")
mbs_invdyn.set_options(trajectoryqdname = "../resultsR/RK4_qd.res")
mbs_invdyn.set_options(trajectoryqddname = "../resultsR/RK4_qdd.res")
mbs_invdyn.set_options(t0 = 1.0, tf = 2.0, dt = 2.5e-3)
# Error: joints have change
# mbs_data.set_qdriven(2)
# Error: Wrong trajectory files, the correct ones must be commented!
# mbs_invdyn.set_options(trajectoryqname="../resultsR/wrong_q.res")
# mbs_invdyn.set_options(trajectoryqdname="../resultsR/wrong_qd.res")
# mbs_invdyn.set_options(trajectoryqddname="../resultsR/wrong_qdd.res")
mbs_invdyn.set_options(trajectoryqname="../resultsR/RK4_q.res")
mbs_invdyn.set_options(trajectoryqdname="../resultsR/RK4_qd.res")
mbs_invdyn.set_options(trajectoryqddname="../resultsR/RK4_qdd.res")
mbs_invdyn.set_options(t0=1.0, tf=2.0, dt=2.5e-3)
mbs_invdyn.run()
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment