{"id":17321989,"url":"https://github.com/petercorke/spatialmath-matlab","last_synced_at":"2025-04-09T09:10:59.424Z","repository":{"id":46226602,"uuid":"158987032","full_name":"petercorke/spatialmath-matlab","owner":"petercorke","description":"Create,  manipulate and convert representations of position and orientation in 2D or 3D using Python","archived":false,"fork":false,"pushed_at":"2024-02-27T21:05:58.000Z","size":16924,"stargazers_count":207,"open_issues_count":11,"forks_count":67,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-02T02:23:00.158Z","etag":null,"topics":["2d","3d","animation","euler-angles","graphics","math","matlab-toolbox","quaternion","robot","roll-pitch-yaw-angles","transform"],"latest_commit_sha":null,"homepage":"","language":"MATLAB","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/petercorke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-25T01:13:00.000Z","updated_at":"2025-03-27T16:52:43.000Z","dependencies_parsed_at":"2024-10-31T19:05:50.029Z","dependency_job_id":"9d83e341-203e-4a45-8c2f-86400232ea66","html_url":"https://github.com/petercorke/spatialmath-matlab","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petercorke%2Fspatialmath-matlab","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petercorke%2Fspatialmath-matlab/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petercorke%2Fspatialmath-matlab/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petercorke%2Fspatialmath-matlab/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petercorke","download_url":"https://codeload.github.com/petercorke/spatialmath-matlab/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248008630,"owners_count":21032556,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["2d","3d","animation","euler-angles","graphics","math","matlab-toolbox","quaternion","robot","roll-pitch-yaw-angles","transform"],"created_at":"2024-10-15T13:40:34.675Z","updated_at":"2025-04-09T09:10:59.404Z","avatar_url":"https://github.com/petercorke.png","language":"MATLAB","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![View Spatial Math Toolbox on File Exchange](https://www.mathworks.com/matlabcentral/images/matlab-file-exchange.svg)](https://www.mathworks.com/matlabcentral/fileexchange/70373-spatial-math-toolbox)\n[![Build Status](https://travis-ci.com/petercorke/spatialmath-matlab.svg?branch=master)](https://travis-ci.com/petercorke/spatial-math)\n![Coverage](https://codecov.io/gh/petercorke/spatial-math/branch/master/graph/badge.svg)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/petercorke/spatialmath-matlab/graphs/commit-activity)\n[![GitHub stars](https://img.shields.io/github/stars/petercorke/spatialmath-matlab.svg?style=social\u0026label=Star\u0026maxAge=2592000)](https://GitHub.com/petercorke/robotics-toolbox-matlab/stargazers/)\n \n# Spatial Math Toolbox for MATLAB\u0026reg;\n\n## Synopsis\n\nThis Toolbox contains functions and classes to represent orientation and pose in 2D and 3D (SO(2), SE(2), SO(3), SE(3)) as orthogonal and homogeneous transformation matrices, unit quaternions, twists, triple angles, and matrix exponentials. The Toolbox also provides functions for manipulating these datatypes, converting between them, composing them, graphically displaying them, and transforming points and velocities.\n\nMuch of this Toolbox functionality was previously in the [Robotics Toolbox for MATLAB](https://github.com/petercorke/robotics-toolbox-matlab).\n\nAdvantages of the Toolbox are that:\n\n  * the code is mature and provides a point of comparison for other implementations of the same algorithms;\n  * the routines are generally written in a straightforward manner which allows for easy understanding, perhaps at the expense of computational efficiency. If you feel strongly about computational efficiency then you can always rewrite the function to be more efficient, compile the M-file using the MATLAB compiler, or create a MEX version;\n  * source code is available for the benefit for understanding and teaching.\n\nThere is now a Python version of this Toolbox on [GitHub](https://github.com/petercorke/spatialmath-python) and [PyPI](https://pypi.org/project/spatialmath-python).\n  \n## Manual\n\nComprehensive detail of all functions is provided in the [PDF-format manual (~200 pages)](https://github.com/petercorke/spatialmath-matlab/releases/download/untagged-a2f9c8b2bd21cca9fe39/spatialmath.pdf).\n\n## Installation\n\nFrom the MATLAB toolstrip Home\u003eAdd-Ons\u003eGet Add-Ons will bring up the Add-On Explorer.  Enter \"spatial math\" into the search box, select the first entry and then click \"Add from GitHub\".  The Toolbox will be downloaded and added to your path.\n\n\n\n## Code Example\n\n```matlab\n\u003e\u003e R = rotx(0.2)  % SO(3) rotation matrix\nR =\n    1.0000         0         0\n         0    0.9801   -0.1987\n         0    0.1987    0.9801\n```\n\nwhich we could animate simply as\n```matlab\n\u003e\u003e tranimate(R)\n```\n\n![animation from tranimate()](doc/figs/tranimate.gif)\n\nConvert roll-pitch-yaw angles to a unit quaternion\n```matlab\n\u003e\u003e R = rpy2r(10, 20, 30, 'deg')\nR =\n    0.8138   -0.4410    0.3785\n    0.4698    0.8826    0.0180\n   -0.3420    0.1632    0.9254\n```\nwhich uses the ZYX convention by default, ie. this is a rotation by the yaw angle (30 deg) about the Z-axis, followed by a rotation by the pitch angle (20 deg) about the Y-axis, followed by a rotation by the roll angle (10 deg) about the X-axis.  We can convert this to a unit quaternion\n```matlab\n\u003e\u003e q = UnitQuaternion(R)\nq = \n0.95155 \u003c 0.038135, 0.18931, 0.2393 \u003e\n```\nor create the unit quaternion directly using a variant constructor\n```matlab\n\u003e\u003e q2 = UnitQuaternion.rpy(10, 20, 30, 'deg')\nq2 = \n0.95155 \u003c 0.038135, 0.18931, 0.2393 \u003e\n```\n\n## What's new\n\n* Continuous integration using [Travis CI](https://travis-ci.com/petercorke/spatial-math) and [codecov](https://codecov.io/gh/petercorke/spatial-math)\n* Support for spatial vector notation (Featherstone's 6D vectors)\n* `prod()` method for all `RTBPose` subclasses and `Twist`\n* Factored out of the [Robotics Toolbox for MATLAB](https://github.com/petercorke/robotics-toolbox-matlab).  RTB now contains only robotics specific code, eg. for manipulator arms and mobile robots.\n\n## Online resources:\n\n* [Tutorial style exampes](https://github.com/petercorke/spatial-math/wiki)\n* [Home page](http://www.petercorke.com)\n* [Robotics, Vision \u0026 Control (book)](http://petercorke.com/wordpress/rvc)\n* [Discussion group](http://groups.google.com/group/robotics-tool-box?hl=en)\n\nPlease email bug reports, comments or code contribtions to me at rvc@petercorke.com\n\n## Octave\n\nThe functions, but not the classes, should work fine with Octave 5.x.\n\n## Contributors\n\nContributions welcome.  There's a user forum at [http://tiny.cc/rvcforum](http://tiny.cc/rvcforum) for this Toolbox and also\n[Robotics Toolbox for MATLAB](https://github.com/petercorke/robotics-toolbox-matlab).\n\n## License\n\nThis toolbox is released under MIT Licence.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetercorke%2Fspatialmath-matlab","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetercorke%2Fspatialmath-matlab","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetercorke%2Fspatialmath-matlab/lists"}