Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start PlanarMechanics module #220

Draft
wants to merge 65 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
2c48657
Add basic file structure for `Mechanical.PlanarMechanics`
AbdulrhmnGhanem Sep 17, 2023
36f913b
Add `Fixed`
AbdulrhmnGhanem Sep 17, 2023
a847e5c
Add `Body`
AbdulrhmnGhanem Sep 18, 2023
aa40ff0
Add `PartialTwoFrames`
AbdulrhmnGhanem Sep 20, 2023
55f5c91
Add `FixedTransaltion`
AbdulrhmnGhanem Sep 20, 2023
4e89282
Add `Revolute`
AbdulrhmnGhanem Sep 22, 2023
80bf790
Instinate Pendulum components without errors
AbdulrhmnGhanem Sep 22, 2023
d2a4c34
Expose `frame_a, frame_b` in Revolute
AbdulrhmnGhanem Sep 23, 2023
edfe129
Add first test for `PlanarMechanics`: a simple pendulum
AbdulrhmnGhanem Sep 23, 2023
6e2244f
Re-enable all tests
AbdulrhmnGhanem Sep 23, 2023
a4fba77
import rotational components properly
AbdulrhmnGhanem Sep 23, 2023
b7ef276
Add `Prismatic`
AbdulrhmnGhanem Sep 24, 2023
21b97b7
Newline
AbdulrhmnGhanem Sep 24, 2023
5e914ab
Fix gravity direction
AbdulrhmnGhanem Sep 24, 2023
c8cc29d
Add free body test case
AbdulrhmnGhanem Sep 24, 2023
cc6c47b
Add `ResolveInFrameA` type
AbdulrhmnGhanem Sep 27, 2023
335510f
Alias `FrameResolve` to `Frame`
AbdulrhmnGhanem Sep 28, 2023
e0b077b
Add `ZeroPosition` interface
AbdulrhmnGhanem Sep 28, 2023
10c7e9f
Add `AbsolutePosition` sensor
AbdulrhmnGhanem Sep 29, 2023
20eba48
Add `PartialRelativeSensor`
AbdulrhmnGhanem Sep 29, 2023
c467b05
Fix `reslove_in_frame` default value
AbdulrhmnGhanem Sep 29, 2023
603d873
Add `RelativePostion` component
AbdulrhmnGhanem Sep 29, 2023
813e5bc
Fix `RealOut` connections
AbdulrhmnGhanem Sep 29, 2023
8b7a261
Add a test for `AbsolutePosition` sensor
AbdulrhmnGhanem Sep 30, 2023
e8f9809
Add `Position Sensors (two free falling bodies)` test
AbdulrhmnGhanem Oct 1, 2023
9f3809d
Documenter 1.0 upgrade
ArnoStrouwen Sep 25, 2023
7c6710c
avoid using array variable
baggepinnen Sep 25, 2023
3ada901
Update Project.toml
baggepinnen Sep 26, 2023
d5a29d7
Fix heterogeneous parameters handling for `linearize_function`
YingboMa Sep 26, 2023
2e93f4a
Relax tests
YingboMa Sep 26, 2023
2cd8394
Update Project.toml
YingboMa Sep 26, 2023
e47232b
add info annotation with common mistake
baggepinnen Sep 29, 2023
7d58e06
Rename `{x,y,phi}` -> `rel_{x,y,phi} in relative sensors
AbdulrhmnGhanem Oct 1, 2023
82dcbcc
Add `BasicTransformAbsoluteVector`
AbdulrhmnGhanem Oct 1, 2023
57992e9
Add `TransformAbsoluteVector`
AbdulrhmnGhanem Oct 1, 2023
86e359b
Add `AbsoluteVelocity` sensor
AbdulrhmnGhanem Oct 1, 2023
87ee5ba
Test `AbsoluteVelocity`
AbdulrhmnGhanem Oct 2, 2023
6bd87a5
Add `BasicTransformRelativeVector`
AbdulrhmnGhanem Oct 2, 2023
32dfb13
Add `TransformRelativeVector` utility
AbdulrhmnGhanem Oct 2, 2023
b451b6d
Add `RelativeVelocity` sensor
AbdulrhmnGhanem Oct 2, 2023
11f12fc
Merge branch 'SciML:main' into ag/planar-mechanics
AbdulrhmnGhanem Oct 2, 2023
f1031a3
Add `AbsoluteAccleration` sensor
AbdulrhmnGhanem Oct 2, 2023
2680ec8
Add `RelativeAcclerationSensor`
AbdulrhmnGhanem Oct 2, 2023
b2f525d
Simplify `Body` and `FixedTranslation` components
AbdulrhmnGhanem Oct 5, 2023
faf5163
Fix a typo
AbdulrhmnGhanem Oct 5, 2023
1393610
Refactor `Revolute`
AbdulrhmnGhanem Oct 5, 2023
fcc3707
Add `AbsoluteAccCentrifugal` test (w/o sensors)
AbdulrhmnGhanem Oct 5, 2023
61f19a3
Add `AbsolutePoision` sensor to `AbsoluteAccCentrifugal` test
AbdulrhmnGhanem Oct 6, 2023
79b2489
fine-grain sensor connections
AbdulrhmnGhanem Oct 8, 2023
8a41225
Test centrifugal velocity
AbdulrhmnGhanem Oct 8, 2023
f03388b
Refactor `Prismatic`
AbdulrhmnGhanem Oct 8, 2023
f454f1b
Fix Pendulum model, and break `AbsoluteAccCentrifugal` while doing so
AbdulrhmnGhanem Nov 26, 2023
78d0f86
Merge branch 'SciML:main' into ag/planar-mechanics
AbdulrhmnGhanem Nov 27, 2023
3a9340b
Revert "Fix Pendulum model, and break `AbsoluteAccCentrifugal` while …
AbdulrhmnGhanem Nov 27, 2023
3b0bf64
Add `SpringDamper` component
AbdulrhmnGhanem Nov 29, 2023
6c0a910
Docstring for `SpringDamper`
AbdulrhmnGhanem Nov 30, 2023
4dd5d20
Add `Spring`, `Damper` components and their test
AbdulrhmnGhanem Nov 30, 2023
3094ba3
Add `Measure Demo`
AbdulrhmnGhanem Dec 19, 2023
7051dbe
a bit of tidying
AbdulrhmnGhanem Dec 20, 2023
abc9d7f
Merge branch 'SciML:main' into ag/planar-mechanics
AbdulrhmnGhanem Dec 20, 2023
9382fa3
Focus on the pendulum model work
AbdulrhmnGhanem Mar 8, 2024
f59fc05
Merge remote-tracking branch 'origin/main' into ag/planar-mechanics
AbdulrhmnGhanem Mar 8, 2024
8838212
Update to support mtk@9
AbdulrhmnGhanem Mar 8, 2024
86b9955
fmt
AbdulrhmnGhanem Mar 8, 2024
611a124
typos
AbdulrhmnGhanem Mar 8, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/Mechanical/Mechanical.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,6 @@ include("Translational/Translational.jl")
include("TranslationalPosition/TranslationalPosition.jl")
include("TranslationalModelica/TranslationalModelica.jl")
include("MultiBody2D/MultiBody2D.jl")
include("PlanarMechanics/PlanarMechanics.jl")

end
27 changes: 27 additions & 0 deletions src/Mechanical/PlanarMechanics/PlanarMechanics.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
"""
Library to model planar mechanical multi-body systems inspired by https://github.com/dzimmer/PlanarMechanics
"""

module PlanarMechanics

import ModelingToolkitStandardLibrary.Mechanical.Rotational
import ModelingToolkitStandardLibrary.Mechanical.TranslationalModelica
using ModelingToolkit: t_nounits as t, D_nounits as D
using ModelingToolkit, Symbolics, IfElse
using ...Blocks: RealInput, RealOutput
import ...@symcheck

export Frame, FrameResolve, PartialTwoFrames, ZeroPosition
include("utils.jl")

export Fixed, Body, FixedTranslation, Spring, Damper, SpringDamper
include("components.jl")

export Revolute, Prismatic
include("joints.jl")

export AbsolutePosition,
RelativePosition, AbsoluteVelocity, RelativeVelocity, AbsoluteAcceleration,
RelativeAcceleration, connect_sensor
include("sensors.jl")
end
Loading