Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
main.cpp
- Committer:
- xaficz
- Date:
- 2021-05-03
- Revision:
- 4:53ac11e9e8b9
- Parent:
- 3:0a718d139ed1
- Child:
- 5:25bd866ef068
File content as of revision 4:53ac11e9e8b9:
#include "mbed.h"
#include "BufferedSerial.h"
#include "rplidar.h"
#include "Robot.h"
#include "Communication.h"
#include <string.h>
#include <stdio.h>
#include <math.h>
#define pi 3.14159265359
// ****** Inicialização de Variáveis ****** //
// Carateristicas da Plataforma
float r = 3.5;
float L = 15;
// Velocidade Máxima das Rodas
float w_Max = 150;
// Posição Inicial e Final
float x_Inicial = 15;
float y_Inicial = 15;
float phi_Inicial = 0;
float x_Final = 100;
float y_Final = 75;
// Ganhos de Controlo
float kv = 9;
float ki = 0.15;
float ks = 18;
// Alpha e Limiares
float Limiar_Histograma = 3;
float Limiar_Vale = 0.5;
// Matrizes de Mapeamento
float Map[80][80];
float Log_Map[80][80];
int main(){
//:::::::::::::::::Inicializaçao dos Mapas a zero::::::::::::
for(int i = 0; i < 80; i++){
for(int j = 0; j < 80; j++){
Map[i][j] = 0;
}
}
for(int i = 0; i < 80; i++){
for(int j = 0; j < 80; j++){
Log_Map[i][j] = 0;
}
}
//:::::::::::::::::::::Função VFH::::::::::::::::::::..
VFH(x_Inicial, y_Inicial, phi_Inicial, x_Final, y_Final, Log_Map, Map, Limiar_Histograma, Limiar_Vale, kv, ki, ks, L, r, w_Max);
}