robot position and minimal distance to an obsacle
Hello
I want to ask some question regarding robot position and orientation in the space and his minimal distance to some obstacle point. I want to calculate a minimal distance between the robot and some object in the map. Im using amcl for localisation and only laser scan datas. So my robot is assumed as rectangle and a obstacle as a simple line in the wall. So mathematically it is a minimal distance between a point and a line ( assume only 2d because the z coordinate is always 0). So Im using TF transform to label a line coordinate to the map frame. Than calling the TF functions can do those mathematically distance calculation. But my problem is the robot position and orientation during the time. Because during the time the robot change his position and orientation and it has rectangular dimension I have to find that closest point in the rectangle to calculate the disctance. So I know that have to use the geometry_msgs/Quaternion Message but any code help or some advice. ??
Thanks