Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

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

License

NotificationsYou must be signed in to change notification settings

petercorke/spatialmath-matlab

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

View Spatial Math Toolbox on File ExchangeBuild StatusCoverageLicense: MITMaintenanceGitHub 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 theRobotics 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 onGitHub andPyPI.

Manual

Comprehensive detail of all functions is provided in thePDF-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

>>R= rotx(0.2)% SO(3) rotation matrixR=1.00000000.9801   -0.198700.1987    0.9801

which we could animate simply as

>> tranimate(R)

animation from tranimate()

Convert roll-pitch-yaw angles to a unit quaternion

>>R= rpy2r(10,20,30,'deg')R=0.8138-0.44100.37850.46980.88260.0180-0.34200.16320.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

>>q= UnitQuaternion(R)q=0.95155<0.038135,0.18931,0.2393>

or create the unit quaternion directly using a variant constructor

>>q2=UnitQuaternion.rpy(10,20,30,'deg')q2=0.95155<0.038135,0.18931,0.2393>

What's new

  • Continuous integration usingTravis CI andcodecov
  • Support for spatial vector notation (Featherstone's 6D vectors)
  • prod() method for allRTBPose subclasses andTwist
  • Factored out of theRobotics 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 atrvc@petercorke.com

Octave

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

Contributors

Contributions welcome. There's a user forum athttp://tiny.cc/rvcforum for this Toolbox and alsoRobotics Toolbox for MATLAB.

License

This toolbox is released under MIT Licence.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors3

  •  
  •  
  •  

Languages


[8]ページ先頭

©2009-2025 Movatter.jp