|
| 1 | +# VMRobotControl.jl |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | +VMRobotControl allows you to build dynamic controllers for your robot as intuitive |
| 6 | +virtual mechanisms. |
| 7 | +You design your controller by building a virtual mechanism. |
| 8 | +You connect the virtual mechanism to the robot through compliant elements (like springs and dampers). |
| 9 | +The control action is automatically translated to the robot actuators (desired joint forces/torques). |
| 10 | + |
| 11 | +This package is designed for building, simulating and controlling robots |
| 12 | +using passivity-based controllers represented by virtual mechanisms. |
| 13 | +This is in the tradition of *virtual model control* and *energy shaping/damping injection*. |
| 14 | +For a defined robot geometry, you can select specific *coordinates* and connect |
| 15 | + *components* to shape the robot dynamic properties. |
| 16 | +properties. |
| 17 | +This provides a simple way to program complex robot behaviour incrementally, from mechanical |
| 18 | +primitives. |
| 19 | + |
| 20 | +# Installation |
| 21 | + |
| 22 | +Julia must be installed, I recommend using [juliaup](https://github.com/JuliaLang/juliaup). `VMRobotControl.jl` is only tested on the latest julia version. |
| 23 | + |
| 24 | +> :warning: **There is another julia package called RobotDynamics.jl**: Doing `]add VMRobotControl.jl` will download and use this package instead. |
| 25 | +
|
| 26 | +Then clone [the github repository](https://github.com/Cambridge-Control-Lab/RobotDynamics.jl), and navigate to the repos's root folder in a terminal, e.g. |
| 27 | + |
| 28 | +``` |
| 29 | +git clone --recursive [email protected]:Cambridge-Control-Lab/RobotDynamics.jl.git |
| 30 | +cd RobotDynamics.jl |
| 31 | +``` |
| 32 | + |
| 33 | +The `--recursive` argument is needed to load the submodule RSONs. If you miss it, then the folder |
| 34 | +RSONs will be empty, and tests will fail as the missing robot models can't be loaded. |
| 35 | +The submodule can installed/updated at any time with with `git submodule update --init`. |
| 36 | + |
| 37 | +Run julia and hit the `]` key to enter the `Pkg` context for managing packages/environments. |
| 38 | +Run the following sequence of commands: |
| 39 | +``` |
| 40 | +registry update |
| 41 | +develop . |
| 42 | +``` |
| 43 | +This updates the package registry from online, then marks the current folder `RobotDynamics.jl` as a |
| 44 | +package under development. |
| 45 | +To check things are working, while still in the `Pkg` context, you can run the packages self-tests |
| 46 | +by activating the packages environment, and running test |
| 47 | +``` |
| 48 | +activate . |
| 49 | +test |
| 50 | +``` |
| 51 | + |
| 52 | +# Getting started |
| 53 | + |
| 54 | +To learn how to use this package, build the documentation. |
| 55 | + |
| 56 | +If you just installed `RobotDynamics.jl`, make sure you are in your default julia environment and |
| 57 | +not the `RobotDynamics.jl` environment by running `activate`, |
| 58 | +There are a few more packages needed to build the documentation which can be added with: |
| 59 | +``` |
| 60 | +activate |
| 61 | +add DifferentialEquations, Documenter, ForwardDiff, GLMakie, Literate, LiveServer, Revise, StaticArrays |
| 62 | +``` |
| 63 | +Then, run the contents of `./docs/make.jl`... |
| 64 | +``` |
| 65 | +include("./docs/make.jl") |
| 66 | +``` |
| 67 | +and host them using `LiveServer.jl`: |
| 68 | +```julia |
| 69 | +using LiveServer |
| 70 | +serve(host="0.0.0.0", port=8001, dir="./docs/build") |
| 71 | +``` |
0 commit comments