00001 /*============================================================================= * 00002 * File : jma_aca_structs.c 00003 * Module : ACA kernel 00004 * Author : Juan Manuel AHUACTZIN 00005 * Creation : Tue Jun 1 17:03:20 PDT 1999 00006 * 00007 *============================================================================= * 00008 (c) Copyright 1999, J.M. Ahuactzin all rights reserved 00009 *============================================================================= * 00010 *------------------------- Description --------------------------------------- 00011 * 00012 *------------------------- Modifications ------------------------------------- * 00013 * 00014 * 00015 */ 00016 00017 /* Note: in the following structures the variables marked as "CONSTANT" should 00018 not be changed during the program. This variables must be initialized and 00019 then remain constant the long of the program, other wise you will have 00020 problems. We can recognise this variables easily they start with a capital 00021 letter. 00022 */ 00023 #ifndef _JMA_ACA_STRUCTS_H_ 00024 #define _JMA_ACA_STRUCTS_H_ 00025 00026 #include "jma_aca_const.h" 00027 #include "kinematics/configuration.h" 00028 00029 /*== structure for a configuration ==*/ 00030 00031 typedef struct { 00032 Configuration dof ; 00033 //double dof[MAX_DOF]; /* values of each degree of freedom */ 00034 double dist; /* distance to the set of landmarks */ 00035 } JMA_Configuration; 00036 00037 00038 /*== structure for a landmark ==*/ 00039 00040 typedef struct { 00041 int N_embryos; /* number of embryos by landmark : CONSTANT */ 00042 int father_id; 00043 JMA_Configuration landmark; /* configuration of the landmark */ 00044 JMA_Configuration embryo[MAX_EMBRYOS]; /* set of embryos for a landmark */ 00045 } JMA_Node; 00046 00047 /*== structure for the roadmap tree ==*/ 00048 00049 typedef struct { 00050 int N_dof; /* number of degrees of freedom of the robot: CONSTANT*/ 00051 int n_nodes; /* number of nodes (landmarks) allredy set */ 00052 double max_dist; /* best embryo distance */ 00053 double last_max_dist; /* last landmark distance */ 00054 int best_father_id; /* id of the landmak containing the best embryo */ 00055 int best_embryo_id; /* id of the best embryo */ 00056 JMA_Node node[MAX_LANDMARKS]; /* set of landmarks or nodes */ 00057 } JMA_Roadmap_Tree; 00058 00059 #endif 00060 00061 00062 00063