Skip to content

Commit 85811e5

Browse files
authored
Merge pull request #17 from RoboticExplorationLab/newaltro
Changes for new version of Altro
2 parents caab6fb + 5d8024e commit 85811e5

Some content is hidden

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

57 files changed

+2446
-343
lines changed

NEWS.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
# New `v0.4`
2+
Completely new overhaul of the existing API. Now allows for both "inplace" and
3+
"out-of-place" methods that work with StaticArrays. The method for differentiation
4+
can be chosen at runtime. No methods are provided by default, but the `@autodiff` macro is
5+
provided which implements forward automatic differentiation via [ForwardDiff.jl](https://github.com/JuliaDiff/ForwardDiff.jl) and finite
6+
differencing via [FiniteDiff.jl](https://github.com/JuliaDiff/FiniteDiff.jl).
7+
8+
Support for linear models is no longer provided. This functionality is likely to appear in
9+
a downstream package such as [RobotZoo.jl](https://github.com/RoboticExplorationLab/RobotZoo.jl).
110
# New in v0.3
211
## `integrate` method
312
Allow for more flexibility for defining discrete dynamics by using

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "RobotDynamics"
22
uuid = "38ceca67-d8d3-44e8-9852-78a5596522e1"
33
authors = ["Brian Jackson <[email protected]>"]
4-
version = "0.4.2"
4+
version = "0.4.3"
55

66
[deps]
77
FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41"

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ RobotDynamics.control_dim(::Cartpole) = 1
6565

6666
# Create the model
6767
model = Cartpole()
68-
n,m = size(model)
68+
n,m = RD.dims(model)
6969

7070
# Generate random state and control vector
7171
x,u = rand(model)

docs/Project.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
[deps]
22
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4"
3+
FiniteDiff = "6a86dc24-6348-571c-b903-95158fe2bd41"
4+
ForwardDiff = "f6369f11-7733-5829-9624-2563aa707210"
5+
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
36

47
[compat]
58
Documenter = "0.24"

docs/make.jl

Lines changed: 32 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,45 @@
11
using Documenter
22
using RobotDynamics
3+
using FiniteDiff
4+
using ForwardDiff
5+
using StaticArrays
36

47
makedocs(
58
sitename = "RobotDynamics",
69
format = Documenter.HTML(prettyurls = false),
710
pages = [
811
"Introduction" => "index.md",
9-
"Getting Started" => [
10-
"models.md",
11-
"dynamics_evaluation.md"
12+
"Dynamics Models" => [
13+
"continuous.md",
14+
"discrete.md",
1215
],
13-
"Documentation" => [
14-
"discretization.md",
16+
"Rotations" => [
17+
# "liestate.md"
18+
"rotationstate.md",
19+
],
20+
"Important Types" => [
1521
"knotpoints.md",
16-
"liemodel.md",
17-
"rigidbody.md",
18-
"linearmodel.md",
19-
"finite_diff.md",
20-
"dynamics_api.md"
21-
]
22+
"trajectories.md",
23+
],
24+
"Internal API" => [
25+
"functionbase.md",
26+
"scalarfunction.md",
27+
"autodiff.md",
28+
],
29+
30+
# "Getting Started" => [
31+
# "models.md",
32+
# "dynamics_evaluation.md"
33+
# ],
34+
# "Documentation" => [
35+
# "discretization.md",
36+
# "knotpoints.md",
37+
# "liemodel.md",
38+
# "rigidbody.md",
39+
# "linearmodel.md",
40+
# "finite_diff.md",
41+
# "dynamics_api.md"
42+
# ]
2243
]
2344
)
2445

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

docs/oldsrc/knotpoints.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# `KnotPoint` type
2+
```@meta
3+
CurrentModule = RobotDynamics
4+
```
5+
6+
A common way of dealing with trajectories of forced dynamical systems, especially in optimization,
7+
is to represent a trajectory with a fixed number of "knot points", typically distributed
8+
evenly over time. Each point records the states, controls, time, and time step to the next
9+
point. It is often convenient to store all this information together, which is the purpose
10+
of the `AbstractKnotPoint` type. Additionally, it is almost always more efficient to index
11+
into a concatenated vector than it is to concatenate two smaller vectors, so the states
12+
and controls are stacked together in a single `n+m`-dimensional vector.
13+
14+
RobotDynamics.jl defines a couple different implementations of the `AbstractKnotPoint`
15+
interface, which can be useful depending on the application.
16+
17+
## Types
18+
```@docs
19+
AbstractKnotPoint
20+
GeneralKnotPoint
21+
KnotPoint
22+
StaticKnotPoint
23+
```
24+
25+
## Methods
26+
All `AbstractKnotPoint` types support the following methods:
27+
28+
```@docs
29+
state
30+
control
31+
is_terminal
32+
get_z
33+
set_state!
34+
set_control!
35+
set_z!
36+
```
37+
38+
## Mathematical Operations
39+
All `AbstractKnotPoint` types support addition between two knot points, addition of a
40+
knot point and a vector of length `n+m`, and multiplication with a scalar, all of which will
41+
return a `StaticKnotPoint`.

0 commit comments

Comments
 (0)