Robotics StackExchange | Archived questions

Visualizing a dynamic map through nav2djs with gmapping problem

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

Asked by abckwok123 on 2017-03-28 05:27:42 UTC

Comments

Answers