spatialmath-matlab

Create, manipulate and convert representations of position and orientation in 2D or 3D using Python

https://github.com/petercorke/spatialmath-matlab

Science Score: 41.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    1 of 3 committers (33.3%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.6%) to scientific vocabulary

Keywords

2d 3d animation euler-angles graphics math matlab-toolbox quaternion robot roll-pitch-yaw-angles transform
Last synced: 6 months ago · JSON representation ·

Repository

Create, manipulate and convert representations of position and orientation in 2D or 3D using Python

Basic Info
  • Host: GitHub
  • Owner: petercorke
  • License: mit
  • Language: MATLAB
  • Default Branch: master
  • Homepage:
  • Size: 16.1 MB
Statistics
  • Stars: 211
  • Watchers: 7
  • Forks: 69
  • Open Issues: 11
  • Releases: 0
Topics
2d 3d animation euler-angles graphics math matlab-toolbox quaternion robot roll-pitch-yaw-angles transform
Created about 7 years ago · Last pushed almost 2 years ago
Metadata Files
Readme License Citation

README.md

View Spatial Math Toolbox on File Exchange Build Status Coverage License: MIT Maintenance GitHub stars

Spatial Math Toolbox for MATLAB®

Synopsis

This 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.

Much of this Toolbox functionality was previously in the Robotics Toolbox for MATLAB.

Advantages of the Toolbox are that:

  • the code is mature and provides a point of comparison for other implementations of the same algorithms;
  • 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;
  • source code is available for the benefit for understanding and teaching.

There is now a Python version of this Toolbox on GitHub and PyPI.

Manual

Comprehensive detail of all functions is provided in the PDF-format manual (~200 pages).

Installation

From the MATLAB toolstrip Home>Add-Ons>Get 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.

Code Example

```matlab

R = rotx(0.2) % SO(3) rotation matrix R = 1.0000 0 0 0 0.9801 -0.1987 0 0.1987 0.9801 ```

which we could animate simply as ```matlab

tranimate(R) ```

animation from tranimate()

Convert roll-pitch-yaw angles to a unit quaternion ```matlab

R = rpy2r(10, 20, 30, 'deg') R = 0.8138 -0.4410 0.3785 0.4698 0.8826 0.0180 -0.3420 0.1632 0.9254 which 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 matlab q = UnitQuaternion(R) q = 0.95155 < 0.038135, 0.18931, 0.2393 > or create the unit quaternion directly using a variant constructor matlab q2 = UnitQuaternion.rpy(10, 20, 30, 'deg') q2 = 0.95155 < 0.038135, 0.18931, 0.2393 > ```

What's new

  • Continuous integration using Travis CI and codecov
  • Support for spatial vector notation (Featherstone's 6D vectors)
  • prod() method for all RTBPose subclasses and Twist
  • Factored out of the Robotics Toolbox for MATLAB. RTB now contains only robotics specific code, eg. for manipulator arms and mobile robots.

Online resources:

Please email bug reports, comments or code contribtions to me at rvc@petercorke.com

Octave

The functions, but not the classes, should work fine with Octave 5.x.

Contributors

Contributions welcome. There's a user forum at http://tiny.cc/rvcforum for this Toolbox and also Robotics Toolbox for MATLAB.

License

This toolbox is released under MIT Licence.

Owner

  • Name: Peter Corke
  • Login: petercorke
  • Kind: user
  • Location: Brisbane, Australia

Robotics research and education.

Citation (CITATION)

Citing the Toolbox:
------------------

If you use the Toolbox and want to cite it in a paper please use:

@book{Corke17a,
    Author = {Peter I. Corke},
    Note = {ISBN 978-3-319-54413-7},
    Edition = {Second},
    Publisher = {Springer},
    Title = {Robotics, Vision \& Control: Fundamental Algorithms in {MATLAB}},
    Year = {2017}}

P.I. Corke, Robotics, Vision \& Control: Fundamental Algorithms in MATLAB. Second edition. Springer, 2017. ISBN 978-3-319-54413-7.


GitHub Events

Total
  • Watch event: 12
  • Fork event: 3
Last Year
  • Watch event: 12
  • Fork event: 3

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 628
  • Total Committers: 3
  • Avg Commits per committer: 209.333
  • Development Distribution Score (DDS): 0.048
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Peter Corke p****e@g****m 598
Joern Malzahn j****n@t****e 29
cabustillo13 c****3@h****m 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 9 months ago

All Time
  • Total issues: 16
  • Total pull requests: 5
  • Average time to close issues: 2 months
  • Average time to close pull requests: 5 days
  • Total issue authors: 8
  • Total pull request authors: 5
  • Average comments per issue: 0.25
  • Average comments per pull request: 2.4
  • Merged pull requests: 1
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 0
  • Pull requests: 0
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 0
  • Pull request authors: 0
  • Average comments per issue: 0
  • Average comments per pull request: 0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • petercorke (8)
  • yiping (2)
  • serges147 (1)
  • tdamsma (1)
  • lolrudy (1)
  • Maltergate (1)
  • Orangeman1234 (1)
  • LukasStu (1)
Pull Request Authors
  • SCFrench (2)
  • Maltergate (1)
  • MaKaNu (1)
  • cmower (1)
  • cabustillo13 (1)
Top Labels
Issue Labels
enhancement (7) bug (1)
Pull Request Labels