Skip to content

Commit

Permalink
src/... | Docstrings have been improved
Browse files Browse the repository at this point in the history
  • Loading branch information
Adrian Brune committed Dec 16, 2024
1 parent 0c8cbac commit fabf41f
Show file tree
Hide file tree
Showing 9 changed files with 133 additions and 136 deletions.
2 changes: 1 addition & 1 deletion docs/src/kinematic.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Within the kinematic model, the joint positions are primarily calculated, taking
The selection of a suitable reference coordinate system is crucial for defining the initial position of key points. Such a coordinate system should easily integrate predefined lengths, widths, and distances and facilitate the calculation of positioning during rotational movements. A suitable point for this purpose is the intersection point of the rotational axes of the steering geometry. Figure illustrates this coordinate system, with the corresponding axes shown in black. Overall, the figure provides a functional representation of the adjustment capability of the steering geometry, with significant information highlighted through color visualization. For determining the initial position of the key reference points, only those vectors represented by a continuous line should be considered.


![Figure 3.2: The functional representation of the setting option rotational component](https://github.com/una-auxme/micromobilitykinematics.jl/blob/main/docs/src/assets/rotational%20component.png?raw=true?raw=true)
![Figure 3.2: The functional representation of the setting option rotational component](https://github.com/una-auxme/micromobilitykinematics.jl/blob/main/docs/src/assets/rotational%20component.png?raw=true?)


The radius by which the rotational component can rotate around the x-axis lies in the rest position along the z-axis.
Expand Down
36 changes: 18 additions & 18 deletions src/core/functions_on_instance.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
creates a copy of the steering instance
# Arguments:
-`steering::Steering`: instance of a Steering
- `steering::Steering`: instance of a Steering
# Returns:
-`copy::Steering`: copy of the given instance
- `copy::Steering`: copy of the given instance
"""
function copy(steering::Steering)
Expand Down Expand Up @@ -65,7 +65,7 @@ calculates the outer steering angle of the wheel
!only possible after using function kinematics!
# Arguments
-`steering::Steering`: Instance of a specific steering
- `steering::Steering`: Instance of a specific steering
# Returns:
- no returns because of in place programming
Expand All @@ -84,10 +84,10 @@ calculates the outer steering angle of the wheel
!only possible after using function kinematics!
# Arguments
-`steering::Steering`: Instance of a specific steering
- `steering::Steering`: Instance of a specific steering
# Returns
-`δ`: inner steering angle of the wheel
- `δ`: inner steering angle of the wheel
"""
function angle_δo(steering::Steering)
Expand All @@ -111,7 +111,7 @@ calculates the inner steering angle of the wheel
!only possible after using function kinematics!
# Arguments
-`steering::Steering`: Instance of a specific steering
- `steering::Steering`: Instance of a specific steering
# Returns:
- no returns because of in place programming
Expand All @@ -130,10 +130,10 @@ calculates the inner steering angle of the wheel
!only possible after using function kinematics!
# Arguments
-`steering::Steering`: Instance of a specific steering
- `steering::Steering`: Instance of a specific steering
# Returns
-`δ`: inner steering angle of the wheel
- `δ`: inner steering angle of the wheel
"""
function angle_δi(steering::Steering)
Expand All @@ -154,11 +154,11 @@ end
updates the kinematics of the given steering instance on the new angles and suspension
# Arguments
-`angleConfig::Tuple{T,T}`: angles (θx,θz) in which the rotational component is rotated
- `angleConfig::Tuple{T,T}`: angles (θx,θz) in which the rotational component is rotated
-`θx`: Angle of rotation of the rotation component around the x-axis
-`θz`: Angle of rotation of the rotation component around the z-axis
-`steering::Steering`: Instance of a specific steering
-`suspension::Suspension`: Instance of a specific suspension
- `steering::Steering`: Instance of a specific steering
- `suspension::Suspension`: Instance of a specific suspension
# Returns:
- no returns because of in place programming
Expand All @@ -177,11 +177,11 @@ end
updates the kinematics of the given steering instance on the new angles and suspension
# Arguments
-`angleConfig::Tuple{T,T}`: angles (θx,θz) in which the rotational component is rotated
-`θx`: Angle of rotation of the rotation component around the x-axis
-`θz`: Angle of rotation of the rotation component around the z-axis
-`steering::Steering`: Instance of a specific steering
-`suspension::Suspension`: Instance of a specific suspension
- `angleConfig::Tuple{T,T}`: angles (θx,θz) in which the rotational component is rotated
- `θx`: Angle of rotation of the rotation component around the x-axis
- `θz`: Angle of rotation of the rotation component around the z-axis
- `steering::Steering`: Instance of a specific steering
- `suspension::Suspension`: Instance of a specific suspension
# Returns
-`steering::Steering`: Instance of a specific steering
Expand All @@ -199,10 +199,10 @@ end
Returns important length values of steering components
# Arguments
-`steering::Steering`: Instance of a specific steering
- `steering::Steering`: Instance of a specific steering
# Returns
-`(x_rotational_radius, z_rotational_radius, track_lever_length, tie_rod_length)`: important length values of steering components
- `(x_rotational_radius, z_rotational_radius, track_lever_length, tie_rod_length)`: important length values of steering components
"""
function getValue(steering::Steering)
return steering.rotational_component.x_rotational_radius, steering.rotational_component.z_rotational_radius, steering.track_lever.length, steering.tie_rod.length
Expand Down
42 changes: 21 additions & 21 deletions src/core/steeringkinematics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
For the moving rotational component with the angles (θx, θz), the kinematics of the steering is calculated
# Arguments
-`angleConfig::Tuple{T,T}`: angles (θx,θz) in which the rotational component is rotated
-`θx`: Angle of rotation of the rotation component around the x-axis
-`θz`: Angle of rotation of the rotation component around the z-axis
-`steering::Steering`: Instance of a specific steering
-`suspension::Suspension`: Instance of a specific suspension
- `angleConfig::Tuple{T,T}`: angles (θx,θz) in which the rotational component is rotated
- `θx`: Angle of rotation of the rotation component around the x-axis
- `θz`: Angle of rotation of the rotation component around the z-axis
- `steering::Steering`: Instance of a specific steering
- `suspension::Suspension`: Instance of a specific suspension
# Returns:
- no returns because of in place programming
Expand Down Expand Up @@ -129,11 +129,11 @@ end
For the rotation component in its rest position with the angles (θx, θz) = (0,0), the kinematics of the steering is calculated
# Arguments
-`angleConfig::Tuple{T,T}`: angles (θx,θz) in which the rotational component is rotated
-`θx`: Angle of rotation of the rotation component around the x-axis
-`θz`: Angle of rotation of the rotation component around the z-axis
-`steering::Steering`: Instance of a specific steering
-`suspension::Suspension`: Instance of a specific suspension
- `angleConfig::Tuple{T,T}`: angles (θx,θz) in which the rotational component is rotated
- `θx`: Angle of rotation of the rotation component around the x-axis
- `θz`: Angle of rotation of the rotation component around the z-axis
- `steering::Steering`: Instance of a specific steering
- `suspension::Suspension`: Instance of a specific suspension
# Returns:
- no returns because of in place programming
Expand Down Expand Up @@ -254,11 +254,11 @@ end
To fully describe the kinematics of the steering system, both MOVED and NEUTRAL states must be calculated
# Arguments
-`angleConfig::Tuple{T,T}`: angles (θx,θz) in which the rotational component is rotated
-`θx`: Angle of rotation of the rotation component around the x-axis
-`θz`: Angle of rotation of the rotation component around the z-axis
-`steering::Steering`: Instance of a specific steering
-`suspension::Suspension`: Instance of a specific suspension
- `angleConfig::Tuple{T,T}`: angles (θx,θz) in which the rotational component is rotated
- `θx`: Angle of rotation of the rotation component around the x-axis
- `θz`: Angle of rotation of the rotation component around the z-axis
- `steering::Steering`: Instance of a specific steering
- `suspension::Suspension`: Instance of a specific suspension
# Returns:
- no returns because of in place programming
Expand All @@ -275,14 +275,14 @@ end
To fully describe the kinematics of the steering system, both MOVED and NEUTRAL states must be calculated
# Arguments
-`angleConfig::Tuple{T,T}`: angles (θx,θz) in which the rotational component is rotated
-`θx`: Angle of rotation of the rotation component around the x-axis
-`θz`: Angle of rotation of the rotation component around the z-axis
-`steering::Steering`: Instance of a specific steering
-`suspension::Suspension`: Instance of a specific suspension
- `angleConfig::Tuple{T,T}`: angles (θx,θz) in which the rotational component is rotated
- `θx`: Angle of rotation of the rotation component around the x-axis
- `θz`: Angle of rotation of the rotation component around the z-axis
- `steering::Steering`: Instance of a specific steering
- `suspension::Suspension`: Instance of a specific suspension
# Returns:
- "steering::Steering": Instance of a specific steering
- `steering::Steering`: Instance of a specific steering
"""
function steeringkinematics(angleConfig::Tuple{T,T}, steering::Steering, suspension::Suspension) where {T<:Any}
cpy_steering = copy(steering)
Expand Down
6 changes: 3 additions & 3 deletions src/core/suspensionkinematics.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
calculates all the movement-dependent positions of the joints in MOVED-Position
# Arguments:
-`suspension::Suspension`: Suspension of the micromobility vehicle
- `suspension::Suspension`: Suspension of the micromobility vehicle
"""
Expand Down Expand Up @@ -64,7 +64,7 @@ end
calculates all the movement-dependent positions of the joints in NEUTRAL-Position
# Arguemnts:
-`suspension::Suspension`: Suspension of the micromobility vehicle
- `suspension::Suspension`: Suspension of the micromobility vehicle
"""
Expand Down Expand Up @@ -124,7 +124,7 @@ end
calculates all the movement-dependent positions of the joints in NEUTRAL- and MOVED-Postion
# Arguments:
-`suspension::Suspension`: Suspension of the micromobility vehicle
- `suspension::Suspension`: Suspension of the micromobility vehicle
"""
function suspensionkinematics!(suspension::Suspension)
suspensionkinematicsNEUTRAL!(suspension)
Expand Down
2 changes: 1 addition & 1 deletion src/optimization/core_dependencies.jl
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ calculates the diffrence of the max. ideal outer wheel angle and the current max
# Arguments
- `steering::Steering`: the last state of the steering kinematics
-`measurements::Measurements`: Instance of a specific all relevant Measurements of the vehicle
- `measurements::Measurements`: Instance of a specific all relevant Measurements of the vehicle
# Returns
- dependency for the minimal track circle
Expand Down
57 changes: 28 additions & 29 deletions src/optimization/dependencies.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ checks angle dependency
- `steering::Steering`: Instance of a specific steering
# Returns:
-`::Bool`
- `::Bool`
"""
function AngleDependency(arge...)
try
Expand All @@ -27,10 +27,10 @@ end
checks kinematic dependency
# Arguments
-`steering::Steering`: Instance of a specific steering
- `steering::Steering`: Instance of a specific steering
# Returns:
-`::Bool`
- `::Bool`
"""
function KinematicDependency(arge...)
try
Expand Down Expand Up @@ -65,7 +65,7 @@ checks singularity constraints
- `suspension::Suspension`: Instance of a specific suspension
# Returns:
-`::Bool`
- `::Bool`
"""
function SingularityConstraint(arge...)
try
Expand All @@ -87,11 +87,11 @@ end
checks tracking circle constraint
# Arguments
-`steering::Steering`: Instance of a specific steering
-`measurements::Measurements`: Instance of a specific all relevant Measurements of the vehicle
- `steering::Steering`: Instance of a specific steering
- `measurements::Measurements`: Instance of a specific all relevant Measurements of the vehicle
# Returns:
-`::Bool`
- `::Bool`
"""
function TrackingCircleConstraint(arge...)
try
Expand All @@ -111,17 +111,17 @@ checkConstraints(step_size, max_angleConfig::Tuple, steering::Steering, suspensi
checks all constraints and dependencies
# Arguments
-`step_size`: step_size in which the angular area should be checked
-`maxangleConfig::Tuple{T,T}`: angles (θx,θz) in which the rotational component is rotated
- `step_size`: step_size in which the angular area should be checked
- `maxangleConfig::Tuple{T,T}`: angles (θx,θz) in which the rotational component is rotated
-`θx`: maximal Angle of rotation of the rotation component around the x-axis
-`θz`: maximal Angle of rotation of the rotation component around the z-axis
-`steering::Steering`: Instance of a specific steering
-`suspension::Suspension`: Instance of a specific suspension
- `steering::Steering`: Instance of a specific steering
- `suspension::Suspension`: Instance of a specific suspension
# Returns:
-`::Bool`:
-`false`: It is not possible to match the constraints in a satisfactory manner
-`true`: It is possible to match the constraints in a satisfactory manner
- `::Bool`:
- `false`: It is not possible to match the constraints in a satisfactory manner
- `true`: It is possible to match the constraints in a satisfactory manner
"""
function checkConstraints(step_size, max_angleConfig::Tuple, steering::Steering, suspension::Suspension)
θx_max, θz_max = max_angleConfig
Expand Down Expand Up @@ -197,15 +197,15 @@ The wrapper function of the checkConstraints procedure is employed for the purpo
! function°(): symbolises that this function should only be used within the optimisation !
# Arguments
-`x_rotational_radius`: Length of the rotational component around the x-axis. (detailed info in doc)
-`z_rotational_radius`: Length of the rotational component around the z-axis. (detailed info in doc)
-`track_lever_length`: Length of the track lever. (detailed info in doc)
-`tie_rod_length`: Length of tie rod. (detailed info in doc)
- `x_rotational_radius`: Length of the rotational component around the x-axis. (detailed info in doc)
- `z_rotational_radius`: Length of the rotational component around the z-axis. (detailed info in doc)
- `track_lever_length`: Length of the track lever. (detailed info in doc)
- `tie_rod_length`: Length of tie rod. (detailed info in doc)
# Returns
-`binary`:
-`0`: It is not possible to match the constraints in a satisfactory manner.
-`1`: It is possible to match the constraints in a satisfactory manner.
- `binary`:
- `0`: It is not possible to match the constraints in a satisfactory manner.
- `1`: It is possible to match the constraints in a satisfactory manner.
"""
function checkConstraints°(x_rotational_radius, z_rotational_radius, track_lever_length, tie_rod_length)
Expand Down Expand Up @@ -235,18 +235,17 @@ end
random search with given border for the parameters and given angular area for rotary component
# Arguments:
-`upper_border::Tuple{Float64, Float64, Float64, Float64}`: upper border Tuple (x_rotational_radius, z_rotational_radius, track_lever.length, tie_rod.length) (guidline = (100.0, 140.0,150.0,270.0))
-`lower_border::Tuple{Float64, Float64, Float64, Float64}`: lower border Tuple (x_rotational_radius, z_rotational_radius, track_lever.length, tie_rod.length) (guidline = (50.0,100.0, 100.0, 100.0))
-`max_angleConfig`: maximal angular area for rotary component (defult: (0,35))
- `upper_border::Tuple{Float64, Float64, Float64, Float64}`: upper border Tuple (x_rotational_radius, z_rotational_radius, track_lever.length, tie_rod.length) (guidline = (100.0, 140.0,150.0,270.0))
- `lower_border::Tuple{Float64, Float64, Float64, Float64}`: lower border Tuple (x_rotational_radius, z_rotational_radius, track_lever.length, tie_rod.length) (guidline = (50.0,100.0, 100.0, 100.0))
- `max_angleConfig`: maximal angular area for rotary component (defult: (0,35))
# Keywords:
-`info::Bool`: true if info should be printed
-`radius`: desired track circle radius (defult: 3500)
-`step_size`: step_size in which the angular area should be checked
- `info::Bool`: true if info should be printed
- `radius`: desired track circle radius (defult: 3500)
- `step_size`: step_size in which the angular area should be checked
# Returns:
-`compLength`: tuple (x_rotational_radius, z_rotational_radius, track_lever.length, tie_rod.length)
- `compLength`: tuple (x_rotational_radius, z_rotational_radius, track_lever.length, tie_rod.length)
"""
function random_search(upper_border::Tuple{T,T,T,T},lower_border::Tuple{T,T,T,T}, max_angleConfig::Tuple{I,I} ; info = false, step_size = 1 ) where {T<:Real, I<:Integer}
param = nothing
Expand Down
Loading

0 comments on commit fabf41f

Please sign in to comment.