Gazebo | Ignition | Community
Ask Your Question

Revision history [back]

this answer might be a bit late, but in case anyone else had the same problem with the 'gazebojs' approach,

var gazebojs = require('./npm/node_modules/gazebojs')
  var gazebo = new gazebojs.Gazebo()
  msg = { "parent_name" : "sensor_head", "name" : "sensor_head_rotation_link", "visible":false };
  gazebo.publish('gazebo.msgs.Visual', '~/Visual', msg);

this script wont work unless it is run from the terminal, Or if you did insert a timeout for example to make it looks like this

var gazebojs = require("gazebojs");
var gazebo = new gazebojs.Gazebo();
setTimeout(()=> {
    gazebo.publish("gazebo.msgs.WorldControl", "~/world_control", { reset: { all: true } });
}, 1000);

This script would work just fine.

this is currently a problem with gazebojs, and it hasn't been solved yet.

this answer might be a bit late, but in case anyone else had the same problem with the 'gazebojs' approach,

var gazebojs = require('./npm/node_modules/gazebojs')
  var gazebo = new gazebojs.Gazebo()
  msg = { "parent_name" : "sensor_head", "name" : "sensor_head_rotation_link", "visible":false };
  gazebo.publish('gazebo.msgs.Visual', '~/Visual', msg);

this script wont work unless it is run from the terminal, Or if you did insert a timeout for example to make it looks like this

var gazebojs = require("gazebojs");
var gazebo = new gazebojs.Gazebo();
setTimeout(()=> {
    gazebo.publish("gazebo.msgs.WorldControl", "~/world_control", { reset: { all: true } });
}, 1000);

This script would work just fine.

this is currently a problem with gazebojs, and it hasn't been solved yet.