Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python Kinematic Version #1

Draft
wants to merge 25 commits into
base: main
Choose a base branch
from
Draft

Python Kinematic Version #1

wants to merge 25 commits into from

Conversation

filipe-varela
Copy link
Owner

The goal of this PR is to get in the main the Kinematic version and functionalities up and running.

filipe-varela and others added 25 commits August 3, 2022 10:55
For starters, the DHC table is made inside a function in the dhc/table.py module, with output as the table itself - as Robot - and the q's symbolic variables in an array (in this case, the array is in form q = (q1, q2, q3, q4, q5, q6, q7)). This table, however, is only made for kinematic porpuses, since afterwards it will be necessary to generate one table to the dynamic's part, which will derive from this one while adding new columns to the equation.

The goal for now is to output the Direct Kinematic Rotation Matrix and the end-effector position. Afterwards, it'll be necessary to verify how to get a behavior similar to the SIMULINK one. Maybe testing with simupy or get a different approach to the problem, where the block representation isn't going to be necessary, but another representation may be more efficient.
The Direct Kinematic matrix T is now outputed by a function dkin which accepts a 5-by-n Robot matrix with the columns being: d, v, a, alpha and offset (any additional column is ignored). Besides of computing this matrix, it's also simplified before being returned, so it doesn't effect any future computations.
This implementation enables in the project the different components validation, proving it that the scripts and modules developed up until some time works and outputs the expected outputs. Besides that, this checks that the future improvements in the project don't broke the already written code, making this a future proof addition.
This commit is for testing the CI added to the main branch
The DHC table was modified due of representing errors in its formulation and it was added two more tests as requested in the project formulation. These tests checks if the end-effector position and orientation corresponds to a known position - where in this case, it's the arm positioned in the vertical configuration, being the pe only in the z-axis (pe=[0,0,1.2]) and its orientation is just a 90º degree angle rotation in the z-axis of the base frame (R=[0,-1,0;1,0,0;0,0,1]).
The test checks if the Geometric Jacobian is well built for the example in the project proposal. There still missing the validation propused in the project propusal as well.
As it seems, maybe the simplification was modifying the matrices in a way that they were different than what was expected.
The symengine adds an improvement in terms of speed in simplifying the expressions. Because of this, the unittests were modified to take less time and be more effiecient.
The folder structure is now more similar to a package structure, since
this allows the project to be installed locally and make the import in
tests and reports a more doable process than making a relative path to
import or the commands to run the tests be more concise and less
confused.

As it goes for the structure itself, the structure has its base on the
`/rman/` directory, followed by three sub-packages: `/dhc/`, `/kinematic/` and
`/dynamic/`. In these, the different modules will be developed to enable
the control of the entire robotic arm. For now, only the dhc and kinematic
sub-packages are in development, with direct already concluded and
differential in the testing process.
Finally, the python project is a package where it can be installed, so
the imports in everywhere else in the code doesn't broke while try to
running.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant