Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
robotran
mbsysc
Commits
440d58ed
Commit
440d58ed
authored
Jan 13, 2021
by
Simon Hinnekens
Browse files
Merge branch 'Doc_Py_Mooc' into 'dev'
Doc py mooc See merge request robotran/mbsysc!397
parents
c12d7589
aef7a9a1
Changes
2
Hide whitespace changes
Inline
Side-by-side
MBsysC/mbs_interface/MBsysPy/doc/pages/invdyn.rst
View file @
440d58ed
...
...
@@ -8,8 +8,8 @@ see `Robotran theoretical framework <http://robotran-doc.git-page.immc.ucl.ac.be
Code sample
-----------
For running the inverse dynamics, in
sert
the
following code in your main script
and adapt it to your need:
For running the inverse dynamics, in the
current configuration, insert the following
code in your main script
and adapt it to your need:
.. code-block:: python
...
...
@@ -18,6 +18,34 @@ and adapt it to your need:
mbs_invdyn.set_options(motion = "oneshot")
mbs_invdyn.run()
You can compute the inverse dynamics for a time-define trajectory by providing the
trajectory files as follow:
.. code-block:: python
# Set all driven joint as independent
mbs_data.set_qu(mbs_data.qc[1:].tolist())
mbs_data.process = 6
mbs_invdyn = MBsysPy.MbsInvdyn(mbs_data)
# Set the motion to be solved as a trajectory
mbs_invdyn.set_options(motion = "trajectory")
# Provide the trajectory files to use
mbs_invdyn.set_options(trajectoryqname = "../resultsR/inverse_kinematics_q.res",
trajectoryqdname = "../resultsR/inverse_kinematics_qd.res",
trajectoryqddname = "../resultsR/inverse_kinematics_qdd.res")
# Provide the time interval and time step to solve the inverse dynamics.
mbs_invdyn.set_options(t0 = 0.0, tf = 6.0, dt = 1e-3)
# The final time "tf' must be less than the last time of the trajectory files.
mbs_invdyn.run()
In all cases the analysis requires actuated joint, see next section to set them.
Use
---
...
...
MBsysC/mbs_interface/MBsysPy/doc/pages/solvekin.rst
View file @
440d58ed
...
...
@@ -8,8 +8,8 @@ framework <http://robotran-doc.git-page.immc.ucl.ac.be/RobotranBasic/Robotran_ba
Code sample
-----------
For running the kinematics analysis
, insert the following code in your main
script and adapt it to your need:
For running the kinematics analysis
while providing trajectory files, insert the
following code in your main
script and adapt it to your need:
.. code-block:: python
...
...
@@ -23,6 +23,27 @@ script and adapt it to your need:
)
mbs_solvekin.run()
You can compute the inverse kinematics by setting all independant joints as driven
joints and defining the trajectory in :py:func:`user_DrivenJoints.user_DrivenJoints()`. The code
to be inserted looks like:
.. code-block:: python
# Set all independant joint as driven joint
mbs_data.set_qdriven(mbs_data.qu[1:].tolist())
mbs_data.process = 5
mbs_solvekin = MBsysPy.MbsSolvekin(mbs_data)
# Set the motion to be solved as a trajectory
mbs_solvekin.set_options(motion = "trajectory")
# Provide the time interval and time step to solve the inverse kinematics.
mbs_solvekin.set_options(t0 = 0.0, tf = 6.0, dt = 1e-3)
mbs_solvekin.run()
Use
---
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment