Skip to content

Commit

Permalink
add file
Browse files Browse the repository at this point in the history
  • Loading branch information
baggepinnen committed Sep 20, 2024
1 parent 4bff3f6 commit 39fca43
Showing 1 changed file with 42 additions and 0 deletions.
42 changes: 42 additions & 0 deletions src/visualizers.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
@mtkmodel Visaluzable begin
@components begin
frame_a = Frame()
end
@parameters begin
color[1:4] = [1.0, 0.0, 0.0, 1.0], [description = "Color of the body in animations"]
render = true, [description = "Render the joint in animations"]
end
@equations begin
frame_a.f ~ zeros(3)
frame_a.tau ~ zeros(3)
end
end

@mtkmodel SphereVisualizer begin
@extend () = v = Visaluzable()
@parameters begin
radius = 0.1, [description = "Radius of the sphere in animations"]
end
end

@mtkmodel CylinderVisualizer begin
@extend () = v = Visaluzable()
@parameters begin
radius = 0.1, [description = "Radius of the sphere in animations"]
length = 1.0, [description = "length of the cylinder"]
length_direction[1:3] = [1.0, 0.0, 0.0], [description = "length direction of the cylinder, resolved in frame_a"]
end
end

@mtkmodel BoxVisualizer begin
@extend () = v = Visaluzable()
@parameters begin
length_direction[1:3] = [1.0, 0.0, 0.0], [description = "length direction of the box, resolved in frame_a"]
width_direction[1:3] = [0.0, 1.0, 0.0], [description = "width direction of the box, resolved in frame_a"]
length = 1.0, [description = "length of the box"]
width = 1.0, [description = "width of the box"]
height = 1.0, [description = "height of the box"]
r_shape[1:3] = [0,0,0]
end
end

0 comments on commit 39fca43

Please sign in to comment.