Commit 9cd202ff authored by Olivier Lantsoght's avatar Olivier Lantsoght
Browse files

[Ctypes] Issue #177, (9) Template Python files. User files are renamed...

[Ctypes] Issue #177, (9) Template Python files. User files are renamed following what is done in MBsysC.
parent 9e64119a
......@@ -140,6 +140,8 @@ robotran/
| |_ mbs_dirdyn.py
| |_ mbs_equil.py
| |_ mbs_modal.py
| |_ mbs_invdyn.py
| |_ mbs_solvekin.py
| |_ mbs_results.py
|
|_ examples/
......@@ -166,28 +168,29 @@ robotran/
| | |_ mbs_link_PRJ.py
| | |_ mbs_sensor_PRJ.py
| |_ user/
| |_ cons_hJ.py
| |_ cons_jdqd.py
| |_ derivatives.py
| |_ driven_joints.py
| |_ ext_forces.py
| |_ joint_forces.py
| |_ link3D_forces.py
| |_ link_forces.py
| |_ user_cons_hJ.py
| |_ user_cons_jdqd.py
| |_ user_Derivative.py
| |_ user_DrivenJoints.py
| |_ user_ExtForces.py
| |_ user_JointForces.py
| |_ user_Link3DForces.py
| |_ user_LinkForces.py
| |_ user_dirdyn.py
| |_ user_equil.py
| |_ user_modal.py
| |_ user_solvekin.py
| |_ user_modal.py (WIP)
| |_ user_solvekin.py (WIP)
```
## Unsing package
## Using package
### Generation and upload (test pip server)
```
python setup.py sdist bdist_wheel
python3 setup.py sdist bdist_wheel
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ --skip-existing dist/*
```
or use `python` instead of `python3`.
### Install (test pip server, or local)
```
python -m pip install --index-url https://test.pypi.org/simple/ --no-deps MBsysPy --user
......
......@@ -500,12 +500,12 @@ class MbsData(object):
at the end.
The loader user functions are :
- user_derivatives (from derivatives.py)
- user_DrivenJoints (from driven_joints.py)
- user_ExtForces (from ext_forces.py)
- user_JointForces (from joint_forces.py)
- user_LinkForces (from link_forces.py)
- user_Link3DForces (from link3D_forces.py)
- user_derivatives (from user_Derivative.py)
- user_DrivenJoints (from user_DrivenJoints.py)
- user_ExtForces (from user_ExtForces.py)
- user_JointForces (from user_JointForces.py)
- user_LinkForces (from user_LinkForces.py)
- user_Link3DForces (from user_Link3DForces.py)
Parameters
----------
......@@ -529,7 +529,7 @@ class MbsData(object):
self.user_path = user_path
# derivative
user_file = "derivatives.py"
user_file = "user_Derivative.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__ : print( "DEBUG>> file '"+user_file+"' not found in folder '"+os.path.dirname(path))
......@@ -538,7 +538,7 @@ class MbsData(object):
self.user_derivative = module.user_derivatives
# drivenJoints
user_file = "driven_joints.py"
user_file = "user_DrivenJoints.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__ : print( "DEBUG>> file '"+user_file+"' not found in folder '"+os.path.dirname(path))
......@@ -547,7 +547,7 @@ class MbsData(object):
self.user_DrivenJoints = module.user_DrivenJoints
# ext_forces
user_file = "ext_forces.py"
user_file = "user_ExtForces.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__ : print( "DEBUG>> file '"+user_file+"' not found in folder '"+os.path.dirname(path))
......@@ -556,7 +556,7 @@ class MbsData(object):
self.user_ExtForces = module.user_ExtForces
# joint_forces
user_file = "joint_forces.py"
user_file = "user_JointForces.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__ : print( "DEBUG>> file '"+user_file+"' not found in folder '"+os.path.dirname(path))
......@@ -565,7 +565,7 @@ class MbsData(object):
self.user_JointForces = module.user_JointForces
# link_forces
user_file = "link_forces.py"
user_file = "user_LinkForces.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__ : print( "DEBUG>> file '"+user_file+"' not found in folder '"+os.path.dirname(path))
......@@ -574,7 +574,7 @@ class MbsData(object):
self.user_LinkForces = module.user_LinkForces
# link3D_forces
user_file = "link3D_forces.py"
user_file = "user_Link3DForces.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__ : print( "DEBUG>> file '"+user_file+"' not found in folder '"+os.path.dirname(path))
......
......@@ -202,8 +202,8 @@ class MbsDirdyn(object):
and unassigned at the end.
The loader user functions are :
- user_cons_hJ (from cons_hJ.py)
- user_cons_jdqd (from cons_hJ.py)
- user_cons_hJ (from user_cons_hJ.py)
- user_cons_jdqd (from user_cons_jdqd.py)
- user_dirdyn_init (from user_dirdyn.py)
- user_dirdyn_loop (from user_dirdyn.py)
- user_dirdyn_finish (from user_dirdyn.py)
......@@ -218,7 +218,7 @@ class MbsDirdyn(object):
# cons_hJ
user_file = "cons_hJ.py"
user_file = "user_cons_hJ.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__ : print( "DEBUG>> file '"+user_file+"' not found in folder '"+os.path.dirname(path))
......@@ -227,7 +227,7 @@ class MbsDirdyn(object):
self.user_cons_hJ = module.user_cons_hJ
# cons_jdqd
user_file = "cons_jdqd.py"
user_file = "user_cons_jdqd.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__ : print( "DEBUG>> file '"+user_file+"' not found in folder '"+os.path.dirname(path))
......
......@@ -177,8 +177,8 @@ class MbsEquil(object):
and unassigned at the end.
The loader user functions are :
- user_cons_hJ (from cons_hJ.py)
- user_cons_jdqd (from cons_hJ.py)
- user_cons_hJ (from user_cons_hJ.py)
- user_cons_jdqd (from user_cons_jdqd.py)
- user_equil_init (from user_equil.py)
- user_equil_loop (from user_equil.py)
- user_equil_finish (from user_equil.py)
......@@ -188,7 +188,7 @@ class MbsEquil(object):
# cons_hJ
user_file = "cons_hJ.py"
user_file = "user_cons_hJ.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__ : print( "DEBUG>> file '"+user_file+"' not found in folder '"+os.path.dirname(path))
......@@ -197,7 +197,7 @@ class MbsEquil(object):
self.user_cons_hJ = module.user_cons_hJ
# cons_jdqd
user_file = "cons_jdqd.py"
user_file = "user_cons_jdqd.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__ : print( "DEBUG>> file '"+user_file+"' not found in folder '"+os.path.dirname(path))
......
......@@ -155,15 +155,15 @@ class MbsInvdyn(object):
and unassigned at the end.
The loader user functions are :
- user_cons_hJ (from cons_hJ.py)
- user_cons_jdqd (from cons_hJ.py)
- user_cons_hJ (from user_cons_hJ.py)
- user_cons_jdqd (from user_cons_jdqd.py)
"""
template_path = os.path.join(__MODULE_DIR__,'../templates/user')
# cons_hJ
user_file = "cons_hJ.py"
user_file = "user_cons_hJ.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__ : print( "DEBUG>> file '"+user_file+"' not found in folder '"+os.path.dirname(path))
......@@ -172,7 +172,7 @@ class MbsInvdyn(object):
self.user_cons_hJ = module.user_cons_hJ
# cons_jdqd
user_file = "cons_jdqd.py"
user_file = "user_cons_jdqd.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__ : print( "DEBUG>> file '"+user_file+"' not found in folder '"+os.path.dirname(path))
......
......@@ -138,15 +138,15 @@ class MbsModal(object):
and unassigned at the end.
The loader user functions are :
- user_cons_hJ (from cons_hJ.py)
- user_cons_jdqd (from cons_hJ.py)
- user_cons_hJ (from user_cons_hJ.py)
- user_cons_jdqd (from user_cons_jdqd.py)
"""
template_path = os.path.join(__MODULE_DIR__,'../templates/user')
# cons_hJ
user_file = "cons_hJ.py"
user_file = "user_cons_hJ.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__ : print( "DEBUG>> file '"+user_file+"' not found in folder '"+os.path.dirname(path))
......@@ -155,7 +155,7 @@ class MbsModal(object):
self.user_cons_hJ = module.user_cons_hJ
# cons_jdqd
user_file = "cons_jdqd.py"
user_file = "user_cons_jdqd.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__ : print( "DEBUG>> file '"+user_file+"' not found in folder '"+os.path.dirname(path))
......
......@@ -161,7 +161,7 @@ class MbsPart(object):
and unassigned at the end.
The loader user functions are :
- user_cons_hJ (from cons_hJ.py)
- user_cons_hJ (from user_cons_hJ.py)
Parameters
----------
......@@ -171,7 +171,7 @@ class MbsPart(object):
template_path = os.path.join(__MODULE_DIR__,'../templates/user')
# cons_hJ
user_file = "cons_hJ.py"
user_file = "user_cons_hJ.py"
path = os.path.abspath(os.path.join(user_path, user_file))
if not os.path.isfile(path):
if __DEBUG__ : print( "DEBUG>> file '"+user_file+"' not found in folder '"+os.path.dirname(path))
......
Markdown is supported
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