Package: cubituskinematics
Cubitus Kinematics PackageThis is the custom made package for Cubitus Robotic Arm. This package includes matplotlib plotting as well as realtime data sending to the robotic arm itself.InstallationRun the following to install the package :$pipinstallcubituskinematicsUsageFirst of all, you need to import cubituskinematics package/library into your project's python file.importcubituskinematicsasck# or you could also use (but not recommended):fromcubituskinematicsimport*Next you can test this package using simple commands as shown below :Point# moves to one certain point in 3D spaceck.move_to_point(210,0,170)NOTE: if you want to know more about a function, hover on its name to reveal more informationLine# declare two points (each as a list)A=[200,0,120]B=[200,0,260]# performs a line movementck.perform_line(A,B,sampling=10,repeat=1)# use 'sampling' and 'repeat' arguments to determine sampling and number of repetitionsCircle# declare three points (each as a list)A=[150,0,200]B=[185,-80,190]C=[210,30,150]# performs a circle movementck.perform_circle(A,B,C,sampling=10,repeat=1)# use 'sampling' and 'repeat' arguments to determine sampling and number of repetitionsParabola# define vertex point (defined as XZ relation, so it's a 2D point)V=[160,170]# performs a parabolic movementck.perform_parabola(0.06,40,V,sampling=10,repeat=1)# use 'sampling' and 'repeat' arguments to determine sampling and number of repetitionsBezier curve# declare three points (each as a list)A=[230,0,140]B=[280,20,280]C=[240,50,150]# performs a bezier curve movementck.perform_bezier(A,B,C,sampling=10,repeat=1)# use 'sampling' and 'repeat' arguments to determine sampling and number of repetitionsCustom XML fileTo use a custom-made .xml file you'll need to load it into the system like so :Note that your .xml fileMUSTbe in the same folder as your .py script, otherwise fails to proceed !# declare a name of your .xml filexml_name="manipulator.xml"# or you can use just "manipulator"# it is very important to have __file__ as a first argument as it indicates relative file path to your .xml fileck.load_xml(__file__,xml_name)Simple User Interface TerminalIf you want to use user interface use one simple command as shown below :# opens user interface which acts like a simple command line terminalck.run_ui()UsageAfter the command (shown above) is executed, the terminal should look like this.+------------- CUBITUS ROBOTIC ARM -------------+|                 TUKE FEI KKUI                 |+------------- USER INTERFACE v1.4 -------------+Enter 'help' to show list of all comands.When you type 'help' as show below>> helpthe list of all possible commands appears on the screen. Each of these commands can be used to interface with the robotic arm itself via command line terminal :>> help         Shows all commands.>> loadxml      Loads user defined XML into system. (needs external command)>> fold         Folds the arm to its initial position.>> default      Sets the arm to its default (kinematic) pose.>> grip         Sets gripper state to *hold* position. (default)>> ungrip       Sets gripper state to *open* position.>> eefangle     Sets end effector angle (X Y Z angles).>> perform      Perform a specific movement based on input.>> equation     Perform a custom curve based on input.>> about        Show application info.>> reset        Reset application.>> clear        Clear terminal.>> exit         Exit interface.CHANGELOGAll notable changes to this project will be documented here.[0.1.0] - 04/07/2021DescriptionMore minor improvements in codeFixed default pose plotting ( a bug inForwardKinematics.Plot()function )In filecubitus.xmlkinematic part label 'joint' was renamed to 'part'[0.0.9] - 03/26/2021DescriptionSome minor improvements in codeFixed command 'clear' inrun_ui()function ( bad lambda function syntax )Fixed raising UnreachablePositionError under certain conditions ( fixing bug in version 0.0.8 )[0.0.8] - 03/19/2021DescriptionFixedcubitus.xmlfile ( has incorrect translation values or in wrong order )Fixed 'point' shape ( has incorrectly set end effector angles for IK to calculate )Fixed 'grip' and 'ungrip' commands inrun_ui()functionAdded new 'default' option inrun_ui()user interfaceSome minor improvements inKinematics.py( less number of iterations inInverseKinematics.Calculate()function )[0.0.7] - 02/14/2021DescriptionAddedfold_arm()function to fold the arm to its initial (starting) positionInrun_ui()mode if 'reset' is typed into terminal it also executes newfold_arm()function mentioned aboveFixed some bugs inrun_ui()function ( eg. not properly functional 'point' argument in 'perform' )Fixed raising UnreachablePositionError when performing 'circle' ( end effector angles are now computed correctly )[0.0.6] - 02/06/2021DescriptionRemoved special character which contained all 'bezier' strings because of markdown text encoding problemImprovedset_end_effector()functionAdded CHANGELOG at the end ofMARKDOWN.mdFixed non-functional parabola exampleFixed non-functional bezier exampleFixedPerformParabola()function inCore.py[0.0.5] - 02/05/2021DescriptionMore of major code changes for better functionalityBetter UI ( more options, better user-asking algorithm, prettier 'about' strings )Added examples for each 'shape' ( the user now sees this examples in terminal )Major changes inREADME.md( enriched by more examples )Modifiedload_xml()function ( fixed .xml file loading problem )[0.0.4] - 02/02/2021DescriptionBugfix release of this package ( added 'pyserial' into 'install_requires' args insetup.py)Some minor code changes for better functionality[0.0.3] - 02/02/2021DescriptionBugfix of previous release (0.0.2) of this package ( fixed module dependencies ) - now fully functional[0.0.2] - 02/01/2021DescriptionBugfix release of this package ( fixed module dependencies )[0.0.1] - 02/01/2021DescriptionFirst release of this package ( no minor/major changes made yet )