Package: arcor2
arcor2ChangelogThe format is based onKeep a Changelog,[1.2.0] - 2024-01-26Addedsave_type_defhelper function.[1.1.0] - 2023-07-20AddedFew new helper functions.ChangedObject pose is now not set using a property setter but using theset_posemethod.[1.0.0] - 2023-02-14ChangedUpdated dependencies.Compatibility with the Project service 1.0.0.Meshdataclass:data_idchanged toasset_id.Updated client (some paths were changed).AddedMethodstartfrom the Scene service client now allows to specify a timeout.[0.26.0] - 2022-12-12ChangedOptional propertyend_effector_idadded toProjectRobotJoints.[0.25.0] - 2022-10-28ChangedSwitched to Python 3.10, updated dependencies.Removed unusedchildrenproperty fromSceneObject.Removed unused assets-related functions from Project service client.[0.24.2] - 2022-08-29ChangedREST client updated, so it is possible to specify a filename when, e.g., uploading a file to the Project service.[0.24.1] - 2022-08-17ChangedTarget REST endpoints forarcor2.clients.scene_serviceupdated to match new API convention./collisions/{model_type}/{model_id}changed to/collisions/{model_type},model_idmoved to request
parameters as{model_type}Id./transforms/{transform_id}/local-posechanged to/transforms/{transform_id}/pose/local./transforms/{transform_id}/world-posechanged to/transforms/{transform_id}/pose/world.[0.24.0] - 2022-07-08ChangedBREAKING:data.common.WebApiErroris now JSON based exception.Propertyerrorswas removed.New propertiestype,descriptionand optionalcontent.BREAKING:flask.FlaskExceptionclass updated.FlaskExceptiondoes no longer accept message and error code, but onlymessageand optionalcontext.Newserviceanddescriptionproperties should be overridden by subclasses.Exception instances are now convertible to JSON.BREAKING: Flask API error handlers return 500 error code for any error.WebApiErrorJSON object is supplied in response body.BREAKING:rest.WebApiException,rest.RestHttpExceptionclass gone.WebApiErrorandRestExceptionare raised instead. No HTTP code is supplied as the only possible error code is 500.BREAKING:scene_serviceclient changed.world_posenow call.../world-poseinstead of.../worldPose.local_posenow call.../local-poseinstead of.../localPose.line_checknow call.../line-safeinstead of.../lineSafe.upsert_collisionmodel id moved from query parameters to path.AddedNewWebApiErrorFactoryclass was implemented to generate service specificWebApiErrorschemas for swagger documentation.flask.run_appnow accept optionaldependenciesargument.[0.23.1] - 2022-02-17AddedSimple collision checking.Related dataclasses were added.New function inscene_serviceclient.[0.23.0] - 2022-01-25ChangedBREAKING:ActionStateBeforeevent updated.Propertiesaction_idandparametersare now optional.New optional propertyaction_point_ids.Switched to Python 3.9, updated dependencies.[0.22.0] - 2021-10-25ChangedNew abstract base classVirtualCollisionObject.Meant as a base for 'dumb' collision objects, with primitive models, without any functionality, e.g. for safety 'walls' around the cell.ActionMetadataupdated.Removed useless properties (blocking,blackbox).Added a new propertyhidden(UIs shall silently ignore those actions).Dropped support forRelativePoseaction parameter type.Handle all errors when importing stuff (import_type_def).This is needed for instance in case of obsolete ObjectTypes....when e.g. parameters ofActionMetadatawere changed.Otherwise outdated OT might raiseTypeErroror similar exceptions.New (optional) properties added toBareActionPoint(compatibility with Project service 0.14.0 or newer).AddedFlowActionsObjectType, providingis_first_passaction which is useful to perform the initialization step.FixedAction point transformations (reparenting).When AP1 fromobject -> AP1 -> AP2was made global, AP2 was not updated properly.When AP1 was made relative again, AP2 was again not updated.[0.21.0] - 2021-09-07ChangedAddedRobotspecific exceptionKinematicsException.So far used to give more precise error messages.ProjectParameternow derives fromParameter.CachedScenenow caches ObjectTypes used in a scene.Logs are now colored.Projectnow has optionalproject_objects_idsproperty (not used at the moment).FixedMake sure thatPosecontain only floats.When any value is e.g. np.float64,orjsoncomplains.Because of this,to_dictmethods ofPositionandOrientationare overridden.Typo in URL withinget_modelsofproject_serviceclient.Missing sleep inwait_forofscene_serviceclient.[0.20.0] - 2021-08-05ChangedObject hierarchy modified.GenericWithPosenow can't have a collision model.A newCollisionObjectmust have collision model.Robotbase class API changed.Parameterlinearwas added tomove_to_pose.A robot not supporting linear movements should raise exception whenlinear==True.Parameterinclude_gripperwas added torobot_joints.By default, the method should return only arm's joints.With the parameter set, the list should contain also gripper joints.This is needed for visualization of grippers.Makes only sense (so far) when gripper is part of URDF.Scene/Project clients now log underlying error messages.Fixedrestmodule now encodes body data as utf-8.[0.19.0] - 2021-07-29ChangedSupport for multi arm robots.New base classMultiArmRobot.Its methods have an additionalarm_idparameter.There is a method to get arm IDs.Relevant ARServer RPCs were extended witharm_id.ProjectRobotJointsmodel now also containsarm_id.There isDummyMultiArmRobotObjectType for testing purposes.CachedProject:constantsrenamed toparameters.Generic:INIT_PRIORITYremoved as useless.GenericWithPose: do not delete collision models incleanup.Collision models are removed by the Scene service onstop.Usage oforjsoninarcor2/jsonand for dataclasses.40% speedup for serialization.80% speedup for deserialization.Tested onProjectdataclass.Compatibility with Project service 0.10.0.Compatibility with Scene service 0.5.0.Uploading of meshes associated to ObjectTypes.Parameterfile_to_uploadwas added toupload_def.FixedCorrect default port for Project service (10000).[0.18.0] - 2021-06-14ChangedModulespackageandresourcesmoved toarcor2_execution_data.[0.17.0] - 2021-06-11ChangedProject service client updated to API version 0.8.0.ARCOR2_PERSISTENT_STORAGE_URLrenamed toARCOR2_PROJECT_SERVICE_URL.Dependencies updated.[0.16.0] - 2021-05-21ChangedObjects initialization order (Resources):Object initialization order can be set using class-levelINIT_PRIORITYvariable.The higher priority, the sooner are objects of that type initialized.Objects are initialized serially.CachedProjecthas new methods to deal with hierarchy (get_by_id,get_parent_id,childs).Project service client updated to be compatible with version 0.7.0.Added a customjsonmodule.Wraps the standard json module, so it might be easier to replace it in the future.Provides type annotations.Raises a custom exception based onArcor2Exception.FixedHandling of context manager arguments inResources.[0.15.0] - 2021-04-20ChangedREST client now handles all codes >= 400 as errors.[0.14.1] - 2021-04-19FixedSave and import of ObjectType was randomly failing because ofrace condition.[0.14.0] - 2021-03-30ChangedImproved code for transforming poses.Use monkey patching instead of custom released version of dataclasses_jsonschema.Switched to builtin ast module instead of horast - much faster builds, etc.Added statesStoppingandPausingtoPackageState.Data.StateEnum.This is because it may take some time to pause or stop a package.Other operations (as e.g. resume) are almost instant.FixedResourcesare now not sendingKeyboardInterruptas event.import_type_defnow provides better error messages when import fails.Save and import of ObjectType was randomly failing.[0.13.0] - 2021-03-15ChangedIDs (uuid) are now generated within the respective classes.If necessary, ID can be still provided from outside as before.IDs are prefixed so developers can easily check type of an object from its ID.Prefix always start with a character.FixedComposite actions are now properly handled by the@actiondecorator.[0.12.1] - 2021-03-08FixedPoseparameter plugin fixed to generate correct code in a case when action on action point A uses orientation from action point B.[0.12.0] - 2021-03-03FixedParameter plugins now return copy of the parameter in order to prevent changes in the project if the value is modified e.g. within an action.Methodupdate_project_sourcesof the Project service client was fixed.ChangedFlask-based apps now don't log each API call by default.It can be turned on by settingARCOR2_REST_API_DEBUG.Therestmodule has a new exception type RestHttpException for getting HTTP error codes.is_valid_identifiernow behaves the same asis_valid_type, it does not insist on convention (PascalCase vs snake_case) and provides concrete error messages.RobotAPI now hassafeparameter.Robotnow has API for hand teaching mode.Line length of generated code changed from 80 to 120.[0.11.1] - 2021-02-09Fixed@actiondecorator fixed.KeyErrorwas raised whenanparameter was not given to an action.This only happened in the "manual" script writing scenario and whenpatch_object_actionswas used.[0.11.0] - 2021-02-08ChangedExplicit action parameters.Resourcesclass now do not need to deal with parameters.Update of ObjectTypes (all actions now have the mandatoryanparameter).CurrentActionremoved,ActionStatedivided intoActionStateBeforeandActionStateAfter.New module with shared code for Flask-based apps.Updates of 3rd party dependencies.WS server now logs too long RPCs.Max. duration could be configured usingARCOR2_MAX_RPC_DURATION.FixedAt a startup, the main script now checks if the scene is running before attempt to stop it.image_from_strfunction fixed.[0.10.0] - 2020-12-14Changedactiondecorator now handles outputs of actions.CachedProjecthas new methods for handling project logic.ActionStateevent now contains action results.New built-in ObjectTypesRandomActions.Parameter plugins slightly reworked, some new helper functions.If a robot has URDF, it is zipped and uploaded to the Project service)....as a mesh file, which is workaround for missing storage of URDF models.Scene service client updated to support version 0.4.0.New built-in abstract ObjectTypeCamera.Initial support for loading of URDF files.Some first tests for parameter plugins were added.[0.9.2] - 2020-10-30Fixedparsefunction now also catchesValueErrorexception.check_object_typenow tries to parse whole module instead of just source of the class itself.ChangedRobotbase class now have methods for IK/FK.It is possible to use==onPositioninstances.[0.9.1] - 2020-10-19Fixedpackage_version was ignoringpackageargument[0.9.0] - 2020-10-16ChangedScene client updated for Scene 0.3.0.Exceptions refactored (BREAKING).Arcor2Exception no longer hasmessagepropertyThere is a new package arcor2/exceptions.Clients usinghandledecorator now have specific error messages defined.Previously generated execution packages will become broken asprint_exceptionfunction was movedLoggers are now created using functions fromloggingmodule.restmodule rewritten (BREAKING).Now there is only one methodcallwhich takes http method as an argument.There isARCOR2_REST_DEBUGenvironment variable. When set, debugging logs are turned on.FixedJSON containing only boolean value was not handled properly byarcor2.restmodule.[0.8.0] - 2020-09-24ChangedReorganisation of the repository - switched to monorepo based onPants. The code was divided into more packages (that can be separatelly relased) within one repository.Tests now run on GitHub instead of CircleCi.Unification of objects and servicesThere isGenericbase class for objects without pose,GenericWithPosefor objects with pose andRobotclass that should be base class for every robot.Integration of scene service (0.2.0).@action decorator is now added automatically in the run-time.Orientationdataclass now performs quaternion normalization in__post_init__.Robotbase class now has_move_lockmutex to ensure that only one move-action is called at the time.[0.8.0rc2] - 2020-09-16[0.8.0rc1] - 2020-09-15[0.8.0b8] - 2020-08-21FixedSome robot-related issues fixed[0.8.0b7] - 2020-08-12ChangedScene service client: 'upsert_collision' now has optional 'mesh_parameters': parameter.[0.8.0b6] - 2020-08-03ChangedNew logic representationUnification of objects and servicesIntegration of scene service[0.7.1] - 2020-07-15FixedFix of broken python package arcor2 0.7.0[0.7.0] - 2020-07-15ChangedARServer: new RPC 'TemporaryPackage'ARServer: RPC ObjectTypesChangedEvent renamed to ChangedObjectTypesEvent, now contains changed ObjectTypes meta instead of just type namesARServer: ShowMainScreenEvent.Package name added to PackageInfoEventARServer now compares its API_VERSION with API_VERSION of the Execution.ARServer: ShowMainScreenEvent will now not contain 'highlight' when sent to a newly connected UI.AP can now have another AP as parentrest: OptionalData now may contain list of primitive type.Execution: PackageStateEvent now contains package_idExecution: added 'executed' to PackageMeta[0.6.0] - 2020-06-19ChangedBuild/Execution proxy: allow port change using env. var.ARServer: RenameScene RPC now checks if scene name is unique and 'dry_run' works.ARServer: ListScenes/ListProjects now contain 'modified'.ARServer: DeleteObjectType RPC added.@action decorator is now compatible with Windows.Service class now has 'cleanup' method which is called when scene is closed or when script ends. Call of 'cleanup' can be disabled by 'export ARCOR_CLEANUP_SERVICES=False' - this is particularly useful when running the script manually again and again.Cleanup method for ObjectTypes.[0.5.1] - 2020-06-04Fixedignoring check of return parametersallowing list of strings as request body[0.5.0] - 2020-06-01ChangedARServer container need to setup new env variable using docker-compose -> ARCOR2_DATA_PATH=/root/dataListProjects RPC now gets projects in parallel.dry_run parameter for selected RPCsEEF pose/robot joints streamingOpenScene, OpenProject, SceneClosed, ProjectClosed events.Execution proxy: use persistent websocket connection.SceneCollisionsEvent merged into PackageInfoEventARServer: RPC to cancel action execution.Execution package now contains package.json with its metadata. Execution service now supports renaming of packages.[0.4.3] - 2020-05-22Changedadded support for CORS[0.4.2] - 2020-04-27FixedFix of functions to transform relative poses to absolute and vice versa[0.4.1] - 2020-04-22AddedNew RPCs for getting robot joints and effector poseNew RPC to get IDs of EE and suctionsAdded pivot enum for UpdateObjectPoseUsingRobotFixedFix of remove action RPCAnother fixes[0.4.0] - 2020-04-17ChangedComplete redesign of RPC for ARClients (AREditor atm)Documentation of execution and build APISupport for project service 0.2.0New and updated eventsEnhanced error messagesCreate (global) session to enable reuse of connections.[0.3.0] - 2020-03-24ChangedRenamed RobotJoints to ProjectRobotJoints and ModelTypeEnum to Model3dTypeAdded new services for Time and Logic related actonsAdded boolean parameter pluginDescription, returns and origins fields marked as optionalNew event - ActionResultSeparated script enabling discovery through UDP broadcastSupport for list paramsServices and Action objects are now marked as disabled when some problem occured and error message is passed to GUI (previously such services/objects were ignored)Services with no configuration are disabled[0.2.1] - 2020-02-28FixedAdded compatibility with Project service v 0.1.1Param values and defaults are strings nowmin, max stored in extra as JSON string[0.2.0] - 2020-02-20ChangedExecuteAction RPC.Uuid for action object/point/action.Execution proxy PUT methodActionPoint class in execution packageRemoved loop in main script, when hasLogic == falseParameter values not send in currentAction eventProjectState RESUMED removedExecution: print out script output if not JSON.Joint: rotation -> value[0.1.7] - 2019-12-24FixedBuild: disable caching[0.1.5] - 2019-12-22FixedParameter plugins[0.1.4] - 2019-12-18FixedParameter of type relative_pose now accepts json string as value[0.1.3] - 2019-12-18FixedN/A[0.1.2] - 2019-12-17Fixedbump docker version[0.1.1] - 2019-12-17Fixedbump docker version[0.1.1] - 2019-12-12FixedN/A[0.1.0] - 2019-12-12ChangedSeparation of services.