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

Fix ljoint bo #6355

Merged
merged 1 commit into from
Aug 15, 2023
Merged
Changes from all commits
Commits
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
24 changes: 15 additions & 9 deletions projects/objects/factory/pipes/protos/LJoint.proto
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
# documentation url: https://webots.cloud/run?url=https://github.com/cyberbotics/webots/blob/released/projects/objects/factory/pipes/protos/LJoint.proto
# keywords: industrial/plumbing
# 90-degree L-joint for connecting pipes.
# template language: javascript

EXTERNPROTO "webots://projects/appearances/protos/OldSteel.proto"

Expand All @@ -15,6 +16,11 @@ PROTO LJoint [
field SFNode appearance OldSteel { textureTransform TextureTransform { rotation 0.78 scale 2 2 } } # Defines the appearance of the pipe.
]
{
%<
const scaleX = fields.scale.value.x;
const scaleY = fields.scale.value.y;
const scaleZ = fields.scale.value.z;
>%
Solid {
translation IS translation
rotation IS rotation
Expand Down Expand Up @@ -325,33 +331,33 @@ PROTO LJoint [
boundingObject Group {
children [
Pose {
translation 0.031098346 0 -0.036
translation %<= scaleX * 0.031098346 >% 0 %<= scaleZ * -0.036 >%
rotation 0 1 0 1.8325997
children [
Capsule {
height 0.04
radius 0.035
height %<= scaleX * 0.04 >%
radius %<= scaleX * 0.035 >%
}
]
}
Pose {
translation -0.036079734 0 0.029794677
translation %<= scaleX * -0.036079734 >% 0 %<= scaleZ * 0.029794677 >%
rotation 0 -1 0 0.2
children [
Capsule {
height 0.04
radius 0.035
height %<= scaleX * 0.04 >%
radius %<= scaleX * 0.035 >%
}
]
translationStep 0.001
}
Pose {
translation -0.019555909 0 -0.0041774259
translation %<= scaleX * -0.019555909 >% 0 %<= scaleZ * -0.0041774259 >%
rotation 0 1 0 -0.59269969
children [
Capsule {
height 0.04
radius 0.035
height %<= scaleX * 0.04 >%
radius %<= scaleX * 0.035 >%
}
]
rotationStep 0.01
Expand Down