Skip to content

Commit

Permalink
Merge pull request #4 from JuliaRobotics/zero-box-width
Browse files Browse the repository at this point in the history
don't try to create zero-radius spheres
  • Loading branch information
rdeits authored Jul 19, 2018
2 parents 1858e0e + 1888118 commit 5407d93
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions src/skeleton.jl
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,14 @@ function visual_elements(mechanism::Mechanism, source::Skeleton)
push!(elements, inertial_ellipsoid(body))
else
for joint in out_joints(body, mechanism)
push!(elements, VisualElement(
frame_before(joint),
HyperSphere{3, Float64}(zero(Point{3, Float64}), box_width),
DEFAULT_COLOR,
IdentityTransformation()
))
if !iszero(box_width)
push!(elements, VisualElement(
frame_before(joint),
HyperSphere{3, Float64}(zero(Point{3, Float64}), box_width),
DEFAULT_COLOR,
IdentityTransformation()
))
end
end
end
frames = body_fixed_joint_frames[body]
Expand Down

0 comments on commit 5407d93

Please sign in to comment.