CCL Library
1.0
|
CCL header file for learning state dependent constraint with known jacobian. More...
#include <../include/ccl_math.h>
#include <../include/ccl_learn_alpha.h>
#include <gsl/gsl_linalg.h>
#include <gsl/gsl_blas.h>
#include <gsl/gsl_math.h>
#include <gsl/gsl_sf.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
Go to the source code of this file.
Macros | |
#define | NUM_CONSTRAINT 2 |
Functions | |
void | Jacobian (const double *X, const int size, double *out) |
Computation routine for calculating jacobian for the robot inverse kinematic. More... | |
int | ccl_learn_lambda_model_alloc (LEARN_A_MODEL *model) |
Allocates the memory for the learn_lambda model. More... | |
int | ccl_learn_lambda_model_free (LEARN_A_MODEL *model) |
Free the memory for the learn_lambda model. More... | |
void | ccl_learn_lambda (const double *Un, const double *X, void(*J_func)(const double *, const int, double *), const int dim_b, const int dim_r, const int dim_n, const int dim_x, const int dim_u, LEARN_A_MODEL optimal) |
Main computation routine for learning state dependent constraint lambda. More... | |
void | predict_proj_lambda (double *x, LEARN_A_MODEL model, void(*J_func)(const double *, const int, double *), double *centres, double variance, double *Iu, double *A) |
Computation routine for prediction of the lambda matrix. More... | |
int | ccl_write_learn_lambda_model (char *filename, LEARN_A_MODEL *model) |
Write model parameters to .txt file. More... | |
CCL header file for learning state dependent constraint with known jacobian.
#define NUM_CONSTRAINT 2 |
NUM_CONSTRAINT is the default full rank of the task constraint
void ccl_learn_lambda | ( | const double * | Un, |
const double * | X, | ||
void(*)(const double *, const int, double *) | J_func, | ||
const int | dim_b, | ||
const int | dim_r, | ||
const int | dim_n, | ||
const int | dim_x, | ||
const int | dim_u, | ||
LEARN_A_MODEL | optimal | ||
) |
Main computation routine for learning state dependent constraint lambda.
[in] | Un | Observed actions, Must point to an array of dim_u * dim_n of doubles |
[in] | X | Observed state variables, Must point to an array of dim_x * dim_n of doubles |
[in] | J_func | Functor for calculating the jacobian matrix |
[in] | dim_b | Number of basis functions |
[in] | dim_r | Dimensionality of the task space |
[in] | dim_n | NUmber of data points |
[in] | dim_x | Dimensionality of the state variables |
[in] | dim_u | Dimensionality of the action space |
[out] | optimal model paramters |
int ccl_learn_lambda_model_alloc | ( | LEARN_A_MODEL * | model | ) |
Allocates the memory for the learn_lambda model.
[in] | model | Must point to a valid LEARN_A_MODEL structure |
int ccl_learn_lambda_model_free | ( | LEARN_A_MODEL * | model | ) |
Free the memory for the learn_lambda model.
[in] | model | Must point to a valid LEARN_A_MODEL structure |
int ccl_write_learn_lambda_model | ( | char * | filename, |
LEARN_A_MODEL * | model | ||
) |
Write model parameters to .txt file.
[in] | filename | File name |
[in] | model | Must be pointer to a valid LEARN_A_MODEL structure |
void Jacobian | ( | const double * | X, |
const int | size, | ||
double * | out | ||
) |
Computation routine for calculating jacobian for the robot inverse kinematic.
[in] | X | Observed state variables, Must point to an array of dim_x * 1 of doubles |
[in] | size | Number of links (Todo) |
[out] | out | Jacobian matrix, must point to an array of 2 * 3 doubles (3 links arm) |
void predict_proj_lambda | ( | double * | x, |
LEARN_A_MODEL | model, | ||
void(*)(const double *, const int, double *) | J_func, | ||
double * | centres, | ||
double | variance, | ||
double * | Iu, | ||
double * | A | ||
) |
Computation routine for prediction of the lambda matrix.
[in] | x | Input state variable, must point to an array of dim_x doubles |
[in] | model | Must be pointer to a valid LEARN_A_MODEL structure |
[in] | J_func | Functor for calculating the jacobian matrix |
[in] | centres | Rbf centers, must point to an array of 1 * dim_b doubles. |
[in] | variance | Variance of the rbf |
[in] | Iu | Identity matrix, must point to an array of dim_u * dim_u doubles |
[out] | A | Constraint lambda matrix, must point to an array of dim_k * dum_u doubles |