Skip to content

Commit

Permalink
Address PR comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
brettle committed Jul 16, 2024
1 parent 850f6e4 commit 4378a6b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ public void run() {
LOG.log(Level.DEBUG, "Loading world {0}",
reloadRequest);
robot.worldLoad(reloadRequest);
stepSimulation(robot, basicTimeStep);
// Allow Webots to process the request.
robot.step(0);
LOG.log(Level.DEBUG, "Loaded world {0}", reloadRequest);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,8 +445,6 @@ private void startTimeSync() {
return;
}
simTimeSec = eventValue;
// Start the robot timing if we haven't already
ensureRobotTimingStarted();

// Do nothing if the robot program is not rurnning
if (!isRobotCodeRunning) {
Expand Down Expand Up @@ -824,6 +822,11 @@ public void close() {
if (timeSyncDevice != null) {
timeSyncDevice.close();
}
try {
listenerCallbackExecutor.shutdown();
} catch (SecurityException ex) {
LOG.log(Level.ERROR, "Could not shutdown callback executor.", ex);
}

LOG.log(Level.DEBUG, "Done closing WebotsSimulator");
}
Expand Down

0 comments on commit 4378a6b

Please sign in to comment.