Skip to content

Commit

Permalink
tweak docs
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Jul 31, 2024
1 parent 4a22d8b commit 9d7e3ee
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
15 changes: 12 additions & 3 deletions docs/src/examples/quad.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,13 +75,22 @@ function RotorCraft(; closed_loop = true, addload=true)
) for i = 1:num_arms
]
@variables begin
y_alt(t)
y_roll(t)
y_pitch(t)
end
thrusters = [Thruster(name = Symbol("thruster$i")) for i = 1:num_arms]
@named body = Body(m = body_mass, state_priority = 0, I_11=0.01, I_22=0.01, I_33=0.01, air_resistance=1)
@named freemotion = FreeMotion(state=true, isroot=true, quat=false) # We use Euler angles to describe the orientation of the rotorcraft.
connections = [
connect(world.frame_b, freemotion.frame_a)
connect(freemotion.frame_b, body.frame_a)
y_alt ~ body.r_0[2]
y_roll ~ freemotion.phi[3]
y_pitch ~ freemotion.phi[1]
[connect(body.frame_a, arms[i].frame_a) for i = 1:num_arms]
[connect(arms[i].frame_b, thrusters[i].frame_b) for i = 1:num_arms]
]
Expand Down Expand Up @@ -122,9 +131,9 @@ function RotorCraft(; closed_loop = true, addload=true)
append!(connections, [thrusters[i].u ~ uc[i] for i = 1:num_arms])
append!(connections, [
Calt.err_input.u ~ -body.r_0[2]
Croll.err_input.u ~ -freemotion.phi[3]
Cpitch.err_input.u ~ -freemotion.phi[1]
Calt.err_input.u ~ -y_alt
Croll.err_input.u ~ -y_roll
Cpitch.err_input.u ~ -y_pitch
])
append!(systems, [Calt; Croll; Cpitch])
Expand Down
4 changes: 2 additions & 2 deletions docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,8 +134,8 @@ The following animations give a quick overview of simple mechanisms that can be
<a class="grid-item" href="https://help.juliahub.com/multibody/dev/examples/ropes_and_cables/">
<img src="https://help.juliahub.com/multibody/dev/examples/mounted_chain.gif" alt="mounted_chain">
</a>
<a class="grid-item" href="https://help.juliahub.com/multibody/dev/examples/ropes_and_cables/">
<img src="https://help.juliahub.com/multibody/dev/examples/stiff_rope.gif" alt="stiff_rope">
<a class="grid-item" href="https://help.juliahub.com/multibody/dev/examples/quad/">
<img src="https://help.juliahub.com/multibody/dev/examples/quadrotor.gif" alt="quadrotor">
</a>
<a class="grid-item" href="https://help.juliahub.com/multibody/dev/examples/kinematic_loops/">
<img src="https://help.juliahub.com/multibody/dev/examples/fourbar2.gif" alt="fourbar2">
Expand Down

0 comments on commit 9d7e3ee

Please sign in to comment.