From f4bfe6c3ce8ceb109e3a51b0318bd0822f839e45 Mon Sep 17 00:00:00 2001 From: Fredrik Bagge Carlson Date: Fri, 29 Mar 2024 05:42:12 +0100 Subject: [PATCH] include animation --- docs/src/examples/kinematic_loops.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/docs/src/examples/kinematic_loops.md b/docs/src/examples/kinematic_loops.md index af8cd5cb..0fdbfa86 100644 --- a/docs/src/examples/kinematic_loops.md +++ b/docs/src/examples/kinematic_loops.md @@ -91,7 +91,7 @@ nothing # hide The mechanism below is another instance of a 4-bar linkage, this time with 6 revolute joints, 1 prismatic joint and 4 bodies. In order to simulate this mechanism, the user must 1. Use the `iscut=true` keyword argument to one of the `Revolute` joints to indicate that the joint is a cut joint. A cut joint behaves similarly to a regular joint, but it introduces fewer constraints in order to avoid the otherwise over-constrained system resulting from closing the kinematic loop. -2. Increase the `state_priority` of the joint `j1` above the default joint priority 1. This encourages the model compiler to choose the joint coordinate of `j1` as state variable. The joint coordinate of `j1` is the only coordinate that uniquely determines the configuration of the mechanism. The choice of any other joint coordinate would lead to a singular representation in at least one configuration of the mechanism. The joint `j1` is the revolute joint located in the origin, see the animation below. +2. Increase the `state_priority` of the joint `j1` above the default joint priority 3. This encourages the model compiler to choose the joint coordinate of `j1` as state variable. The joint coordinate of `j1` is the only coordinate that uniquely determines the configuration of the mechanism. The choice of any other joint coordinate would lead to a singular representation in at least one configuration of the mechanism. The joint `j1` is the revolute joint located in the origin, see the animation below. To drive the mechanism, we set the initial velocity of the joint j1 to some non-zero value. @@ -139,4 +139,6 @@ plot(sol, idxs=[j2.s]) # Plot the joint coordinate of the prismatic joint (green import CairoMakie Multibody.render(fourbar2, sol; z = -3, R=Multibody.rotx(20, true)*Multibody.roty(20, true), filename = "fourbar2.gif") # Use "fourbar2.mp4" for a video file nothing # hide -``` \ No newline at end of file +``` + +![animation](fourbar2.gif) \ No newline at end of file