Skip to content

Commit

Permalink
docs improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Aug 6, 2024
1 parent 9deb559 commit 70346cc
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion docs/src/examples/pendulum.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ nothing # hide
### Why do we need a joint?
In the example above, we introduced a prismatic joint to model the oscillating motion of the mass-spring system. In reality, we can suspend a mass in a spring without any joint, so why do we need one here? The answer is that we do not, in fact, need the joint, but if we connect the spring directly to the world, we need to make the body (mass) the root object of the kinematic tree instead:
```@example pendulum
@named root_body = Body(; m = 1, isroot = true, r_cm = [0, 1, 0], phi0 = [0, 1, 0])
@named root_body = Body(; m = 1, isroot = true, r_cm = [0, 1, 0], phi0 = [0, 1, 0], neg_w=false)
@named multibody_spring = Multibody.Spring(c=10)
connections = [connect(world.frame_b, multibody_spring.frame_a)
Expand Down
28 changes: 28 additions & 0 deletions src/joints.jl
Original file line number Diff line number Diff line change
Expand Up @@ -891,6 +891,34 @@ vector `n` which is perpendicular to the plane and by vector `n_x`,
which points in the direction of the x-axis of the plane.
`frame_a` and `frame_b` coincide when `s_x=prismatic_x.s=0,
s_y=prismatic_y.s=0` and `phi=revolute.phi=0`.
# Structural parameters
- `n`: Axis orthogonal to unconstrained plane, resolved in `frame_a` (= same as in `frame_b`)
- `n_x`: Vector in direction of x-axis of plane, resolved in `frame_a` (`n_x` shall be orthogonal to `n`)
# Connectors
- `frame_a`: Frame for the joint
- `frame_b`: Frame for the joint
# Variables
- `s_x`: Relative distance along first prismatic joint starting at `frame_a`
- `s_y`: Relative distance along second prismatic joint starting at first prismatic joint
- `phi`: Relative rotation angle from `frame_a` to `frame_b`
- `v_x`: Relative velocity along first prismatic joint
- `v_y`: Relative velocity along second prismatic joint
- `w`: Relative angular velocity around revolute joint
- `a_x`: Relative acceleration along first prismatic joint
- `a_y`: Relative acceleration along second prismatic joint
- `wd`: Relative angular acceleration around revolute joint
# Rendering parameters
- `cylinderlength`: Length of the revolute cylinder
- `cylinderdiameter`: Diameter of the revolute cylinder
- `cylindercolor`: (structural) Color of the revolute cylinder
- `boxwidth`: Width of the prismatic joint boxes
- `boxheight`: Height of the prismatic joint boxes
- `boxcolor`: (structural) Color of the prismatic joint boxes
- `radius`: (structural) Radius of the revolute cylinder
"""
@mtkmodel Planar begin
@structural_parameters begin
Expand Down

0 comments on commit 70346cc

Please sign in to comment.