Skip to content

Commit 3ecba60

Browse files
committed
Initial commit
0 parents  commit 3ecba60

File tree

220 files changed

+101910
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

220 files changed

+101910
-0
lines changed

.github/workflows/CI.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- master
6+
tags: ['*']
7+
pull_request:
8+
branches:
9+
- master
10+
concurrency:
11+
# Skip intermediate builds: always.
12+
# Cancel intermediate builds: only if it is a pull request build.
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
15+
jobs:
16+
test:
17+
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }}
18+
runs-on: ${{ matrix.os }}
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
version:
23+
# - '1.0'
24+
- '1.9'
25+
- 'nightly'
26+
os:
27+
- ubuntu-latest
28+
arch:
29+
- x64
30+
steps:
31+
- uses: actions/checkout@v2
32+
with:
33+
submodules: 'true'
34+
- uses: julia-actions/setup-julia@v1
35+
with:
36+
version: ${{ matrix.version }}
37+
arch: ${{ matrix.arch }}
38+
- uses: julia-actions/cache@v1
39+
- uses: julia-actions/julia-buildpkg@v1
40+
- uses: julia-actions/julia-runtest@v1

.github/workflows/CompatHelper.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CompatHelper
2+
on:
3+
schedule:
4+
- cron: 0 0 * * *
5+
workflow_dispatch:
6+
permissions:
7+
contents: write
8+
pull-requests: write
9+
jobs:
10+
CompatHelper:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check if Julia is already available in the PATH
14+
id: julia_in_path
15+
run: which julia
16+
continue-on-error: true
17+
- name: Install Julia, but only if it is not already available in the PATH
18+
uses: julia-actions/setup-julia@v2
19+
with:
20+
version: '1'
21+
arch: ${{ runner.arch }}
22+
if: steps.julia_in_path.outcome != 'success'
23+
- name: "Add the General registry via Git"
24+
run: |
25+
import Pkg
26+
ENV["JULIA_PKG_SERVER"] = ""
27+
Pkg.Registry.add("General")
28+
shell: julia --color=yes {0}
29+
- name: "Install CompatHelper"
30+
run: |
31+
import Pkg
32+
name = "CompatHelper"
33+
uuid = "aa819f21-2bde-4658-8897-bab36330d9b7"
34+
version = "3"
35+
Pkg.add(; name, uuid, version)
36+
shell: julia --color=yes {0}
37+
- name: "Run CompatHelper"
38+
run: |
39+
import CompatHelper
40+
CompatHelper.main()
41+
shell: julia --color=yes {0}
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
44+
# This repo uses Documenter, so we can reuse our [Documenter SSH key](https://documenter.juliadocs.org/stable/man/hosting/walkthrough/).
45+
# If we didn't have one of those setup, we could configure a dedicated ssh deploy key `COMPATHELPER_PRIV` following https://juliaregistries.github.io/CompatHelper.jl/dev/#Creating-SSH-Key.
46+
# Either way, we need an SSH key if we want the PRs that CompatHelper creates to be able to trigger CI workflows themselves.
47+
# That is because GITHUB_TOKEN's can't trigger other workflows (see https://docs.github.com/en/actions/security-for-github-actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow).
48+
# Check if you have a deploy key setup using these docs: https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/reviewing-your-deploy-keys.
49+
COMPATHELPER_PRIV: ${{ secrets.DOCUMENTER_KEY }}
50+
# COMPATHELPER_PRIV: ${{ secrets.COMPATHELPER_PRIV }}

.github/workflows/TagBot.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: TagBot
2+
on:
3+
issue_comment:
4+
types:
5+
- created
6+
workflow_dispatch:
7+
jobs:
8+
TagBot:
9+
if: github.event_name == 'workflow_dispatch' || github.actor == 'JuliaTagBot'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: JuliaRegistries/TagBot@v1
13+
with:
14+
token: ${{ secrets.GITHUB_TOKEN }}
15+
ssh: ${{ secrets.DOCUMENTER_KEY }}

.gitignore

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Manifest.toml
2+
*.mp4
3+
*.pdf
4+
*.bak
5+
*.pb.gz
6+
.vscode
7+
docs/build/*

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "RSONs"]
2+
path = RSONs
3+
url = [email protected]:Larbino1/RSONs.git

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2023 Daniel Larby
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Project.toml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
name = "VMRobotControl"
2+
uuid = "7d923390-5bb2-4b12-9c06-5b46ef7ec375"
3+
authors = ["Daniel Larby <[email protected]>"]
4+
version = "0.1.0"
5+
6+
[deps]
7+
BenchmarkTools = "6e4b80f9-dd63-53aa-95a3-0cdb28fa8baf"
8+
ColorTypes = "3da002f7-5984-5a60-b8a6-cbb66c0b333f"
9+
Colors = "5ae59095-9a9b-59fe-a467-6f913c188581"
10+
DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8"
11+
DiffResults = "163ba53b-c6d8-5494-b064-1a9d43ac40c5"
12+
DigitalAssetExchangeFormatIO = "43182933-f65b-495a-9e05-4d939cea427d"
13+
EzXML = "8f5d6c58-4d21-5cfd-889c-e3ad7ee6a615"
14+
FileIO = "5789e2e9-d7fb-5bc7-8068-2c6fae9b9549"
15+
FileWatching = "7b1f6079-737a-58dc-b8bc-7a2ca5c1b5ee"
16+
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
17+
FunctionWrappers = "069b7b12-0de2-55c6-9aab-29f3d0a68a2e"
18+
GeometryBasics = "5c1252a2-5f33-56bf-86c9-59e7332b4326"
19+
Graphs = "86223c79-3864-5bf0-83f7-82e725a168b6"
20+
InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240"
21+
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6"
22+
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e"
23+
Literate = "98b081ad-f1c9-55d3-8b20-4c87d4299306"
24+
LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890"
25+
MeshIO = "7269a6da-0436-5bbc-96c2-40638cbb6118"
26+
Observables = "510215fc-4207-5dde-b226-833fc4488ee2"
27+
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
28+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
29+
PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46"
30+
Profile = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"
31+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
32+
ResultTypes = "08a2b407-ddc3-586a-afd6-c784ad1fffe2"
33+
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
34+
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
35+
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
36+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
37+
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
38+
39+
[weakdeps]
40+
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
41+
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
42+
43+
[extensions]
44+
VMRobotControlDifferentialEquationsExt = "DifferentialEquations"
45+
VMRobotControlMakieExt = "Makie"
46+
47+
[compat]
48+
BenchmarkTools = "1"
49+
ColorTypes = ">= 0.11"
50+
Colors = ">= 0.12"
51+
DataStructures = ">= 0.18"
52+
DiffResults = "1"
53+
DigitalAssetExchangeFormatIO = ">= 1.1.2" # This is required, previous versions broken
54+
EzXML = "1"
55+
FileIO = "1"
56+
ForwardDiff = ">= 0.10"
57+
FunctionWrappers = "1"
58+
GeometryBasics = ">= 0.4"
59+
Graphs = "1"
60+
JSON = ">= 0.21"
61+
LoopVectorization = ">= 0.12"
62+
MeshIO = ">= 0.4"
63+
Observables = ">= 0.5"
64+
OrderedCollections = "1"
65+
PreallocationTools = ">= 0.4"
66+
ResultTypes = "4"
67+
StaticArrays = ">= 1.8.1" # Manual
68+
StatsBase = ">= 0.34"
69+
Pkg = "1"
70+
SparseArrays = "1"
71+
72+
[extras]
73+
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
74+
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
75+
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
76+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
77+
78+
[targets]
79+
test = ["Test", "ProgressMeter"]

README.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# VMRobotControl.jl
2+
3+
![VMRobotControl.jl logo](docs/src/assets/Logo.svg)
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+
Then clone [the github repository](https://github.com/Cambridge-Control-Lab/VMRobotControl.jl), and navigate to the repos's root folder in a terminal, e.g.
25+
26+
```
27+
git clone --recursive [email protected]:Cambridge-Control-Lab/VMRobotControl.jl.git
28+
cd VMRobotControl.jl
29+
```
30+
31+
The `--recursive` argument is needed to load the submodule RSONs. If you miss it, then the folder
32+
RSONs will be empty, and tests will fail as the missing robot models can't be loaded.
33+
The submodule can installed/updated at any time with with `git submodule update --init`.
34+
35+
Run julia and hit the `]` key to enter the `Pkg` context for managing packages/environments.
36+
Run the following sequence of commands:
37+
```
38+
registry update
39+
develop .
40+
```
41+
This updates the package registry from online, then marks the current folder `VMRobotControl.jl` as a
42+
package under development.
43+
To check things are working, while still in the `Pkg` context, you can run the packages self-tests
44+
by activating the packages environment, and running test
45+
```
46+
activate .
47+
test
48+
```
49+
50+
# Getting started
51+
52+
To learn how to use this package, build the documentation.
53+
54+
If you just installed `VMRobotControl.jl`, make sure you are in your default julia environment and
55+
not the `VMRobotControl.jl` environment by running `activate`,
56+
There are a few more packages needed to build the documentation which can be added with:
57+
```
58+
activate
59+
add DifferentialEquations, Documenter, FileIO, ForwardDiff, GLMakie, Literate, LiveServer, MeshIO, Revise, StaticArrays
60+
```
61+
Then, run the contents of `./docs/make.jl`...
62+
```julia
63+
include("./docs/make.jl")
64+
```
65+
and host them using `LiveServer.jl`:
66+
```julia
67+
include("./docs/make.jl")
68+
```

RSONs

Submodule RSONs added at c7f64ba

URDFs/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
These URDFs were copied from the repository [rbd-benchmarks](https://github.com/rbd-benchmarks/rbd-benchmarks/tree/master)
2+
on 2023-12-22, commit 75456e9186e38123c7c1dd73e2643c0e5cdbf727.

0 commit comments

Comments
 (0)