|
From: <ve...@us...> - 2009-03-20 21:59:27
|
Revision: 12781
http://personalrobots.svn.sourceforge.net/personalrobots/?rev=12781&view=rev
Author: veedee
Date: 2009-03-20 21:59:13 +0000 (Fri, 20 Mar 2009)
Log Message:
-----------
cleaner door message
Modified Paths:
--------------
pkg/trunk/mapping/door_handle_detector/src/door_handle_detector.cpp
pkg/trunk/mapping/door_handle_detector/src/doors_detector.cpp
pkg/trunk/prcore/robot_msgs/msg/Door.msg
Modified: pkg/trunk/mapping/door_handle_detector/src/door_handle_detector.cpp
===================================================================
--- pkg/trunk/mapping/door_handle_detector/src/door_handle_detector.cpp 2009-03-20 21:53:11 UTC (rev 12780)
+++ pkg/trunk/mapping/door_handle_detector/src/door_handle_detector.cpp 2009-03-20 21:59:13 UTC (rev 12781)
@@ -470,7 +470,7 @@
}
- resp.door.door_boundary = polygon_transformed;
+ //resp.door.door_boundary = polygon_transformed; -> gone from Door.msg
duration = ros::Time::now () - ts;
ROS_INFO ("Door found. Result in frame %s \n P1 = [%f, %f, %f]. P2 = [%f, %f, %f]. \n Height = %f. \n Handle = [%f, %f, %f]. \n Total time: %f.",
Modified: pkg/trunk/mapping/door_handle_detector/src/doors_detector.cpp
===================================================================
--- pkg/trunk/mapping/door_handle_detector/src/doors_detector.cpp 2009-03-20 21:53:11 UTC (rev 12780)
+++ pkg/trunk/mapping/door_handle_detector/src/doors_detector.cpp 2009-03-20 21:59:13 UTC (rev 12781)
@@ -510,20 +510,13 @@
resp.doors[nr_d].door_p1 = min_p;
resp.doors[nr_d].door_p2 = max_p;
- resp.doors[nr_d].door_boundary = pmap_.polygons[cc];
resp.doors[nr_d].normal.x = coeff[cc][0];
resp.doors[nr_d].normal.y = coeff[cc][1];
resp.doors[nr_d].normal.z = coeff[cc][2];
- resp.doors[nr_d].plane_d = coeff[cc][3];
// Need min/max Z
cloud_geometry::statistics::getMinMax (&pmap_.polygons[cc], min_p, max_p);
resp.doors[nr_d].height = fabs (max_p.z - min_p.z);
- resp.doors[nr_d].width = sqrt ((resp.doors[nr_d].door_p1.x - resp.doors[nr_d].door_p2.x) *
- (resp.doors[nr_d].door_p1.x - resp.doors[nr_d].door_p2.x) +
- (resp.doors[nr_d].door_p1.y - resp.doors[nr_d].door_p2.y) *
- (resp.doors[nr_d].door_p1.y - resp.doors[nr_d].door_p2.y)
- );
nr_d++;
}
@@ -545,7 +538,11 @@
{
ROS_INFO (" %d -> P1 = [%g, %g, %g]. P2 = [%g, %g, %g]. Width = %g. Height = %g. Weight = %g.", cd,
resp.doors[cd].door_p1.x, resp.doors[cd].door_p1.y, resp.doors[cd].door_p1.z, resp.doors[cd].door_p2.x, resp.doors[cd].door_p2.y, resp.doors[cd].door_p2.z,
- resp.doors[cd].width, resp.doors[cd].height, resp.doors[cd].weight);
+ sqrt ((resp.doors[nr_d].door_p1.x - resp.doors[nr_d].door_p2.x) *
+ (resp.doors[nr_d].door_p1.x - resp.doors[nr_d].door_p2.x) +
+ (resp.doors[nr_d].door_p1.y - resp.doors[nr_d].door_p2.y) *
+ (resp.doors[nr_d].door_p1.y - resp.doors[nr_d].door_p2.y)
+ ), resp.doors[cd].height, resp.doors[cd].weight);
}
ROS_INFO (" Total time: %g.", duration.toSec ());
Modified: pkg/trunk/prcore/robot_msgs/msg/Door.msg
===================================================================
--- pkg/trunk/prcore/robot_msgs/msg/Door.msg 2009-03-20 21:53:11 UTC (rev 12780)
+++ pkg/trunk/prcore/robot_msgs/msg/Door.msg 2009-03-20 21:59:13 UTC (rev 12781)
@@ -3,16 +3,13 @@
robot_msgs/Point32 frame_p2 ## position of the door frame
robot_msgs/Point32 door_p1 ## Ground plane projection of a point on the plane of the door
robot_msgs/Point32 door_p2 ## Ground plane projection of a point on the plane of the door
-robot_msgs/Point32 handle ## Position of the door handle w.r.t a frame defined at the axis of the door and on the ground plane with Z axis pointing up and X axis along the door
+robot_msgs/Point32 handle ## Position of the door handle
-float32 width
float32 height
float32 weight ## Given some perception algorithm, how sure are we that this is a good candidate
int32 hinge ## is the hinge at frame_p1 (=1), frame_p2 (=2) or unknown (=-1)
int32 rot_dir ## does the door rotate open clockwise (=1), counterclockwise (=2), or unknown (=-1)
-Polygon3D door_boundary
+Vector3 normal ## <a,b,c> plane coefficients, i.e., the door plane normal
-Vector3 normal ## <a,b,c> plane coefficients
-float32 plane_d ## <d> plane coefficient
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|