Visualizing a dynamic map through nav2djs with gmapping problem

asked 2017-03-28 05:27:42 -0500

abckwok123 gravatar image

updated 2017-03-28 06:43:37 -0500

I want to visualizing the slam map through nav2djs but the canvas turns black when I start to navigate the robot.

    // Connect to ROS.
var ros = new ROSLIB.Ros({
  url : 'ws://localhost:8080'
});

// Create the main viewer.
var viewer = new ROS2D.Viewer({
  divID : 'nav',
  width : 600,
  height : 600
});

// Setup the nav client.
var nav = NAV2D.OccupancyGridClientNav({
  ros : ros,   
  rootObject : viewer.scene,
  viewer : viewer,
  topic : '/gmapping/map',   
  continuous: true
});

Thanks so much

edit retag flag offensive close merge delete