2018-08-17 16:12:02 +00:00
|
|
|
# "ModernRobotics" Mathematica Package Instructions #
|
|
|
|
|
|
2018-08-30 07:08:52 +00:00
|
|
|
## Installing the Package ##
|
|
|
|
|
|
|
|
|
|
### Recommended Installation Instructions ###
|
|
|
|
|
|
2018-07-30 18:40:46 +00:00
|
|
|
If you'd like to be able to use this package inside of any notebook,
|
|
|
|
|
regardless of the notebook's location on your filesystem, then you can use
|
|
|
|
|
Mathematica's front end to install this package. Use the following steps:
|
2018-07-18 18:57:08 +00:00
|
|
|
|
2018-08-30 07:08:52 +00:00
|
|
|
1. Download this package
|
|
|
|
|
2. Click `File -> Install...`
|
|
|
|
|
3. Select `Package` for the _Type of Item to Install_
|
|
|
|
|
4. Chose `From File...` for the _Source_
|
2018-09-03 22:38:37 +00:00
|
|
|
5. Navigate to `ModernRobotics.m` and select it as the source for the
|
2018-07-30 18:40:46 +00:00
|
|
|
package
|
2018-08-30 07:08:52 +00:00
|
|
|
6. The _Install Name_ should default to `ModernRobotics`; if it doesn't then
|
2018-09-03 22:38:37 +00:00
|
|
|
fill in the install name to be `ModernRobotics`
|
2018-08-30 07:08:52 +00:00
|
|
|
7. Choose whether you want the package installed for a single user or for all
|
2018-07-18 18:57:08 +00:00
|
|
|
users (may require administrative privileges)
|
2018-08-30 07:08:52 +00:00
|
|
|
8. Click `OK`
|
2018-07-18 18:57:08 +00:00
|
|
|
|
2018-08-30 07:08:52 +00:00
|
|
|
### Manual Installation Instructions ###
|
2018-07-18 18:57:08 +00:00
|
|
|
|
2018-08-30 07:08:52 +00:00
|
|
|
If you have any troubles with the front-end installation described above, try
|
|
|
|
|
manually installing the package by copying the `ModernRobotics.m` file into
|
2018-09-03 22:38:37 +00:00
|
|
|
the following directory.
|
2018-07-18 18:57:08 +00:00
|
|
|
|
|
|
|
|
```sh
|
2018-07-23 08:17:51 +00:00
|
|
|
$MATHPATH/Applications/ModernRobotics/
|
2018-07-18 18:57:08 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The value of `$MATHPATH` will depend on your system. You can determine it by
|
|
|
|
|
looking at the `$Path` variable inside Mathematica. Here are some paths for
|
|
|
|
|
common operating systems:
|
|
|
|
|
|
|
|
|
|
+ OS-X: `~/Library/Mathematica/`
|
|
|
|
|
+ Linux (Debian): `~/.Mathematica/`
|
|
|
|
|
+ Windows: `%APPDATA%\Mathematica\`
|
|
|
|
|
|
2018-08-30 07:08:52 +00:00
|
|
|
## Loading the Package ##
|
|
|
|
|
|
|
|
|
|
After installing the package, load the library from any notebook by running
|
2018-07-18 18:57:08 +00:00
|
|
|
|
2018-08-30 07:08:52 +00:00
|
|
|
```
|
|
|
|
|
<<ModernRobotics`
|
|
|
|
|
```
|
2018-07-18 18:57:08 +00:00
|
|
|
|
2018-08-30 07:08:52 +00:00
|
|
|
This process is required for any notebook using this package.
|
2018-07-18 18:57:08 +00:00
|
|
|
|
2018-08-30 07:08:52 +00:00
|
|
|
## Using the Package ##
|
2018-07-18 18:57:08 +00:00
|
|
|
|
2018-08-30 07:08:52 +00:00
|
|
|
After loading the package, you should be able to use any function in the
|
|
|
|
|
package. Taking the function `RotInv` for example, you can check the
|
|
|
|
|
description and usage example of this function by running
|
2018-07-18 18:57:08 +00:00
|
|
|
|
2018-08-30 07:08:52 +00:00
|
|
|
```
|
|
|
|
|
?RotInv
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
As mentioned in the function usage example, you can try using this function
|
|
|
|
|
by running
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
invR = RotInv[{{0,0,1},{1,0,0},{0,1,0}}]
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
You should get the the same output as shown in the function usage example.
|
|
|
|
|
|
|
|
|
|
## Using the Package Locally ##
|
|
|
|
|
|
|
|
|
|
It is possible to use the package locally without installation. Download and
|
|
|
|
|
place the package anywhere on your filesystem and then run
|
2018-07-18 18:57:08 +00:00
|
|
|
|
|
|
|
|
```
|
2018-07-23 08:17:51 +00:00
|
|
|
SetDirectory["<PATH-TO-DIRECTORY-CONTAINING-ModernRobotics.m>"]
|
2018-07-18 18:57:08 +00:00
|
|
|
```
|
|
|
|
|
|
2018-07-30 18:40:46 +00:00
|
|
|
If the notebook and the package are located in the same directory you could
|
|
|
|
|
use
|
2018-07-18 18:57:08 +00:00
|
|
|
|
|
|
|
|
```
|
|
|
|
|
SetDirectory[NotebookDirectory[]]
|
|
|
|
|
```
|
2018-08-30 07:08:52 +00:00
|
|
|
|
|
|
|
|
Note that since the package is not installed, you need to set the directory
|
|
|
|
|
shown above in every notebook in which this package is used. Loading is still
|
|
|
|
|
required before using.
|
|
|
|
|
|
|
|
|
|
## Uninstalling the Package ##
|
|
|
|
|
|
|
|
|
|
To uninstall the package, delete the file `ModernRobotics.wl` or
|
|
|
|
|
`ModernRobotics.m` in the following directory.
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
$MATHPATH/Applications/ModernRobotics/
|
|
|
|
|
```
|