GazeboJS - Resetting world state
I have a problem using GazeboJS to reset the world state.
The simple script I am using to test this command is
var gazebojs = require("gazebojs");
var gazebo = new gazebojs.Gazebo();
gazebo.publish("gazebo.msgs.WorldControl", "~/world_control", { reset: { all: true } });
However, this throws an error when running the script in terminal
>node test.js
terminate called after throwing an instance of 'boost::exception_detail::clone_impl<boost::exception_detail::error_info_injector<boost::lock_error> >'
pure virtual method called
terminate called recursively
Aborted (core dumped)
However by initialising a node and typing each command in the above script into the terminal, it works perfectly. Any ideas or explanations to what I am donig wrongly?