planners/obsolete/PL_Linear.cpp

Go to the documentation of this file.
00001 //## begin module%36FD3EDC01B8.cm preserve=no
00002 //        %X% %Q% %Z% %W%
00003 //## end module%36FD3EDC01B8.cm
00004 
00005 //## begin module%36FD3EDC01B8.cp preserve=no
00006 //## end module%36FD3EDC01B8.cp
00007 
00008 //## Module: PL_Linear%36FD3EDC01B8; Pseudo Package body
00009 //## Source file: E:\mpk\code\Planners\PL_Linear.cpp
00010 
00011 //## begin module%36FD3EDC01B8.additionalIncludes preserve=no
00012 //## end module%36FD3EDC01B8.additionalIncludes
00013 
00014 //## begin module%36FD3EDC01B8.includes preserve=yes
00015 //#include <stdafx.h>
00016 //#include <gl/glaux.h>
00017 //## end module%36FD3EDC01B8.includes
00018 
00019 // PL_Linear
00020 #include "PL_Linear.h"
00021 // CD_Bool
00022 #include "CollisionDetectors\CD_Bool.h"
00023 //## begin module%36FD3EDC01B8.additionalDeclarations preserve=yes
00024 //#include <gl\glos.h>
00025 #include <gl\gl.h>
00026 
00027 //## end module%36FD3EDC01B8.additionalDeclarations
00028 
00029 
00030 // Class PL_Linear 
00031 
00032 PL_Linear::~PL_Linear()
00033 {
00034   //## begin PL_Linear::~PL_Linear%.body preserve=yes
00035   //## end PL_Linear::~PL_Linear%.body
00036 }
00037 
00038 
00039 
00040 //## Other Operations (implementation)
00041 bool PL_Linear::Plan ()
00042 {
00043   //## begin PL_Linear::Plan%922595700.body preserve=yes
00044 
00045         //open an OpenGL window for intermediate display
00046         path.AppendPoint( GetStartConfig() ) ;
00047 
00048 
00049         //ACTUAL PLANNER WORK
00050         const long int steps = 100 ;
00051         path.Clear() ;
00052 
00053         //test all points from start to goal 
00054         Configuration current = GetStartConfig();
00055         Configuration offset = GetGoalConfig() - GetStartConfig(); //IMPROVE: joint limits mean that it won't be as simple as this
00056         for( long int i = 0; i <= steps; i++ )
00057         {
00058 #ifdef _DEBUG
00059                 int c0 = current[ 0 ] ;
00060                 int c1 = current[ 1 ] ;
00061 #endif
00062                 if( collisionDetector->IsInterfering( current ) )       //IMPROVE: this planner is not checking with the collision detector
00063                 {
00064                         return false ;
00065                 }
00066 
00067                 path.AppendPoint( current ) ;
00068                 current += ( offset * (1.0 / steps ) ) ;
00069         }
00070         return true ;
00071   //## end PL_Linear::Plan%922595700.body
00072 }
00073 
00074 void PL_Linear::PlanMultiThread (void* data)
00075 {
00076   //## begin PL_Linear::PlanMultiThread%942274692.body preserve=yes
00077   //## end PL_Linear::PlanMultiThread%942274692.body
00078 }
00079 
00080 // Additional Declarations
00081   //## begin PL_Linear%36FD3EDC01B8.declarations preserve=yes
00082   //## end PL_Linear%36FD3EDC01B8.declarations
00083 
00084 //## begin module%36FD3EDC01B8.epilog preserve=yes
00085 //## end module%36FD3EDC01B8.epilog

Generated on Sat Apr 1 21:30:44 2006 for Motion Planning Kernel by  doxygen 1.4.6-NO