ros2djs icon indicating copy to clipboard operation
ros2djs copied to clipboard

map edit and save

Open vusdo opened this issue 7 years ago • 1 comments

I want to edit and save the map through the draw.html sample. How can you implement it?

Thank You..

vusdo avatar Jul 18 '17 08:07 vusdo

One way of implementing it is to record the

  1. polygon points (these would naturally be saved as points with respect to the map frame)
  2. pass these points over to ROS using some sort of service call such as:
  request = new ROSLIB.ServiceRequest({
        polygon_points: JSON.stringify(points)
        above_occupied_thresh: true
    });
    
    edit_map.callService(request, function (result) {
        if (result.result) {
        console.log("Service successfully called")
        }
    });
  1. On the ROS side receive the service topic, and set all pixels within these points to be occupied if above_occupied_thresh is true and set the points to be unoccupied if above_occupied_thresh is set to false

denesh-globotix avatar Dec 16 '21 11:12 denesh-globotix