ROSLIB.Param.get() callback not executing
Hey all,
Not sure if something is broken, or if I am doing something wrong. I have started the bridge, and got to the point where when I load the page:
var ros = new ROSLIB.Ros({
url: 'ws://localhost:9090'
});
ros.on('connection', function() {
console.log('Connected to websocket server.');
});
Result:
"Connected to websocket server."
However, I have some parameters already on the server under the namespace /lookup
. These were loaded in from a yaml file with rosparam load. When I attempt to load these values, I get no callback behavior:
var ros = new ROSLIB.Ros({
url: 'ws://localhost:9090'
});
var lookup = new ROSLIB.Param({
ros : ros,
name : '/lookup'
});
ros.on('connection', function() {
console.log('Connected to websocket server.');
lookup.get(function(value){
console.log("Lookup: "+value);
});
console.log('Ended connection sequence');
});
Result:
"Connected to websocket server."
"Ended connection sequence"
No errors, but no printing of my info.
I also verified that I am able to use the set command, and these parameters get set and are visible when running rosparam get <parameter>
. When I tried to get this parameter with the above logic, however, it never executed the callback, as with the others.
I also tried with ros.getParams, but that didn't work either. Am I doing something incorrectly? Also, using ros-kinetic, if that helps.
I'm facing a similar issue. By any chance, did you find a solution?