Closed ad-daniel closed 3 years ago
I have another case, when using SolidReference :
Open the following world :
#VRML_SIM R2021a utf8 WorldInfo { coordinateSystem "NUE" } Viewpoint { orientation -0.9351235864913506 -0.31827338836034974 -0.1557110408711453 0.9640363489590187 position -1.87889558080866 7.2834176780814746 6.396411931107234 } TexturedBackground { } TexturedBackgroundLight { } Robot { children [ Solid { translation 2 0 0 children [ Shape { geometry Cylinder { } } ] } Solid { children [ Shape { geometry Box { } } SliderJoint { device [ LinearMotor { } ] endPoint SolidReference { solidName "solid" } } ] name "solid(1)" } ] controller "my_controller" }
Create a controller named my_controller and use the following code :
#include <webots/robot.h> #include <webots/motor.h>
int main(int argc, char **argv) { wb_robot_init(); WbDeviceTag motor = wb_robot_get_device("linear motor"); while (wb_robot_step(TIME_STEP) != -1) { wb_motor_set_position(motor, 2); }; wb_robot_cleanup(); return 0; }
Run simulation, cylindre should move. Pause the simulation. Restart the simulation. Cylinder don't go back to the original position. BUT Hit a few time the "Execute one simulation step" button, and the cylinder will eventually go back to position. Note that when it come back, it doesn't go at the position 0, but a bit more, like if the simulation have been actually running during those few step, and the cylinder "catch up" to the correct position only at this moment.
Describe the Bug As it surfaced here #3036, some issues persist on the master branch regarding the reset.
How to reproduce:
tests/protos/worlds/nested_parameter_transform_node.wbt
world.It's unclear what about it makes it fail, the specific case is a heavily nested PROTO with multiple instances.