webots
webots copied to clipboard
Reset Solid referenced in a mechanical loop
On reset, the current Robot translation/rotations fields are not reset due to the mechanical loop:
Robot {
translation -0.18 0 0.779992
children [
Shape {
appearance Copper {
}
geometry Box {
size 0.1 0.1 0.1
}
}
HingeJoint {
endPoint Solid {
translation 0 -0.8 0
children [
Transform {
children [
Shape {
appearance Copper {
}
geometry DEF SPHERE Sphere {
radius 0.2
}
}
]
}
HingeJoint {
endPoint SolidReference {
solidName "base"
}
}
]
boundingObject USE SPHERE
physics Physics {
}
}
}
]
name "base"
boundingObject Box {
size 0.1 0.1 0.1
}
physics Physics {
}
}
Steps to reproduce:
- Add the previous Robot in a world
- run the simulation and change the position of the robot
- reset the simulation -> the Robot position is not reset to the initial one
However, if you remove the SolidReference
node, the Robot position is correctly reset to the initial one.
Not sure if this is a bug or the behavior is correct, but nothing is printed in the console thus it currently seems a buggy behavior.