Skip to content

Commit 70346cc

Browse files
committed
docs improvements
1 parent 9deb559 commit 70346cc

File tree

2 files changed

+29
-1
lines changed

2 files changed

+29
-1
lines changed

docs/src/examples/pendulum.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ nothing # hide
139139
### Why do we need a joint?
140140
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:
141141
```@example pendulum
142-
@named root_body = Body(; m = 1, isroot = true, r_cm = [0, 1, 0], phi0 = [0, 1, 0])
142+
@named root_body = Body(; m = 1, isroot = true, r_cm = [0, 1, 0], phi0 = [0, 1, 0], neg_w=false)
143143
@named multibody_spring = Multibody.Spring(c=10)
144144
145145
connections = [connect(world.frame_b, multibody_spring.frame_a)

src/joints.jl

+28
Original file line numberDiff line numberDiff line change
@@ -891,6 +891,34 @@ vector `n` which is perpendicular to the plane and by vector `n_x`,
891891
which points in the direction of the x-axis of the plane.
892892
`frame_a` and `frame_b` coincide when `s_x=prismatic_x.s=0,
893893
s_y=prismatic_y.s=0` and `phi=revolute.phi=0`.
894+
895+
# Structural parameters
896+
- `n`: Axis orthogonal to unconstrained plane, resolved in `frame_a` (= same as in `frame_b`)
897+
- `n_x`: Vector in direction of x-axis of plane, resolved in `frame_a` (`n_x` shall be orthogonal to `n`)
898+
899+
# Connectors
900+
- `frame_a`: Frame for the joint
901+
- `frame_b`: Frame for the joint
902+
903+
# Variables
904+
- `s_x`: Relative distance along first prismatic joint starting at `frame_a`
905+
- `s_y`: Relative distance along second prismatic joint starting at first prismatic joint
906+
- `phi`: Relative rotation angle from `frame_a` to `frame_b`
907+
- `v_x`: Relative velocity along first prismatic joint
908+
- `v_y`: Relative velocity along second prismatic joint
909+
- `w`: Relative angular velocity around revolute joint
910+
- `a_x`: Relative acceleration along first prismatic joint
911+
- `a_y`: Relative acceleration along second prismatic joint
912+
- `wd`: Relative angular acceleration around revolute joint
913+
914+
# Rendering parameters
915+
- `cylinderlength`: Length of the revolute cylinder
916+
- `cylinderdiameter`: Diameter of the revolute cylinder
917+
- `cylindercolor`: (structural) Color of the revolute cylinder
918+
- `boxwidth`: Width of the prismatic joint boxes
919+
- `boxheight`: Height of the prismatic joint boxes
920+
- `boxcolor`: (structural) Color of the prismatic joint boxes
921+
- `radius`: (structural) Radius of the revolute cylinder
894922
"""
895923
@mtkmodel Planar begin
896924
@structural_parameters begin

0 commit comments

Comments
 (0)