Using a laser scan/point cloud to set work-area boundaries
Can anyone recommend a way to use a laser scan or point cloud to limit the areas a fixed-base robot arm will try to reach? I've got a 2D lidar mounted behind the arm that scans the walls and ceiling, giving a roughly parabolic profile. The arm has sufficient reach and maneuverability that it could easily reach and collide with the walls or ceiling. I can assume that the output of the scanner approximately matches the profile directly ahead and behind the position of the arm.
Is there a simple way to set the laser scan as the Y and Z boundaries of the work-area? Since the scans are loosely parabolic I can't just set a square work area limit or create a work cell like in ROS Industrial.
I'm using MoveIt and ROS-Control to control the arm. I'm essentially trying to use the arm to paint the walls and ceiling of the space. I've included a fake link on the URDF that traces the surface profile so collision is avoided there. However, some times other links will move outside the laser scan space which would lead to a collision in real world usage.
Any advice or recommendations appreciated.