Homepage | Demos | Overview | Downloads | Tutorials | Reference | Credits |
00001 /* 00002 * almUtility.h -- contains utility routines for the AIBO LocalMap system. 00003 * 00004 * Started on 12/16/2002 by tss 00005 */ 00006 00007 #ifndef _ALM_UTILITY_H_ 00008 #define _ALM_UTILITY_H_ 00009 00010 /* This routine takes a grid cell index in the spherical depth map and returns 00011 * the corresponding azimuth and altitude angles. */ 00012 void dm_index2angles(int index, double &azimuth, double &altitude); 00013 00014 /* This routine does the reverse of dm_index2angles. 00015 * Returns false if the inputs correspond to no index in the map */ 00016 bool angles2dm_index(double azimuth, double altitude, int &index); 00017 00018 /* This routine converts an index into the horizontal height map and returns 00019 * the corresponding X and Y locations relative to the AIBO neck tilt 00020 * pivot */ 00021 void hm_index2xy(int index, double &x, double &y); 00022 00023 /* This routine does the reverse of hm_index2xy. 00024 * Returns false if the inputs correspond to no index in the map */ 00025 bool xy2hm_index(double x, double y, int &index); 00026 00027 /* This routine converts an index into the global height map and returns 00028 * the corresponding allocentric X and Y locations. */ 00029 void gm_index2xy(int index, double &x, double &y); 00030 00031 /* This routine does the reverse of gm_index2xy. 00032 * Returns false if the inputs correspond to no index in the map */ 00033 bool xy2gm_index(double x, double y, int &index); 00034 00035 /* This routine takes a depth measurement and the pan/tilt angles of the 00036 * head and returns the 3D XYZ position of the measured point. The 00037 * XYZ coordinate system has its origin on the ground just beneath the 00038 * center of AIBO's tilt pivot point. The X axis points out in front of 00039 * the AIBO, the Y axis leftwards, and the Z axis straight up. */ 00040 void head_range2xyz(double depth, double pan, double tilt, 00041 double &x, double &y, double &z); 00042 00043 /* This routine takes a location in the 3D XYZ coordinates mentioned 00044 * in head_range2xyz and computes the range, azimuth, and altitude values 00045 * for the location from the center of the AIBO's tilt pivot point. */ 00046 void xyz2neck_range(double x, double y, double z, 00047 double &depth, double &azimuth, double &altitude); 00048 00049 /* This routine does the reverse of xyz2neck_range. Not much more to say 00050 * about that */ 00051 void neck_range2xyz(double depth, double azimuth, double altitude, 00052 double &x, double &y, double &z); 00053 #endif
Tekkotsu v1.4 |
Generated Sat Jul 19 00:06:29 2003 by Doxygen 1.3.2 |