Skip to content

Commit 7587087

Browse files
committed
tweak docs
1 parent 99320fa commit 7587087

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

ext/Render.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -506,7 +506,7 @@ function render!(scene, ::typeof(BodyBox), sys, sol, t)
506506

507507
R0 = [length_dir width_dir height_dir]
508508
# R0 = Multibody.from_nxy(r, width_dir).R'
509-
@assert isapprox(det(R0), 1.0, atol=1e-6)
509+
@assert isapprox(det(R0), 1.0, atol=1e-5) "Rotation matrix R0 is not a valid rotation matrix, got `R0 = $R0` with determinant `det(R0) = $(det(R0))`"
510510
# NOTE: The rotation by this R and the translation with r_shape needs to be double checked
511511

512512
origin = Vec3f(-length/2, -width/2, -height/2) + r_shape

src/Multibody.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,17 +106,19 @@ function render! end
106106
"""
107107
urdf2multibody(filename::AbstractString; extras=false, out=nothing, worldconnection = :rigid)
108108
109-
Translate a URDF file into a Multibody model. Only available if LightXML.jl, Graphs.jl, MetaGraphs.jl and JuliaFormatter.jl are installed and loaded byt the user.
109+
Translate a URDF file into a Multibody model. Only available if LightXML.jl, Graphs.jl, MetaGraphs.jl and JuliaFormatter.jl are manually installed and loaded by the user.
110110
111111
Example usage:
112112
```
113+
using Multibody, ModelingToolkit, JuliaSimCompiler, LightXML, Graphs, MetaGraphsNext, JuliaFormatter
113114
urdf2multibody(joinpath(dirname(pathof(Multibody)), "..", "test/doublependulum.urdf"), extras=true, out="/tmp/urdf_import.jl")
114115
```
115116
116117
## Keyword arguments
117118
- `extras=false`: If `true`, the generated code will include package imports, a simulation of the model and a rendering of the model.
118119
- `out=nothing`: If provided, the generated code will be written to this file, otherwise the string will only be returned.
119120
- `worldconnection=:rigid`: If `:rigid`, the world frame will be connected to the root link with a rigid connection. If a joint constructor is provided, this component will be instantiated and the root link is connected to the world through this, e.g., `worldconnection = FreeMotion`, `()->Prismatic(n=[0, 1, 0])` etc.
121+
`render_fixed = false`: Whether or not to render "fixed" joints. These joints aren't actually joints (no degrees of freedom), they are translated to FixedTranslation or FixedRotation components.
120122
"""
121123
function urdf2multibody end
122124
export urdf2multibody, URDFRevolute, URDFPrismatic

0 commit comments

Comments
 (0)