Skip to content

Commit 298dfa9

Browse files
committed
Initial commit
0 parents  commit 298dfa9

File tree

310 files changed

+453644
-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.

310 files changed

+453644
-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 }}

.github/workflows/documentation.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
tags: '*'
8+
pull_request:
9+
10+
jobs:
11+
build:
12+
permissions:
13+
actions: write
14+
contents: write
15+
pull-requests: read
16+
statuses: write
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v4
20+
- uses: julia-actions/setup-julia@v2
21+
with:
22+
version: '1'
23+
- uses: julia-actions/cache@v2
24+
- name: Install dependencies
25+
run: julia --project=docs/ -e 'using Pkg; Pkg.develop(PackageSpec(path=pwd())); Pkg.instantiate()'
26+
- name: Build and deploy
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # If authenticating with GitHub Actions token
29+
DOCUMENTER_KEY: ${{ secrets.DOCUMENTER_KEY }} # If authenticating with SSH deploy key
30+
run: julia --project=docs/ docs/make.jl

.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: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
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+
LoopVectorization = "bdcacae8-1622-11e9-2a5c-532679323890"
24+
MeshIO = "7269a6da-0436-5bbc-96c2-40638cbb6118"
25+
Observables = "510215fc-4207-5dde-b226-833fc4488ee2"
26+
OrderedCollections = "bac558e1-5e72-5ebc-8fee-abe8a469f55d"
27+
Pkg = "44cfe95a-1eb2-52ea-b672-e2afdf69b78f"
28+
PreallocationTools = "d236fae5-4411-538c-8e31-a6e3d9e00b46"
29+
Profile = "9abbd945-dff8-562f-b5e8-e1ebf5ef1b79"
30+
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c"
31+
ResultTypes = "08a2b407-ddc3-586a-afd6-c784ad1fffe2"
32+
SparseArrays = "2f01184e-e22b-5df5-ae63-d93ebab69eaf"
33+
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
34+
StatsBase = "2913bbd2-ae8a-5f71-8c99-4fb6c76f3a91"
35+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
36+
UUIDs = "cf7118a7-6976-5b1a-9a39-7adc72f591a4"
37+
38+
[weakdeps]
39+
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
40+
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
41+
42+
[extensions]
43+
VMRobotControlDifferentialEquationsExt = "DifferentialEquations"
44+
VMRobotControlMakieExt = "Makie"
45+
46+
[compat]
47+
BenchmarkTools = "1"
48+
ColorTypes = ">= 0.11"
49+
Colors = ">= 0.12"
50+
DataStructures = ">= 0.18"
51+
DifferentialEquations = "7"
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+
Makie = ">= 0.21"
63+
MeshIO = ">= 0.4"
64+
Observables = ">= 0.5"
65+
OrderedCollections = "1"
66+
PreallocationTools = ">= 0.4"
67+
ResultTypes = "4"
68+
StaticArrays = ">= 1.8.1" # Manual
69+
StatsBase = ">= 0.34"
70+
Pkg = "1"
71+
SparseArrays = "1"
72+
73+
[extras]
74+
DifferentialEquations = "0c46a032-eb83-5123-abaf-570d42b7fbaa"
75+
Makie = "ee78f7c6-11fb-53f2-987a-cfe4a2b5a57a"
76+
ProgressMeter = "92933f4c-e287-5a05-a399-4b506db050ca"
77+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
78+
79+
[targets]
80+
test = ["Test", "ProgressMeter"]

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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, from the Julia REPL run:
25+
```julia
26+
using Pkg
27+
Pkg.add("VMRobotControl")
28+
```
29+
To load the package, use the command:
30+
```julia
31+
using VMRobotControl
32+
```
33+
34+
## Developer installation
35+
36+
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.
37+
38+
```
39+
git clone [email protected]:Cambridge-Control-Lab/VMRobotControl.jl.git
40+
```
41+
42+
Run julia and hit the `]` key to enter the `Pkg` context for managing packages/environments.
43+
Run the following sequence of commands:
44+
```
45+
registry update
46+
develop ./VMRobotControl.jl
47+
```
48+
This updates the package registry from online, then marks the folder `VMRobotControl.jl` as a
49+
package under development.
50+
To check things are working, while still in the `Pkg` context, you can run the packages self-tests
51+
by activating the packages environment, and running test
52+
```
53+
activate ./VMRobotControl.jl
54+
test
55+
```
56+
57+
# Manually building documentation
58+
59+
Activate the docs environment, from the VMRobotControl.jl folder:
60+
```
61+
activate docs
62+
add DifferentialEquations, Documenter, FileIO, ForwardDiff, GLMakie, Literate, LiveServer, MeshIO, StaticArrays
63+
```
64+
Then, run the contents of `./docs/make.jl`...
65+
```julia
66+
include("./docs/make.jl")
67+
```
68+
and host them using `LiveServer.jl`:
69+
```julia
70+
include("./docs/make.jl")
71+
```

RSONs/README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# RSONs
2+
Collection of robots in "Robot Structured Object Notation" format.
3+
4+
This format is still in development, does not have a publicly available parser, and is subject to change.
5+
6+
The motivation behind this format is twofold:
7+
- To develop a portable definition format in plaintext for robots which goes beyond kinematic/inertial properties, allowing the definition of springs, dampers, inerters and other components.
8+
- To develop a format which is not based upon XML (such as URDF), because I don't like it.
9+
10+
## Franka panda
11+
12+
Frank panda inertial parameters are taken from https://github.com/frankaemika/franka_ros/blob/develop/franka_description/robots/common/inertial.yaml

0 commit comments

Comments
 (0)