Im trying to subscribe gazebo topics and see the datas on a webpage.
var cmdSonarTopic = new ROSLIB.Topic({
ros : ros,
name : '/gazebo/sensor/Sonar0',
messageType : 'sensor_msgs/Range' });
cmdSonarTopic.subscribe(function(message) {
console.log('Received message on ' + cmdSonarTopic.name + ': ' + message.header.range); });
But on browser console the message i see is "Received message on /gazebo/sensor/Sonar0: undifined ". Range's data type is float32. How can i make it right?
Originally posted by minerva on ROS Answers with karma: 18 on 2015-05-12
Post score: 0