Package: micropsi-integration-sdk
Micropsi Industries Integration SDKPackage for implementing and testing robots to be integrated with Mirai.
A brief introduction and command reference can be found here.For more detailed documentation, seeinstructions.mdFor Skill API reference, seeskill_api.mdSections:InstallationPython interfaces moduleExamplesMirai sandboxMirai dev serverMirai dev clientInstallationPackage can be installed bygitclonegit@github.com:micropsi-industries/micropsi-integration-sdk.gitcd./micropsi-integration-sdk
pip3install.Python interfaces moduleIn themicropsi_integration_sdkpython module can be found abstract interfaces declaring the
methods that must be implemented for successful control of each supported robot type.ExamplesIn the examples folder can be found toy examples of each robot implementation. These respond to the
sandbox and dev server tools and simulate simple robot motion, but do not communicate with real
hardware.
They can be used as a starting point when developing a new robot implementation.Mirai sandboxStandalone tool to test the SDK-based Robot control implementation.
Moves the robot and verifies the implementation of methods described in Robot SDK. In particular
the implementation of the high-frequency control loop.
The direction (x, y or z axis) and length of the test movement can be configured.usage:mirai-sandbox[-h][-mMODEL][-slSPEED_LINEAR][-saSPEED_ANGULAR][-dDIMENSION][-lLENGTH][-ipIP_ADDRESS][-tlTOLERANCE_LINEAR][-taTOLERANCE_ANGULAR][-v]path

MicropsiIndustriesRobotSDKTool

positionalarguments:pathPathtotherobotimplementation

optionalarguments:-h,--helpshowthishelpmessageandexit-mMODEL,--modelMODELNameoftherobotmodelasdefinedintheimplementation.-slSPEED_LINEAR,--speed-linearSPEED_LINEARLinearend-effectorspeed,meterspersecond.Default:0.05,Max:0.1-saSPEED_ANGULAR,--speed-angularSPEED_ANGULARAngularend-effectorspeed,radianspersecond.Default:0.2617993877991494,Max:0.6981317007977318-dDIMENSION,--dimensionDIMENSIONNumberofaxestomovetherobotin.Default:1-lLENGTH,--lengthLENGTHLengthoftestmovement,meters.Default:0.05,Max:0.1m-ipIP_ADDRESS,--ip-addressIP_ADDRESSIPaddressoftherobot.Default:192.168.100.100-tlTOLERANCE_LINEAR,--tolerance-linearTOLERANCE_LINEARLineartoleranceoftheend-effectorpositionachievedbyrobot.Default:0.001meters-taTOLERANCE_ANGULAR,--tolerance-angularTOLERANCE_ANGULARAngulartoleranceoftheend-effectorpositionachievedbyrobot.Default:0.01radians-v,--verboseEnabledebuglogging.

Usageexample:mirai-sandbox./examples/cartesian_velocity_robot.pyMirai dev serverThis tool simulates a mirai controller in certain (very simplified) ways.
Once started, it listens on port 6599 for the commands sent by either your PLC or robot program,
or themirai-dev-clienttool.
It accepts commands as documented in the binary skill api.CAUTIONWhen it receives theExecuteSkillcommand, this tool will attempt to communicate with a robot
at the configured address, and will run through an approximation of a full skill execution.
If your sdk robot has been properly implemented, this should produce only miniscule motion, however
this cannot be guaranteed.
It is strongly recommended that you first test this in simulation before attempting to interface
with real hardware.usage:mirai-dev-server[-h]--robot-fileROBOT_FILE[--robot-addressROBOT_ADDRESS][--server-addressSERVER_ADDRESS][--always-fail][--keepaliveKEEPALIVE]optionalarguments:-h,--helpshowthishelpmessageandexit--robot-fileROBOT_FILEFilewherethesdkrobotimplementationcanbeloaded.eg:'./examples/cartesian_velocity_robot.py'(default:None)--robot-addressROBOT_ADDRESSAddresswherethemiraidevservercanexpecttofindtherobot,formotionstreaming.(default:localhost)--server-addressSERVER_ADDRESSAddressthatthemiraidevservershouldlistenon.(default:0.0.0.0)--always-failCausethedevservertorespondtoeveryrequestwithafailuremessage.(default:False)--keepaliveKEEPALIVEKeepidleclientconnectionsforKEEPALIVEsecondsbeforedropping.(default:60)Usageexample:# mirai-dev-server --robot-file examples/cartesian_velocity_robot.pyMirai dev clientThis tool functions as an example client. It can be used as an initial smoke-test to confirm the
functionality of themirai-dev-servertool, including that of theExecuteSkillcommand.
Your goal as an integrator is to replicate the behaviour of this client tool in your own robot
or PLC program.CAUTIONWhen it receives theExecuteSkillcommand, the dev server will attempt to communicate with a
robot at the configured address, and will run through an approximation of a full skill execution.
If your sdk robot has been properly implemented, this should not produce any motion. It is strongly
recommended that you first test this in simulation before attempting to control real hardware.usage:mirai-dev-client[-h][--server-addressSERVER_ADDRESS][--countCOUNT][--periodPERIOD][--api-version{1,2}]{GetBoxMetadata,GetTrainedSkills,ExecuteSkill,PrepareSkillAsync,GetResult,GetLastEndstateValues,GetExceptionMessage,KeepAlive}positionalarguments:{GetBoxMetadata,GetTrainedSkills,ExecuteSkill,PrepareSkillAsync,GetResult,GetLastEndstateValues,GetExceptionMessage,KeepAlive}optionalarguments:-h,--helpshowthishelpmessageandexit--server-addressSERVER_ADDRESSHostnameorIPaddresswherethemiraidevserverisrunning.(default:localhost)--countCOUNTSendthecommandCOUNTtimes,reusingtheconnection.(default:1)--periodPERIODWaitPERIODsecondsbetweensentmessages.(default:1)--api-version{1,2}Formatmessagesforthegivenmiraibinaryapiversion.(default:1)Usageexample:# mirai-dev-client GetBoxMetadata