ajustes imu

This commit is contained in:
Diego Freitas 2025-08-16 13:53:35 -03:00
parent 796b3a9701
commit ebcabdd7e3
48 changed files with 597 additions and 563 deletions

Binary file not shown.

View File

@ -211,14 +211,14 @@ namespace AgroBase.Forms.Operacoes
private void AtualizarImagemPainel(Panel panel, Image novaImagem)
{
if (panel.InvokeRequired)
if (panel?.InvokeRequired ?? false)
{
panel.BeginInvoke(new Action(() => AtualizarImagemPainel(panel, novaImagem)));
return;
}
panel.BackgroundImage?.Dispose();
panel.BackgroundImage = novaImagem;
panel?.BackgroundImage?.Dispose();
if (panel != null) panel.BackgroundImage = novaImagem;
}

View File

@ -372,24 +372,20 @@
this.picSonarRadar = new System.Windows.Forms.PictureBox();
this.tabSonarCalor = new System.Windows.Forms.TabPage();
this.picMapaCalor = new System.Windows.Forms.PictureBox();
this.chbGrade = new System.Windows.Forms.CheckBox();
this.gridObstaculos = new System.Windows.Forms.DataGridView();
this.txtDirecaoDesvio = new System.Windows.Forms.TextBox();
this.label100 = new System.Windows.Forms.Label();
this.txtDesvioNecessario = new System.Windows.Forms.TextBox();
this.txtSonarDecisao = new System.Windows.Forms.TextBox();
this.label99 = new System.Windows.Forms.Label();
this.txtEspacoLivreDireita = new System.Windows.Forms.TextBox();
this.txtSonarDistanciaParada = new System.Windows.Forms.TextBox();
this.label98 = new System.Windows.Forms.Label();
this.txtEspacoLivreEsquerda = new System.Windows.Forms.TextBox();
this.txtSonarDistanciaObstaculo = new System.Windows.Forms.TextBox();
this.label97 = new System.Windows.Forms.Label();
this.tabSegmentacao = new System.Windows.Forms.TabPage();
this.chbDesenharExtremos = new System.Windows.Forms.CheckBox();
this.chbDesenharContornos = new System.Windows.Forms.CheckBox();
this.txtCamCaminhoDireita = new System.Windows.Forms.TextBox();
this.chbDesenharCorredor = new System.Windows.Forms.CheckBox();
this.txtCamCaminhoStatusCarro = new System.Windows.Forms.TextBox();
this.label103 = new System.Windows.Forms.Label();
this.txtCamCaminhoEsquerda = new System.Windows.Forms.TextBox();
this.txtCamCaminhoErroLateral = new System.Windows.Forms.TextBox();
this.label102 = new System.Windows.Forms.Label();
this.txtCamCaminhoAngulo = new System.Windows.Forms.TextBox();
this.txtCamCaminhoErroAngular = new System.Windows.Forms.TextBox();
this.label101 = new System.Windows.Forms.Label();
this.pnlCaminho = new System.Windows.Forms.Panel();
this.tabCPU = new System.Windows.Forms.TabPage();
@ -501,6 +497,9 @@
this.label36 = new System.Windows.Forms.Label();
this.txtMomento = new System.Windows.Forms.TextBox();
this.btnPlay = new System.Windows.Forms.Button();
this.tabSonarDeteccoes = new System.Windows.Forms.TabPage();
this.pnlSonarDeteccoes = new System.Windows.Forms.Panel();
this.chbSonarDeteccoes = new System.Windows.Forms.CheckBox();
((System.ComponentModel.ISupportInitialize)(this.trbMomento)).BeginInit();
this.panel1.SuspendLayout();
this.tabControl4.SuspendLayout();
@ -570,6 +569,7 @@
this.panel6.SuspendLayout();
this.pnlInformacoesOperacao.SuspendLayout();
((System.ComponentModel.ISupportInitialize)(this.picCameraCaminho)).BeginInit();
this.tabSonarDeteccoes.SuspendLayout();
this.SuspendLayout();
//
// trbMomento
@ -4072,16 +4072,14 @@
//
// tabSonar
//
this.tabSonar.Controls.Add(this.chbSonarDeteccoes);
this.tabSonar.Controls.Add(this.tabControl3);
this.tabSonar.Controls.Add(this.chbGrade);
this.tabSonar.Controls.Add(this.gridObstaculos);
this.tabSonar.Controls.Add(this.txtDirecaoDesvio);
this.tabSonar.Controls.Add(this.label100);
this.tabSonar.Controls.Add(this.txtDesvioNecessario);
this.tabSonar.Controls.Add(this.txtSonarDecisao);
this.tabSonar.Controls.Add(this.label99);
this.tabSonar.Controls.Add(this.txtEspacoLivreDireita);
this.tabSonar.Controls.Add(this.txtSonarDistanciaParada);
this.tabSonar.Controls.Add(this.label98);
this.tabSonar.Controls.Add(this.txtEspacoLivreEsquerda);
this.tabSonar.Controls.Add(this.txtSonarDistanciaObstaculo);
this.tabSonar.Controls.Add(this.label97);
this.tabSonar.Location = new System.Drawing.Point(4, 22);
this.tabSonar.Name = "tabSonar";
@ -4095,6 +4093,7 @@
//
this.tabControl3.Controls.Add(this.tabSonarRGB);
this.tabControl3.Controls.Add(this.tabSonarCalor);
this.tabControl3.Controls.Add(this.tabSonarDeteccoes);
this.tabControl3.Location = new System.Drawing.Point(3, 6);
this.tabControl3.Name = "tabControl3";
this.tabControl3.SelectedIndex = 0;
@ -4145,16 +4144,6 @@
this.picMapaCalor.TabIndex = 1;
this.picMapaCalor.TabStop = false;
//
// chbGrade
//
this.chbGrade.AutoSize = true;
this.chbGrade.Location = new System.Drawing.Point(435, 353);
this.chbGrade.Name = "chbGrade";
this.chbGrade.Size = new System.Drawing.Size(55, 17);
this.chbGrade.TabIndex = 48;
this.chbGrade.Text = "Grade";
this.chbGrade.UseVisualStyleBackColor = true;
//
// gridObstaculos
//
this.gridObstaculos.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize;
@ -4164,35 +4153,15 @@
this.gridObstaculos.Size = new System.Drawing.Size(485, 140);
this.gridObstaculos.TabIndex = 47;
//
// txtDirecaoDesvio
// txtSonarDecisao
//
this.txtDirecaoDesvio.Location = new System.Drawing.Point(312, 351);
this.txtDirecaoDesvio.Margin = new System.Windows.Forms.Padding(2);
this.txtDirecaoDesvio.Name = "txtDirecaoDesvio";
this.txtDirecaoDesvio.ReadOnly = true;
this.txtDirecaoDesvio.Size = new System.Drawing.Size(100, 20);
this.txtDirecaoDesvio.TabIndex = 46;
this.txtDirecaoDesvio.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label100
//
this.label100.AutoSize = true;
this.label100.Location = new System.Drawing.Point(213, 354);
this.label100.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label100.Name = "label100";
this.label100.Size = new System.Drawing.Size(95, 13);
this.label100.TabIndex = 45;
this.label100.Text = "Direção do Desvio";
//
// txtDesvioNecessario
//
this.txtDesvioNecessario.Location = new System.Drawing.Point(109, 351);
this.txtDesvioNecessario.Margin = new System.Windows.Forms.Padding(2);
this.txtDesvioNecessario.Name = "txtDesvioNecessario";
this.txtDesvioNecessario.ReadOnly = true;
this.txtDesvioNecessario.Size = new System.Drawing.Size(100, 20);
this.txtDesvioNecessario.TabIndex = 44;
this.txtDesvioNecessario.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtSonarDecisao.Location = new System.Drawing.Point(109, 351);
this.txtSonarDecisao.Margin = new System.Windows.Forms.Padding(2);
this.txtSonarDecisao.Name = "txtSonarDecisao";
this.txtSonarDecisao.ReadOnly = true;
this.txtSonarDecisao.Size = new System.Drawing.Size(381, 20);
this.txtSonarDecisao.TabIndex = 44;
this.txtSonarDecisao.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label99
//
@ -4200,39 +4169,39 @@
this.label99.Location = new System.Drawing.Point(5, 354);
this.label99.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label99.Name = "label99";
this.label99.Size = new System.Drawing.Size(96, 13);
this.label99.Size = new System.Drawing.Size(46, 13);
this.label99.TabIndex = 43;
this.label99.Text = "Desvio Necessário";
this.label99.Text = "Decisão";
//
// txtEspacoLivreDireita
// txtSonarDistanciaParada
//
this.txtEspacoLivreDireita.Location = new System.Drawing.Point(312, 327);
this.txtEspacoLivreDireita.Margin = new System.Windows.Forms.Padding(2);
this.txtEspacoLivreDireita.Name = "txtEspacoLivreDireita";
this.txtEspacoLivreDireita.ReadOnly = true;
this.txtEspacoLivreDireita.Size = new System.Drawing.Size(100, 20);
this.txtEspacoLivreDireita.TabIndex = 42;
this.txtEspacoLivreDireita.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtSonarDistanciaParada.Location = new System.Drawing.Point(281, 327);
this.txtSonarDistanciaParada.Margin = new System.Windows.Forms.Padding(2);
this.txtSonarDistanciaParada.Name = "txtSonarDistanciaParada";
this.txtSonarDistanciaParada.ReadOnly = true;
this.txtSonarDistanciaParada.Size = new System.Drawing.Size(69, 20);
this.txtSonarDistanciaParada.TabIndex = 42;
this.txtSonarDistanciaParada.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label98
//
this.label98.AutoSize = true;
this.label98.Location = new System.Drawing.Point(213, 330);
this.label98.Location = new System.Drawing.Point(182, 330);
this.label98.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label98.Name = "label98";
this.label98.Size = new System.Drawing.Size(85, 13);
this.label98.Size = new System.Drawing.Size(88, 13);
this.label98.TabIndex = 41;
this.label98.Text = "Espaço à Direita";
this.label98.Text = "Distancia Parada";
//
// txtEspacoLivreEsquerda
// txtSonarDistanciaObstaculo
//
this.txtEspacoLivreEsquerda.Location = new System.Drawing.Point(109, 327);
this.txtEspacoLivreEsquerda.Margin = new System.Windows.Forms.Padding(2);
this.txtEspacoLivreEsquerda.Name = "txtEspacoLivreEsquerda";
this.txtEspacoLivreEsquerda.ReadOnly = true;
this.txtEspacoLivreEsquerda.Size = new System.Drawing.Size(100, 20);
this.txtEspacoLivreEsquerda.TabIndex = 40;
this.txtEspacoLivreEsquerda.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtSonarDistanciaObstaculo.Location = new System.Drawing.Point(109, 327);
this.txtSonarDistanciaObstaculo.Margin = new System.Windows.Forms.Padding(2);
this.txtSonarDistanciaObstaculo.Name = "txtSonarDistanciaObstaculo";
this.txtSonarDistanciaObstaculo.ReadOnly = true;
this.txtSonarDistanciaObstaculo.Size = new System.Drawing.Size(69, 20);
this.txtSonarDistanciaObstaculo.TabIndex = 40;
this.txtSonarDistanciaObstaculo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label97
//
@ -4240,19 +4209,18 @@
this.label97.Location = new System.Drawing.Point(5, 330);
this.label97.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label97.Name = "label97";
this.label97.Size = new System.Drawing.Size(100, 13);
this.label97.Size = new System.Drawing.Size(102, 13);
this.label97.TabIndex = 39;
this.label97.Text = "Espaço à Esquerda";
this.label97.Text = "Distancia Obstaculo";
//
// tabSegmentacao
//
this.tabSegmentacao.Controls.Add(this.chbDesenharExtremos);
this.tabSegmentacao.Controls.Add(this.chbDesenharContornos);
this.tabSegmentacao.Controls.Add(this.txtCamCaminhoDireita);
this.tabSegmentacao.Controls.Add(this.chbDesenharCorredor);
this.tabSegmentacao.Controls.Add(this.txtCamCaminhoStatusCarro);
this.tabSegmentacao.Controls.Add(this.label103);
this.tabSegmentacao.Controls.Add(this.txtCamCaminhoEsquerda);
this.tabSegmentacao.Controls.Add(this.txtCamCaminhoErroLateral);
this.tabSegmentacao.Controls.Add(this.label102);
this.tabSegmentacao.Controls.Add(this.txtCamCaminhoAngulo);
this.tabSegmentacao.Controls.Add(this.txtCamCaminhoErroAngular);
this.tabSegmentacao.Controls.Add(this.label101);
this.tabSegmentacao.Controls.Add(this.pnlCaminho);
this.tabSegmentacao.Location = new System.Drawing.Point(4, 22);
@ -4263,37 +4231,25 @@
this.tabSegmentacao.Text = "Segmentação";
this.tabSegmentacao.UseVisualStyleBackColor = true;
//
// chbDesenharExtremos
// chbDesenharCorredor
//
this.chbDesenharExtremos.AutoSize = true;
this.chbDesenharExtremos.Checked = true;
this.chbDesenharExtremos.CheckState = System.Windows.Forms.CheckState.Checked;
this.chbDesenharExtremos.Location = new System.Drawing.Point(368, 431);
this.chbDesenharExtremos.Name = "chbDesenharExtremos";
this.chbDesenharExtremos.Size = new System.Drawing.Size(117, 17);
this.chbDesenharExtremos.TabIndex = 48;
this.chbDesenharExtremos.Text = "Desenhar extremos";
this.chbDesenharExtremos.UseVisualStyleBackColor = true;
this.chbDesenharCorredor.AutoSize = true;
this.chbDesenharCorredor.Location = new System.Drawing.Point(369, 408);
this.chbDesenharCorredor.Name = "chbDesenharCorredor";
this.chbDesenharCorredor.Size = new System.Drawing.Size(114, 17);
this.chbDesenharCorredor.TabIndex = 47;
this.chbDesenharCorredor.Text = "Desenhar corredor";
this.chbDesenharCorredor.UseVisualStyleBackColor = true;
//
// chbDesenharContornos
// txtCamCaminhoStatusCarro
//
this.chbDesenharContornos.AutoSize = true;
this.chbDesenharContornos.Location = new System.Drawing.Point(369, 408);
this.chbDesenharContornos.Name = "chbDesenharContornos";
this.chbDesenharContornos.Size = new System.Drawing.Size(122, 17);
this.chbDesenharContornos.TabIndex = 47;
this.chbDesenharContornos.Text = "Desenhar contornos";
this.chbDesenharContornos.UseVisualStyleBackColor = true;
//
// txtCamCaminhoDireita
//
this.txtCamCaminhoDireita.Location = new System.Drawing.Point(5, 497);
this.txtCamCaminhoDireita.Margin = new System.Windows.Forms.Padding(2);
this.txtCamCaminhoDireita.Name = "txtCamCaminhoDireita";
this.txtCamCaminhoDireita.ReadOnly = true;
this.txtCamCaminhoDireita.Size = new System.Drawing.Size(101, 20);
this.txtCamCaminhoDireita.TabIndex = 46;
this.txtCamCaminhoDireita.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtCamCaminhoStatusCarro.Location = new System.Drawing.Point(5, 497);
this.txtCamCaminhoStatusCarro.Margin = new System.Windows.Forms.Padding(2);
this.txtCamCaminhoStatusCarro.Name = "txtCamCaminhoStatusCarro";
this.txtCamCaminhoStatusCarro.ReadOnly = true;
this.txtCamCaminhoStatusCarro.Size = new System.Drawing.Size(101, 20);
this.txtCamCaminhoStatusCarro.TabIndex = 46;
this.txtCamCaminhoStatusCarro.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label103
//
@ -4301,19 +4257,19 @@
this.label103.Location = new System.Drawing.Point(2, 481);
this.label103.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label103.Name = "label103";
this.label103.Size = new System.Drawing.Size(80, 13);
this.label103.Size = new System.Drawing.Size(65, 13);
this.label103.TabIndex = 45;
this.label103.Text = "Angulo a direita";
this.label103.Text = "Status Carro";
//
// txtCamCaminhoEsquerda
// txtCamCaminhoErroLateral
//
this.txtCamCaminhoEsquerda.Location = new System.Drawing.Point(5, 459);
this.txtCamCaminhoEsquerda.Margin = new System.Windows.Forms.Padding(2);
this.txtCamCaminhoEsquerda.Name = "txtCamCaminhoEsquerda";
this.txtCamCaminhoEsquerda.ReadOnly = true;
this.txtCamCaminhoEsquerda.Size = new System.Drawing.Size(101, 20);
this.txtCamCaminhoEsquerda.TabIndex = 44;
this.txtCamCaminhoEsquerda.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtCamCaminhoErroLateral.Location = new System.Drawing.Point(5, 459);
this.txtCamCaminhoErroLateral.Margin = new System.Windows.Forms.Padding(2);
this.txtCamCaminhoErroLateral.Name = "txtCamCaminhoErroLateral";
this.txtCamCaminhoErroLateral.ReadOnly = true;
this.txtCamCaminhoErroLateral.Size = new System.Drawing.Size(101, 20);
this.txtCamCaminhoErroLateral.TabIndex = 44;
this.txtCamCaminhoErroLateral.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label102
//
@ -4321,19 +4277,19 @@
this.label102.Location = new System.Drawing.Point(2, 443);
this.label102.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label102.Name = "label102";
this.label102.Size = new System.Drawing.Size(96, 13);
this.label102.Size = new System.Drawing.Size(72, 13);
this.label102.TabIndex = 43;
this.label102.Text = "Angulo a esquerda";
this.label102.Text = "Erro Lateral %";
//
// txtCamCaminhoAngulo
// txtCamCaminhoErroAngular
//
this.txtCamCaminhoAngulo.Location = new System.Drawing.Point(5, 421);
this.txtCamCaminhoAngulo.Margin = new System.Windows.Forms.Padding(2);
this.txtCamCaminhoAngulo.Name = "txtCamCaminhoAngulo";
this.txtCamCaminhoAngulo.ReadOnly = true;
this.txtCamCaminhoAngulo.Size = new System.Drawing.Size(101, 20);
this.txtCamCaminhoAngulo.TabIndex = 42;
this.txtCamCaminhoAngulo.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
this.txtCamCaminhoErroAngular.Location = new System.Drawing.Point(5, 421);
this.txtCamCaminhoErroAngular.Margin = new System.Windows.Forms.Padding(2);
this.txtCamCaminhoErroAngular.Name = "txtCamCaminhoErroAngular";
this.txtCamCaminhoErroAngular.ReadOnly = true;
this.txtCamCaminhoErroAngular.Size = new System.Drawing.Size(101, 20);
this.txtCamCaminhoErroAngular.TabIndex = 42;
this.txtCamCaminhoErroAngular.TextAlign = System.Windows.Forms.HorizontalAlignment.Center;
//
// label101
//
@ -4341,9 +4297,9 @@
this.label101.Location = new System.Drawing.Point(2, 405);
this.label101.Margin = new System.Windows.Forms.Padding(2, 0, 2, 0);
this.label101.Name = "label101";
this.label101.Size = new System.Drawing.Size(40, 13);
this.label101.Size = new System.Drawing.Size(65, 13);
this.label101.TabIndex = 41;
this.label101.Text = "Angulo";
this.label101.Text = "Erro Angular";
//
// pnlCaminho
//
@ -5552,6 +5508,37 @@
this.btnPlay.UseVisualStyleBackColor = true;
this.btnPlay.Click += new System.EventHandler(this.btnPlay_Click);
//
// tabSonarDeteccoes
//
this.tabSonarDeteccoes.Controls.Add(this.pnlSonarDeteccoes);
this.tabSonarDeteccoes.Location = new System.Drawing.Point(4, 22);
this.tabSonarDeteccoes.Name = "tabSonarDeteccoes";
this.tabSonarDeteccoes.Padding = new System.Windows.Forms.Padding(3);
this.tabSonarDeteccoes.Size = new System.Drawing.Size(479, 290);
this.tabSonarDeteccoes.TabIndex = 2;
this.tabSonarDeteccoes.Text = "Detecções";
this.tabSonarDeteccoes.UseVisualStyleBackColor = true;
//
// pnlSonarDeteccoes
//
this.pnlSonarDeteccoes.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom;
this.pnlSonarDeteccoes.Dock = System.Windows.Forms.DockStyle.Fill;
this.pnlSonarDeteccoes.Location = new System.Drawing.Point(3, 3);
this.pnlSonarDeteccoes.Name = "pnlSonarDeteccoes";
this.pnlSonarDeteccoes.Size = new System.Drawing.Size(473, 284);
this.pnlSonarDeteccoes.TabIndex = 0;
this.pnlSonarDeteccoes.Paint += new System.Windows.Forms.PaintEventHandler(this.pnlSonarDeteccoes_Paint);
//
// chbSonarDeteccoes
//
this.chbSonarDeteccoes.AutoSize = true;
this.chbSonarDeteccoes.Location = new System.Drawing.Point(377, 329);
this.chbSonarDeteccoes.Name = "chbSonarDeteccoes";
this.chbSonarDeteccoes.Size = new System.Drawing.Size(106, 17);
this.chbSonarDeteccoes.TabIndex = 50;
this.chbSonarDeteccoes.Text = "Exibir Detecções";
this.chbSonarDeteccoes.UseVisualStyleBackColor = true;
//
// frmResultadosOperacao
//
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
@ -5671,6 +5658,7 @@
this.pnlInformacoesOperacao.ResumeLayout(false);
this.pnlInformacoesOperacao.PerformLayout();
((System.ComponentModel.ISupportInitialize)(this.picCameraCaminho)).EndInit();
this.tabSonarDeteccoes.ResumeLayout(false);
this.ResumeLayout(false);
this.PerformLayout();
@ -5948,29 +5936,25 @@
private System.Windows.Forms.Label lblTipoMovimento;
private System.Windows.Forms.TabPage tabSonar;
private System.Windows.Forms.PictureBox picMapaCalor;
private System.Windows.Forms.TextBox txtEspacoLivreDireita;
private System.Windows.Forms.TextBox txtSonarDistanciaParada;
private System.Windows.Forms.Label label98;
private System.Windows.Forms.TextBox txtEspacoLivreEsquerda;
private System.Windows.Forms.TextBox txtSonarDistanciaObstaculo;
private System.Windows.Forms.Label label97;
private System.Windows.Forms.DataGridView gridObstaculos;
private System.Windows.Forms.TextBox txtDirecaoDesvio;
private System.Windows.Forms.Label label100;
private System.Windows.Forms.TextBox txtDesvioNecessario;
private System.Windows.Forms.TextBox txtSonarDecisao;
private System.Windows.Forms.Label label99;
private System.Windows.Forms.CheckBox chbGrade;
private System.Windows.Forms.TabControl tabControl3;
private System.Windows.Forms.TabPage tabSonarRGB;
private System.Windows.Forms.TabPage tabSonarCalor;
private System.Windows.Forms.PictureBox picSonarRadar;
private System.Windows.Forms.TabPage tabSegmentacao;
private System.Windows.Forms.Panel pnlCaminho;
private System.Windows.Forms.TextBox txtCamCaminhoAngulo;
private System.Windows.Forms.TextBox txtCamCaminhoErroAngular;
private System.Windows.Forms.Label label101;
private System.Windows.Forms.CheckBox chbDesenharExtremos;
private System.Windows.Forms.CheckBox chbDesenharContornos;
private System.Windows.Forms.TextBox txtCamCaminhoDireita;
private System.Windows.Forms.CheckBox chbDesenharCorredor;
private System.Windows.Forms.TextBox txtCamCaminhoStatusCarro;
private System.Windows.Forms.Label label103;
private System.Windows.Forms.TextBox txtCamCaminhoEsquerda;
private System.Windows.Forms.TextBox txtCamCaminhoErroLateral;
private System.Windows.Forms.Label label102;
private System.Windows.Forms.TabControl tabControl4;
private System.Windows.Forms.TabPage tabMapaGPS;
@ -6126,5 +6110,8 @@
private System.Windows.Forms.Label label135;
private System.Windows.Forms.ComboBox cmbMOV_Temperatura_Filtro;
private System.Windows.Forms.Label label136;
private System.Windows.Forms.TabPage tabSonarDeteccoes;
private System.Windows.Forms.Panel pnlSonarDeteccoes;
private System.Windows.Forms.CheckBox chbSonarDeteccoes;
}
}

View File

@ -1385,7 +1385,7 @@ namespace AgroBase.Forms.Operacoes
lblMagnetometro.ForeColor = !LogImu.Iniciado ? Color.Red : Color.Black;
pnlOrientacaoMagnetometro.Invalidate();
pnlInclinacao.Invalidate();
visualizador3D.AtualizarAngulos(-LogImu.InclinacaoLateral, -LogImu.InclinacaoFrontal, -LogsOperacao[idxMomentoAtual].Gps.OrientacaoReal);
visualizador3D.AtualizarAngulos(LogImu.InclinacaoFrontal, LogImu.InclinacaoLateral, -LogsOperacao[idxMomentoAtual].Gps.OrientacaoReal);
txtTemperatura.Text = LogImu.Temperatura.ToString("0.00");
txtAltitude.Text = LogImu.Altitude.ToString("0.00");
txtPressao.Text = LogImu.Pressao + " Pa (" + (LogImu.Pressao / 101300.0).ToString("0.00") + " atm)";
@ -1443,65 +1443,55 @@ namespace AgroBase.Forms.Operacoes
private void AtualizarInformacoesSonar()
{
var Log = LogsOperacao.FirstOrDefault(x => x.Momento == MomentoAtual).OperadorVisual;
//txtEspacoLivreEsquerda.Text = Log.Leitura.obj.radar_2d.analise.corredor_perfil[1].esquerda_m.ToString("0.00");
//txtEspacoLivreDireita.Text = Log.Leitura.obj.radar_2d.analise.corredor_perfil[1].direita_m.ToString("0.00");
//txtDesvioNecessario.Text = (Log?.Resumo?.DesvioNecessario ?? false) ? "Sim" : "Não";
//txtDirecaoDesvio.Text = (Log?.Resumo?.DirecaoDesvio ?? Enums.Direcao.Parado).ToString();
var Log = LogsOperacao[idxMomentoAtual].OperadorVisual.Analises;
txtSonarDistanciaObstaculo.Text = Log.matriz_confianca.block.d_obs_true_min_m.ToString("0.00");
txtSonarDistanciaParada.Text = Log.matriz_confianca.block.decision.dist_necessaria.ToString("0.00");
txtSonarDecisao.Text = Log.matriz_confianca.block.reason_detail;
if (gridObstaculos.Columns.Count == 0)
{
gridObstaculos.Columns.Clear();
gridObstaculos.Columns.Add("clDistancia", "Distância");
gridObstaculos.Columns.Add("clLargura", "Largura");
gridObstaculos.Columns.Add("clAltura", "Altura");
gridObstaculos.Columns.Add("clEspacoEsquerda", "Espaço à Esquerdo");
gridObstaculos.Columns.Add("clEspacoDireita", "Espaço à Direita");
gridObstaculos.Columns.Add("clDesvioNecessario", "Desvio Necessário");
gridObstaculos.Columns.Add("clDirecaoDesvio", "Direção Desvio");
gridObstaculos.Columns.Add("clDeteccao", "Detecção");
gridObstaculos.Columns.Add("clConfianca", "Confiança");
}
gridObstaculos.Rows.Clear();
/*if (Log != null)
if (Log != null)
{
foreach (var obstaculo in Log?.Resumo?.Obstaculos?.Where(x => x.DesvioNecessario)?.OrderBy(x => x.DistanciaMedia_mm))
foreach (var obstaculo in Log.deteccao)
{
gridObstaculos.Rows.Add
(
obstaculo.DistanciaMedia_mm.ToString("0.00"),
obstaculo.Largura_mm.ToString("0.00"),
obstaculo.Altura_mm.ToString("0.00"),
obstaculo.DistanciaLivreEsquerda.ToString("0.00"),
obstaculo.DistanciaLivreDireita.ToString("0.00"),
obstaculo.DesvioNecessario ? "Sim" : "Não",
obstaculo.DirecaoDesvio.ToString()
obstaculo.label,
obstaculo.conf
);
}
}*/
}
picMapaCalor.Image = CarregarImagemCamera(pathImagensCaminho, "_heatmap");
picSonarRadar.Image = CarregarImagemCamera(pathImagensCaminho, "_radar");
if (chbGrade.Checked)
{
picSonarRadar.Image?.Dispose();
//picSonarRadar.Image = Log.Leitura.obj.radar_2d.PlotarAnalsie((Bitmap)picSonarRadar.Image.Clone());
}
Bitmap rgb = CarregarImagemCamera(pathImagensCaminho, "_rgb");
Bitmap seg = CarregarImagemCamera(pathImagensCaminho, "_segmentacao");
pnlSonarDeteccoes.BackgroundImage = FuncoesGlobais.FazerOverlay(rgb, seg);
pnlSonarDeteccoes.Invalidate();
//if (chbSonarDeteccoes.Checked)
//{
// picSonarRadar.Image?.Dispose();
// //picSonarRadar.Image = Log.Leitura.obj.radar_2d.PlotarAnalsie((Bitmap)picSonarRadar.Image.Clone());
//}
}
private void AtualizarInformacoesCameraCaminho()
{
/*var Log = LogsCam_Caminho.FirstOrDefault(x => x.Momento == MomentoAtual);
if (Log != null)
{
txtCamCaminhoAngulo.Text = Log.Angulo.ToString("0.00");
txtCamCaminhoEsquerda.Text = Log.AnguloEsquerdo.ToString("0.00");
txtCamCaminhoDireita.Text = Log.AnguloDireito.ToString("0.00");
}*/
var Log = LogsOperacao[idxMomentoAtual];
txtCamCaminhoErroAngular.Text = (Log.OperadorVisual?.Analises?.segmentacao?.erro_angular ?? 0).ToString("0.00");
txtCamCaminhoErroLateral.Text = (Log.OperadorVisual?.Analises?.segmentacao?.erro_lateral_pct ?? 0).ToString("0.00");
txtCamCaminhoStatusCarro.Text = (Log.OperadorVisual?.Analises?.segmentacao?.status_corredor ?? Enums.StatusCarroMapa.Parado).ToString();
pnlCaminho.BackgroundImage = CarregarImagemCamera(pathImagensCaminho, "_segmentacao");
pnlCaminho.BackgroundImageLayout = ImageLayout.Zoom;
@ -1646,85 +1636,295 @@ namespace AgroBase.Forms.Operacoes
private void pnlCaminho_Paint(object sender, PaintEventArgs e)
{
/*var Log = LogsCam_Caminho.FirstOrDefault(x => x.Momento == MomentoAtual);
if (Log == null || Log.Leitura == null) return;
if (!chbDesenharCorredor.Checked) return;
int _robotWidthPxOnImage = 100;
Panel pnlContornos = (Panel)sender;
var panel = (Panel)sender;
var g = e.Graphics;
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
Graphics graphics = e.Graphics;
graphics.Clear(pnlContornos.BackColor); // Limpa o fundo
var _segDebug = LogsOperacao[idxMomentoAtual].OperadorVisual?.Analises?.segmentacao;
// Determina as dimensões máximas dos contornos
float larguraMaxContornos = 512; // Substitua pelo valor real
float alturaMaxContornos = 512; // Substitua pelo valor real
// pré-checagens
if (_segDebug == null) return;
if (_segDebug.centros_corredor == null || _segDebug.centros_corredor.Count < 2) return;
if (panel.BackgroundImage == null) return;
// Proporção de escala baseada no tamanho do Panel e nas dimensões dos contornos
float proporcaoX = pnlContornos.Width / larguraMaxContornos;
float proporcaoY = pnlContornos.Height / alturaMaxContornos;
float escala = Math.Min(proporcaoX, proporcaoY); // Mantém a proporção sem distorcer
// 1) Calcula onde a imagem é desenhada dentro do Panel (considera Layout=Zoom, Stretch, Center, etc.)
Rectangle bounds = panel.ClientRectangle;
Size imgSize = panel.BackgroundImage.Size;
var layout = panel.BackgroundImageLayout;
Rectangle destRect;
// Calcula o novo tamanho dos contornos após o redimensionamento
float novaLargura = larguraMaxContornos * escala;
float novaAltura = alturaMaxContornos * escala;
// Calcula o deslocamento para centralizar os contornos no Panel
float deslocamentoX = (pnlContornos.Width - novaLargura) / 2;
float deslocamentoY = (pnlContornos.Height - novaAltura) / 2;
List<Point> pontosCamera = new List<Point>();
var Classe = Log.ClassMap.FirstOrDefault(x => x.Key == "rua");
foreach (var cameraClass in Log.Leitura.Classes.Where(x => x.Classe == Classe.Key))
switch (layout)
{
if (cameraClass.Contornos == null || cameraClass.Contornos.Length == 0) continue;
case ImageLayout.None:
destRect = new Rectangle(bounds.Location, imgSize);
break;
case ImageLayout.Tile:
destRect = bounds; // pra overlay, tratamos como cobrindo tudo
break;
case ImageLayout.Center:
destRect = new Rectangle(
bounds.X + (bounds.Width - imgSize.Width) / 2,
bounds.Y + (bounds.Height - imgSize.Height) / 2,
imgSize.Width, imgSize.Height);
break;
case ImageLayout.Stretch:
destRect = bounds;
break;
case ImageLayout.Zoom:
default:
float rx = (float)bounds.Width / imgSize.Width;
float ry = (float)bounds.Height / imgSize.Height;
float r = Math.Min(rx, ry);
int w = (int)(imgSize.Width * r);
int h = (int)(imgSize.Height * r);
int x = bounds.X + (bounds.Width - w) / 2;
int y = bounds.Y + (bounds.Height - h) / 2;
destRect = new Rectangle(x, y, w, h);
break;
}
using (Pen pen = new Pen(Color.Blue, 2))
// 2) Mapeamento de coordenadas da SEGMENTAÇÃO (seg.width/seg.height) -> painel
// (use o tamanho que gerou os 'centros_corredor')
float sx = (float)destRect.Width / Math.Max(1, _segDebug.width);
float sy = (float)destRect.Height / Math.Max(1, _segDebug.height);
PointF Map(double xImg, double yImg)
=> new PointF(destRect.X + (float)(xImg * sx), destRect.Y + (float)(yImg * sy));
// largura do robô nas coordenadas do painel
float halfRobot = (float)(_robotWidthPxOnImage * sx * 0.5);
// 3) Desenho: linha central, pontos e largura do robô em cada ponto
var penCenter = new Pen(Color.FromArgb(255, 255, 0), 2f); // amarelo
var penRobot = new Pen(Color.FromArgb(255, 0, 255), 1.5f); // magenta
var brushPt = new SolidBrush(Color.FromArgb(255, 255, 0));
float rPt = 3.5f;
// mapeia os pontos
var pts = _segDebug.centros_corredor
.Where(p => p != null && p.Length >= 2)
.Select(p => Map(p[0], p[1]))
.ToArray();
if (pts.Length < 2) return;
// linha central do corredor
g.DrawLines(penCenter, pts);
// pontos e largura do robô por ponto
foreach (var p in pts)
{
g.FillEllipse(brushPt, p.X - rPt, p.Y - rPt, 2 * rPt, 2 * rPt);
g.DrawLine(penRobot, p.X - halfRobot, p.Y, p.X + halfRobot, p.Y);
}
}
private void pnlSonarDeteccoes_Paint(object sender, PaintEventArgs e)
{
var panel = (Panel)sender;
var g = e.Graphics;
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.AntiAlias;
var _snap = LogsOperacao[idxMomentoAtual].OperadorVisual.Analises.matriz_confianca;
if (_snap == null || panel.BackgroundImage == null) return;
int W = _snap.grid_w;
int H = _snap.grid_h;
if (W <= 0 || H <= 0) return;
// -- destRect da imagem (respeita BackgroundImageLayout=Zoom)
Rectangle bounds = panel.ClientRectangle;
Size imgSize = panel.BackgroundImage.Size;
Rectangle destRect;
switch (panel.BackgroundImageLayout)
{
case ImageLayout.Stretch: destRect = bounds; break;
case ImageLayout.Center:
destRect = new Rectangle(
bounds.X + (bounds.Width - imgSize.Width) / 2,
bounds.Y + (bounds.Height - imgSize.Height) / 2,
imgSize.Width, imgSize.Height);
break;
case ImageLayout.None:
destRect = new Rectangle(bounds.Location, imgSize);
break;
case ImageLayout.Zoom:
default:
float rx = (float)bounds.Width / imgSize.Width;
float ry = (float)bounds.Height / imgSize.Height;
float r = Math.Min(rx, ry);
int w = (int)(imgSize.Width * r);
int h = (int)(imgSize.Height * r);
int x = bounds.X + (bounds.Width - w) / 2;
int y = bounds.Y + (bounds.Height - h) / 2;
destRect = new Rectangle(x, y, w, h);
break;
}
// helpers de mapeamento da GRID -> painel
float cellW = (float)destRect.Width / W;
float cellH = (float)destRect.Height / H;
Func<int, int, PointF> CenterOfCell = (i, j) =>
new PointF(destRect.X + (i + 0.5f) * cellW, destRect.Y + (j + 0.5f) * cellH);
// --- central_cols (fallback: terço central)
int c0 = W / 3;
int c1 = 2 * W / 3;
// --- linha que bloqueia (se houver)
var blk = _snap.block;
int? j_block = null;
// reason_detail/blocked já estão em blk; j_block em si não veio no seu modelo.
// Então projetamos a "linha foco" pela distância de bloqueio quando existir:
// fallback simples: escolher a linha cujo row_dist_m é mais próxima de d_obs_true_min_m.
if (blk != null && _snap.row_dist_m != null && _snap.row_dist_m.Count == H)
{
float? dRef = blk.d_block_line_m ?? (float?)blk.d_obs_true_min_m;
if (dRef.HasValue && dRef.Value > 0)
{
for (int i = 0; i < cameraClass.Contornos.Length - 1; i++)
float bestAbs = float.MaxValue;
int bestJ = -1;
for (int j = 0; j < H; j++)
{
Point contorno = new Point() { X = cameraClass.Contornos[i][0], Y = cameraClass.Contornos[i][1] };
Point contornoP = new Point() { X = cameraClass.Contornos[i + 1][0], Y = cameraClass.Contornos[i + 1][1] };
// Aplica a escala e o deslocamento às coordenadas
Point start = new Point((int)(contorno.X * escala + deslocamentoX), (int)(contorno.Y * escala + deslocamentoY));
Point end = new Point((int)(contornoP.X * escala + deslocamentoX), (int)(contornoP.Y * escala + deslocamentoY));
if (chbDesenharContornos.Checked)
{
graphics.DrawLine(pen, start, end);
}
pontosCamera.Add(contorno);
}
// Se necessário, fechar o contorno conectando o último ponto ao primeiro
if (cameraClass.Contornos.Length > 1 && chbDesenharContornos.Checked)
{
var primeiro = cameraClass.Contornos.First();
var ultimo = cameraClass.Contornos.Last();
Point start = new Point((int)(ultimo[0] * escala + deslocamentoX), (int)(ultimo[1] * escala + deslocamentoY));
Point end = new Point((int)(primeiro[0] * escala + deslocamentoX), (int)(primeiro[1] * escala + deslocamentoY));
graphics.DrawLine(pen, start, end);
float drow = _snap.row_dist_m[j];
float diff = Math.Abs(drow - dRef.Value);
if (diff < bestAbs) { bestAbs = diff; bestJ = j; }
}
if (bestJ >= 0) j_block = bestJ;
}
}
if (chbDesenharExtremos.Checked)
{
using (Pen pen = new Pen(Classe.Value, 2))
{
var PontosExtremos = CameraCaminhoModel.DefinirPontosExtremos(pontosCamera);
for (int i = 0; i < PontosExtremos.Count - 1; i++)
{
// Aplica a escala e o deslocamento às coordenadas
Point start = new Point((int)(PontosExtremos[i].X * escala + deslocamentoX), (int)(PontosExtremos[i].Y * escala + deslocamentoY));
Point end = new Point((int)(PontosExtremos[i + 1].X * escala + deslocamentoX), (int)(PontosExtremos[i + 1].Y * escala + deslocamentoY));
// desenha a região central (guias)
var penCols = new Pen(Color.FromArgb(160, 255, 255, 255), 1f);
float xC0 = destRect.X + c0 * cellW;
float xC1 = destRect.X + c1 * cellW;
g.DrawLine(penCols, xC0, destRect.Top, xC0, destRect.Bottom);
g.DrawLine(penCols, xC1, destRect.Top, xC1, destRect.Bottom);
graphics.DrawLine(pen, start, end);
// Desenha linha horizontal na j_block + janela do robô
if (j_block.HasValue)
{
int jb = Math.Max(0, Math.Min(H - 1, j_block.Value));
float y = destRect.Y + (jb + 0.5f) * cellH;
var penLine = new Pen(blk.blocked ? Color.Red : Color.Yellow, 2f);
g.DrawLine(penLine, destRect.Left, y, destRect.Right, y);
// largura necessária em colunas nessa linha
float widthNeedM = (float)(VariaveisEquipamento.LarguraEquipamentoMm / 1000.0);
int ncols = c1 - c0;
if (_snap.row_scale_x_m != null && _snap.row_scale_x_m.Count == H)
{
float sx_m_per_col = _snap.row_scale_x_m[jb];
if (sx_m_per_col > 1e-6f)
ncols = Math.Max(1, Math.Min(W, (int)Math.Ceiling(widthNeedM / sx_m_per_col)));
}
int mid = (c0 + c1) / 2;
int a = Math.Max(0, mid - ncols / 2);
int b = Math.Min(W, a + ncols);
a = Math.Max(0, b - ncols);
// retângulo central na linha de bloqueio
float x1 = destRect.X + a * cellW;
float x2 = destRect.X + b * cellW;
var rect = Rectangle.FromLTRB((int)x1, (int)(y - 10), (int)x2, (int)(y + 10));
var penWin = new Pen(Color.Lime, 2f);
g.DrawRectangle(penWin, rect);
}
// Status no canto
string status = $"BLOCKED: {blk?.blocked ?? false} ({blk?.reason ?? "none"})";
var font = new Font("Consolas", 10f, FontStyle.Bold);
var col = (blk?.blocked ?? false) ? Color.Red : Color.LimeGreen;
var br = new SolidBrush(col);
var brBg = new SolidBrush(Color.FromArgb(120, 0, 0, 0));
var sz = g.MeasureString(status, font);
var box = new RectangleF(panel.ClientSize.Width - sz.Width - 12, 8, sz.Width + 8, sz.Height + 6);
g.FillRectangle(brBg, box);
g.DrawString(status, font, br, box.X + 4, box.Y + 3);
if (chbSonarDeteccoes.Checked)
{
var _deteccoes = LogsOperacao[idxMomentoAtual].OperadorVisual.Analises.deteccao;
// === DESENHAR DETECÇÕES (bboxes + label/conf) ===
if (_deteccoes != null && _deteccoes.Count > 0)
{
// tamanho da imagem original (a mesma do BackgroundImage)
int imgW = panel.BackgroundImage.Width;
int imgH = panel.BackgroundImage.Height;
// mapeia coordenadas da IMAGEM -> painel (considerando destRect)
float sxImg = (float)destRect.Width / Math.Max(1, imgW);
float syImg = (float)destRect.Height / Math.Max(1, imgH);
RectangleF MapImgRect(double x0, double y0, double x1, double y1)
{
// coords em px da imagem -> px do painel
float X0 = destRect.X + (float)(x0 * sxImg);
float Y0 = destRect.Y + (float)(y0 * syImg);
float X1 = destRect.X + (float)(x1 * sxImg);
float Y1 = destRect.Y + (float)(y1 * syImg);
// normaliza caso entre invertido
float left = Math.Min(X0, X1), top = Math.Min(Y0, Y1);
float right = Math.Max(X0, X1), bottom = Math.Max(Y0, Y1);
return new RectangleF(left, top, right - left, bottom - top);
}
var penBox = new Pen(Color.Lime, 2f); // cor da bbox
var brBg2 = new SolidBrush(Color.FromArgb(180, 0, 0, 0)); // fundo do rótulo
var brText = new SolidBrush(Color.White);
var fontLbl = new Font("Consolas", 9f, FontStyle.Bold);
foreach (var d in _deteccoes)
{
// escolhe fonte das coordenadas: bbox_px (preferível) ou bbox_norm
double x0, y0, x1, y1;
if (d.bbox_norm != null && d.bbox_norm.Count >= 4)
{
x0 = d.bbox_norm[0] * imgW; y0 = d.bbox_norm[1] * imgH;
x1 = d.bbox_norm[2] * imgW; y1 = d.bbox_norm[3] * imgH;
}
else
{
continue; // sem bbox válida
}
// ignora caixas muito pequenas
if (Math.Abs(x1 - x0) < 2 || Math.Abs(y1 - y0) < 2) continue;
// rect no painel
var rect = MapImgRect(x0, y0, x1, y1);
// clipe simples ao destRect (pra não “vazar” fora da imagem)
var inter = RectangleF.Intersect(rect, destRect);
if (inter.Width < 2 || inter.Height < 2) continue;
// desenha bbox
g.DrawRectangle(penBox, inter.X, inter.Y, inter.Width, inter.Height);
// rótulo + confiança
string labelTxt = string.IsNullOrEmpty(d.label) ? $"id:{d.label_id}" : d.label;
string txt = $"{labelTxt} {d.conf:0.00}";
var sz2 = g.MeasureString(txt, fontLbl);
// fundo do rótulo (acima da bbox, se couber; senão, dentro)
float pad = 3f;
float bx = inter.X;
float by = inter.Y - sz2.Height - 2; // acima
if (by < destRect.Top) by = inter.Y + 2; // fallback: dentro da caixa
var box2 = new RectangleF(bx, by, sz2.Width + 2 * pad, sz.Height + 2 * pad);
g.FillRectangle(brBg2, box2);
g.DrawString(txt, fontLbl, brText, box2.X + pad, box2.Y + pad);
}
}
}*/
}
}
}
}

View File

@ -60,9 +60,9 @@ namespace AgroBase.Forms
private async Task tmrLeitura_Tick()
{
var Imu = Variaveis.OperacaoEmAndamento.Sensoriamento.IMU;
AnguloX = -Imu.InclinacaoFrontal;
AnguloY = -Imu.InclinacaoLateral;
AnguloZ = -Imu.Rotacao;
AnguloX = Imu.InclinacaoFrontal;
AnguloY = Imu.InclinacaoLateral;
AnguloZ = Imu.Rotacao;
OrientacaoMagnetica = Imu.RotacaoCorrigida;
AtualizarDadosTela();
@ -225,12 +225,7 @@ namespace AgroBase.Forms
picBussola.Invalidate();
//glControl.Invalidate();
pnlInclinacao.Invalidate();
double agX = (AnguloX + 180) % 360;
if (agX > 180) agX -= 360;
double agY = (AnguloY + 180) % 360;
if (agY > 180) agY -= 360;
visualizador3D.AtualizarAngulos(agX, agY, AnguloZ);
visualizador3D.AtualizarAngulos(AnguloX, AnguloY, AnguloZ);
txtX.Text = AnguloX.ToString("0.00");
txtY.Text = AnguloY.ToString("0.00");

View File

@ -1287,9 +1287,13 @@ namespace AgroBase.Models
Camera.SaveFrames(new List<CameraFrameType>() { CameraFrameType.Rgb, CameraFrameType.Segmentacao }, nome, Caminho);
var cam_data = JsonConvert.DeserializeObject<Dictionary<string, object>>(RedisService.Get(CtxKey.DadosCameras));
if (cam_data.ContainsKey(Camera.Id))
SalvarLog(camera_name, cam_data[Camera.Id], false);
var cameras_conectadas = JsonConvert.DeserializeObject<Dictionary<string, object>>(RedisService.Get(CtxKey.DadosCameras));
bool conectada = cameras_conectadas.ContainsKey(Camera.Id);
if (conectada)
{
var cam_data = JsonConvert.DeserializeObject<Dictionary<string, object>>(RedisService.Get(RedisService.CamKey(Camera.Id)));
SalvarLog(camera_name, cam_data, false);
}
}
}
@ -1307,9 +1311,13 @@ namespace AgroBase.Models
Camera.SaveFrames(new List<CameraFrameType>() { CameraFrameType.Rgb, CameraFrameType.Segmentacao }, nome, Caminho); // CameraFrameType.Heatmap, CameraFrameType.RadarTopDown
var cam_data = JsonConvert.DeserializeObject<Dictionary<string, object>>(RedisService.Get(CtxKey.DadosCameras));
if (cam_data.ContainsKey(Camera.Id))
SalvarLog(Camera.Dispositivo.ToString(), cam_data[Camera.Id], false);
var cameras_conectadas = JsonConvert.DeserializeObject<Dictionary<string, object>>(RedisService.Get(CtxKey.DadosCameras));
bool conectada = cameras_conectadas.ContainsKey(Camera.Id);
if (conectada)
{
var cam_data = JsonConvert.DeserializeObject<Dictionary<string, object>>(RedisService.Get(RedisService.CamKey(Camera.Id)));
SalvarLog(Camera.Dispositivo.ToString(), cam_data, false);
}
}

View File

@ -1,6 +1,7 @@
using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using static AgroBase.Models.Enums;
namespace AgroBase.Models.Operadores
@ -181,6 +182,7 @@ namespace AgroBase.Models.Operadores
//public List<VisualWorkerMessageRadar2DPerfilModel> corredor_seg { get; set; }
public VisualWorkerMessageSegmentacaoSemanticaModel segmentacao { get; set; }
public VisualWorkerMessageMatrizConfiancaModel matriz_confianca { get; set; }
public List<VisualWorkerMessageDeteccaoModel> deteccao { get; set; }
public VisualWorkerMessageAnaliseModel Clone()
{
@ -194,6 +196,7 @@ namespace AgroBase.Models.Operadores
//corredor_seg = new List<VisualWorkerMessageRadar2DPerfilModel>(corredor_seg ?? new List<VisualWorkerMessageRadar2DPerfilModel>()),
segmentacao = segmentacao?.Clone() ?? new VisualWorkerMessageSegmentacaoSemanticaModel(),
matriz_confianca = matriz_confianca?.Clone() ?? new VisualWorkerMessageMatrizConfiancaModel(),
deteccao = deteccao?.Select(x => x.Clone()).ToList() ?? new List<VisualWorkerMessageDeteccaoModel>()
};
}
@ -576,6 +579,28 @@ namespace AgroBase.Models.Operadores
}
}
public class VisualWorkerMessageDeteccaoModel
{
public int label_id { get; set; }
public string label { get; set; }
public double conf { get; set; }
public List<double> bbox_norm { get; set; }
public List<double> bbox_px { get; set; }
public VisualWorkerMessageDeteccaoModel Clone()
{
return new VisualWorkerMessageDeteccaoModel()
{
label_id = label_id,
label = label,
bbox_norm = bbox_norm,
bbox_px = bbox_px,
conf = conf
};
}
}
public enum VisualWorkerCommandType
{
ScriptCarregado = 1,

View File

@ -158,8 +158,9 @@ namespace AgroBase.Services.Operadores
("percentual_tensao_bateria_min", VariaveisEquipamento.PercentualTensaoBateriaMin),
("camera_caminho_id", Variaveis.OperacaoEmAndamento.DispSen?.Dados?.CameraCaminho?.Id ?? ""),
("camera_solo_id", Variaveis.OperacaoEmAndamento.DispSen?.Dados?.CamerasSolo?.FirstOrDefault()?.Id ?? ""),
("path_ia_model_ruas", VersionamentoService.ArquivoModeloStreetDetector.CaminhoCompleto),
("path_ia_labelmap_ruas", VersionamentoService.ArquivoLabelmapStreetDetector.CaminhoCompleto),
("path_ia_model_ruas_seg", VersionamentoService.ArquivoModeloSegStreetDetector.CaminhoCompleto),
("path_ia_labelmap_ruas_seg", VersionamentoService.ArquivoLabelmapSegStreetDetector.CaminhoCompleto),
("path_ia_model_ruas_det", VersionamentoService.ArquivoModeloDetStreetDetector.CaminhoCompleto),
("path_ia_model_ervas", VersionamentoService.ArquivoModeloWeedDetector.CaminhoCompleto),
("path_ia_labelmap_ervas", VersionamentoService.ArquivoModeloLabelmapWeedDetector.CaminhoCompleto),
("angulo_roll_max", VariaveisEquipamento.AnguloInclinacaoRollMax),

View File

@ -1,6 +1,5 @@
using AgroBase.Models;
using AgroBase.Models.Operadores;
using Microsoft.DirectX.DirectInput;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
@ -204,6 +203,18 @@ namespace AgroBase.Services.Operadores
}
catch { /* opcional: log */ }
}
// deteccao (sem re-serializar o token)
var detTok = root["deteccao"];
if (detTok != null)
{
try
{
var det = detTok.ToObject<List<VisualWorkerMessageDeteccaoModel>>();
if (det != null) DadosLeitura.Analises.deteccao = det;
}
catch { /* opcional: log */ }
}
}
public static void ReiniciarLeituraAnalise()
@ -211,7 +222,8 @@ namespace AgroBase.Services.Operadores
RedisService.AtualizarCampos(
CtxKey.DadosWeedWorker,
("analise.segmentacao", new VisualWorkerMessageSegmentacaoSemanticaModel()),
("analise.matriz_confianca", new VisualWorkerMessageMatrizConfiancaModel())
("analise.matriz_confianca", new VisualWorkerMessageMatrizConfiancaModel()),
("analise.deteccao", new List<VisualWorkerMessageDeteccaoModel>())
);
}

View File

@ -22,7 +22,7 @@ namespace AgroBase.Services
public static bool ForcarDownloadArquivos { get; set; } = false;
public static AsyncTaskTimerModel tmrAtualizacaoArquivos;
private static List<VersaoArquivoModel> _ArquivosVersionados { get; set; } = CarregarArquivosVersionadosPadrao();
public static VersaoArquivoModel ArquivoModeloStreetDetector
public static VersaoArquivoModel ArquivoModeloSegStreetDetector
{
get
{
@ -32,7 +32,7 @@ namespace AgroBase.Services
}
}
}
public static VersaoArquivoModel ArquivoLabelmapStreetDetector
public static VersaoArquivoModel ArquivoLabelmapSegStreetDetector
{
get
{
@ -42,6 +42,16 @@ namespace AgroBase.Services
}
}
}
public static VersaoArquivoModel ArquivoModeloDetStreetDetector
{
get
{
lock (_ArquivoLock)
{
return _ArquivosVersionados.Where(x => x.TipoArquivo == TipoArquivoVersionado.ModeloIA_StreetDetector).Skip(2).FirstOrDefault();
}
}
}
public static VersaoArquivoModel ArquivoModeloWeedDetector
{
get

View File

@ -20,7 +20,14 @@
"padded_top_topics_start_index": 0,
"taxonomy_version": 0,
"top_topics_and_observing_domains": [ ]
}, {
"calculation_time": "13399827811771001",
"config_version": 0,
"model_version": "0",
"padded_top_topics_start_index": 0,
"taxonomy_version": 0,
"top_topics_and_observing_domains": [ ]
} ],
"hex_encoded_hmac_key": "40F346D3248C3AFDF2BEE1FE496DBD32F7CED6E5AE98B881ABC421AA7E7B5642",
"next_scheduled_calculation_time": "13399758321059321"
"next_scheduled_calculation_time": "13400432611771207"
}

View File

@ -1,3 +1,3 @@
2025/08/15-13:16:10.784 5274 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/MANIFEST-000001
2025/08/15-13:16:10.790 5274 Recovering log #3
2025/08/15-13:16:10.794 5274 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/000003.log
2025/08/16-13:04:37.147 27f4 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/MANIFEST-000001
2025/08/16-13:04:37.153 27f4 Recovering log #3
2025/08/16-13:04:37.156 27f4 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/000003.log

View File

@ -1,3 +1,3 @@
2025/08/15-10:42:52.375 713c Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/MANIFEST-000001
2025/08/15-10:42:52.380 713c Recovering log #3
2025/08/15-10:42:52.383 713c Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/000003.log
2025/08/16-13:03:08.714 82d8 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/MANIFEST-000001
2025/08/16-13:03:08.720 82d8 Recovering log #3
2025/08/16-13:03:08.725 82d8 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Local Storage\leveldb/000003.log

View File

@ -1 +1 @@
{"net":{"http_server_properties":{"servers":[{"alternative_service":[{"advertised_alpns":["h3"],"expiration":"13399834582100494","port":443,"protocol_str":"quic"}],"anonymization":["DAAAAAcAAABmaWxlOi8vAA==",false,0],"network_stats":{"srtt":30536},"server":"https://tile.openstreetmap.org","supports_spdy":true}],"supports_quic":{"address":"192.168.26.32","used_quic":true},"version":5},"network_qualities":{"CAASABiAgICA+P////8B":"4G","CAESABiAgICA+P////8B":"4G","CAISABiAgICA+P////8B":"4G","CAYSABiAgICA+P////8B":"Offline"}}}
{"net":{"http_server_properties":{"servers":[{"alternative_service":[{"advertised_alpns":["h3"],"expiration":"13399920277588927","port":443,"protocol_str":"quic"}],"anonymization":["DAAAAAcAAABmaWxlOi8vAA==",false,0],"network_stats":{"srtt":19630},"server":"https://tile.openstreetmap.org","supports_spdy":true}],"supports_quic":{"address":"192.168.26.32","used_quic":true},"version":5},"network_qualities":{"CAASABiAgICA+P////8B":"4G","CAESABiAgICA+P////8B":"4G","CAISABiAgICA+P////8B":"3G","CAYSABiAgICA+P////8B":"Offline"}}}

File diff suppressed because one or more lines are too long

View File

@ -1,3 +1,3 @@
2025/08/15-13:21:01.455 5274 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/MANIFEST-000001
2025/08/15-13:21:01.456 5274 Recovering log #3
2025/08/15-13:21:01.459 5274 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/000003.log
2025/08/16-13:35:13.578 27f4 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/MANIFEST-000001
2025/08/16-13:35:13.580 27f4 Recovering log #3
2025/08/16-13:35:13.584 27f4 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/000003.log

View File

@ -1,3 +1,3 @@
2025/08/15-10:44:53.150 713c Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/MANIFEST-000001
2025/08/15-10:44:53.151 713c Recovering log #3
2025/08/15-10:44:53.155 713c Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/000003.log
2025/08/16-13:03:43.169 82d8 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/MANIFEST-000001
2025/08/16-13:03:43.170 82d8 Recovering log #3
2025/08/16-13:03:43.173 82d8 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Session Storage/000003.log

View File

@ -1,3 +1,3 @@
2025/08/15-13:16:10.702 6a74 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/MANIFEST-000001
2025/08/15-13:16:10.703 6a74 Recovering log #7
2025/08/15-13:16:10.704 6a74 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/000007.log
2025/08/16-13:04:37.071 3404 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/MANIFEST-000001
2025/08/16-13:04:37.073 3404 Recovering log #7
2025/08/16-13:04:37.073 3404 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/000007.log

View File

@ -1,3 +1,3 @@
2025/08/15-10:42:52.304 16a4 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/MANIFEST-000001
2025/08/15-10:42:52.306 16a4 Recovering log #7
2025/08/15-10:42:52.306 16a4 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/000007.log
2025/08/16-13:03:08.637 7634 Reusing MANIFEST C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/MANIFEST-000001
2025/08/16-13:03:08.638 7634 Recovering log #7
2025/08/16-13:03:08.638 7634 Reusing old log C:\ZendionInc\agrobot_base\AgroBase\AgroBase\bin\x64\Debug\AgroBase.exe.WebView2\EBWebView\Default\Site Characteristics Database/000007.log

View File

@ -1 +1 @@
139.0.3405.86
139.0.3405.102

File diff suppressed because one or more lines are too long

View File

@ -19,24 +19,33 @@
},
{
"id": 3,
"Arquivo": "model",
"Arquivo": "modelseg",
"Diretorio": "C:\\AgroBaseModels\\Ruas\\",
"Extensao": ".blob",
"Versao": "1_1",
"TipoArquivo": 0,
"ArquivoDownload": "models/street_detector_model-1_1.blob",
"ArquivoDownload": "models/street_detector_model_seg-1_1.blob",
},
{
"id": 4,
"Arquivo": "model",
"Arquivo": "modelseg",
"Diretorio": "C:\\AgroBaseModels\\Ruas\\",
"Extensao": ".txt",
"Versao": "1_1",
"TipoArquivo": 0,
"ArquivoDownload": "models/street_detector_labelmap-1_1.txt"
"ArquivoDownload": "models/street_detector_labelmap_seg-1_1.txt"
},
{
"id": 5,
"Arquivo": "modeldet",
"Diretorio": "C:\\AgroBaseModels\\Ruas\\",
"Extensao": ".blob",
"Versao": "1_0",
"TipoArquivo": 0,
"ArquivoDownload": "models/street_detector_model_det-1_0.blob",
},
{
"id": 6,
"Arquivo": "parametersAtu",
"Diretorio": "Parametros/",
"Extensao": ".par",
@ -45,7 +54,7 @@
"ArquivoDownload": "parameters/parametersAtu-1_1.par",
},
{
"id": 6,
"id": 7,
"Arquivo": "parametersMvd",
"Diretorio": "Parametros/",
"Extensao": ".par",
@ -54,7 +63,7 @@
"ArquivoDownload": "parameters/parametersMvd-2_0.par"
},
{
"id": 7,
"id": 8,
"Arquivo": "parametersSen",
"Diretorio": "Parametros/",
"Extensao": ".par",
@ -63,7 +72,7 @@
"ArquivoDownload": "parameters/parametersSen-1_3.par"
},
{
"id": 8,
"id": 9,
"Arquivo": "pinoutAtu",
"Diretorio": "Parametros/",
"Extensao": ".pin",
@ -72,7 +81,7 @@
"ArquivoDownload": "parameters/pinoutAtu-1_0.pin"
},
{
"id": 9,
"id": 10,
"Arquivo": "pinoutSen",
"Diretorio": "Parametros/",
"Extensao": ".pin",
@ -81,7 +90,7 @@
"ArquivoDownload": "parameters/pinoutSen-1_2.pin"
},
{
"id": 10,
"id": 11,
"Arquivo": "weed_detector_oak",
"Diretorio": "Python\\Scripts\\",
"Extensao": ".py",
@ -90,7 +99,7 @@
"ArquivoDownload": "weed_detector_oak-1_0.py"
},
{
"id": 11,
"id": 12,
"Arquivo": "map_load",
"Diretorio": "Python\\Scripts\\",
"Extensao": ".py",
@ -99,7 +108,7 @@
"ArquivoDownload": "scripts/map_load-1_0.py"
},
{
"id": 12,
"id": 13,
"Arquivo": "map_follow",
"Diretorio": "Python\\Scripts\\",
"Extensao": ".py",
@ -108,7 +117,7 @@
"ArquivoDownload": "scripts/map_follow-1_0.py"
},
{
"id": 13,
"id": 14,
"Arquivo": "gps_viewer",
"Diretorio": "Python\\Scripts\\",
"Extensao": ".py",
@ -117,7 +126,7 @@
"ArquivoDownload": "scripts/gps_viewer-1_0.py"
},
{
"id": 14,
"id": 15,
"Arquivo": "modelo_3d",
"Diretorio": "Python\\Output\\",
"Extensao": ".obj",
@ -126,7 +135,7 @@
"ArquivoDownload": "modelo_3d-1_0.obj"
},
{
"id": 15,
"id": 16,
"Arquivo": "modelo_3d",
"Diretorio": "Python\\Output\\",
"Extensao": ".mtl",

View File

@ -1,221 +1 @@
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"Id": "1",
"Name": "CidadeJardimTerreno2",
"Length": 14.558011415731592,
"Dist1": 14.558011415731592,
"Dist2": 0.0
},
"geometry": {
"id": null,
"type": "LineString",
"coordinates": [
[
-47.395205344,
-22.172559531333334
],
[
-47.395212610166666,
-22.172614638833334
],
[
-47.395219157,
-22.172656417833334
],
[
-47.395223544833335,
-22.1726892105
],
[
-47.39522414098443,
-22.17269369161165
],
[
-47.395225326538004,
-22.172702654611555
]
]
}
},
{
"type": "Feature",
"properties": {
"Id": "2",
"Name": "CidadeJardimTerreno2",
"Length": 14.771318274761821,
"Dist1": 14.558011415731592,
"Dist2": 0.0
},
"geometry": {
"id": null,
"type": "LineString",
"coordinates": [
[
-47.39521090233333,
-22.172708800833334
],
[
-47.395206943666665,
-22.172679811
],
[
-47.395202420666664,
-22.1726491015
],
[
-47.395198865666664,
-22.172615782833333
],
[
-47.395193255833334,
-22.172577132833332
],
[
-47.395192610024395,
-22.17257265769541
],
[
-47.395191325698136,
-22.172563706509337
]
]
}
},
{
"type": "Feature",
"properties": {
"Id": "3",
"Name": "CidadeJardimTerreno2",
"Length": 14.827915524386164,
"Dist1": 14.558011415731592,
"Dist2": 0.0
},
"geometry": {
"id": null,
"type": "LineString",
"coordinates": [
[
-47.3951762925,
-22.172561603
],
[
-47.395180824166665,
-22.172591686166665
],
[
-47.395185745333336,
-22.172623080166666
],
[
-47.395190433,
-22.172656367166667
],
[
-47.395195199,
-22.172693641833334
],
[
-47.39519576904436,
-22.172698125891035
],
[
-47.39519690267159,
-22.172707094716973
]
]
}
},
{
"type": "Feature",
"properties": {
"Id": "4",
"Name": "CidadeJardimTerreno2",
"Length": 14.785159385903514,
"Dist1": 14.558011415731592,
"Dist2": 0.0
},
"geometry": {
"id": null,
"type": "LineString",
"coordinates": [
[
-47.39518293216667,
-22.1727127985
],
[
-47.39517819266667,
-22.172680514833335
],
[
-47.3951732595,
-22.172646752833334
],
[
-47.39516880516667,
-22.1726149155
],
[
-47.39516381233334,
-22.172581167166665
],
[
-47.39516315429932,
-22.172576693573966
],
[
-47.39516184565584,
-22.172567745443878
]
]
}
},
{
"type": "Feature",
"properties": {
"Id": "5",
"Name": "CidadeJardimTerreno2",
"Length": 14.80117692191233,
"Dist1": 14.558011415731592,
"Dist2": 0.0
},
"geometry": {
"id": null,
"type": "LineString",
"coordinates": [
[
-47.395147317833334,
-22.172566031
],
[
-47.395151503166666,
-22.172595452333333
],
[
-47.3951561855,
-22.172628011166665
],
[
-47.39516159866667,
-22.172663757333332
],
[
-47.39516672716667,
-22.172697770833334
],
[
-47.395167397572706,
-22.172702242832194
],
[
-47.39516873082615,
-22.17271118781009
]
]
}
}
]
}
{"type":"FeatureCollection","features":[{"type":"Feature","properties":{"Id":"1","Name":"16_08_2025_13_03_09_Manual","Length":0.0,"Dist1":0.0,"Dist2":0.0},"geometry":{"id":null,"type":"LineString","coordinates":[[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0],[0.0,0.0]]}}]}

View File

@ -17,7 +17,7 @@
<meta name="viewport" content="width=device-width,
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<style>
#map_15b2c6f7832115c94dd9daa84035059e {
#map_8d82a52a75a0022facd97338a9de6951 {
position: relative;
width: 100.0%;
height: 100.0%;
@ -54,14 +54,14 @@
<body>
<div class="folium-map" id="map_15b2c6f7832115c94dd9daa84035059e" ></div>
<div class="folium-map" id="map_8d82a52a75a0022facd97338a9de6951" ></div>
</body>
<script>
var map_15b2c6f7832115c94dd9daa84035059e = L.map(
"map_15b2c6f7832115c94dd9daa84035059e",
var map_8d82a52a75a0022facd97338a9de6951 = L.map(
"map_8d82a52a75a0022facd97338a9de6951",
{
center: [0.0, 0.0],
crs: L.CRS.EPSG3857,
@ -78,7 +78,7 @@
var tile_layer_76df0441e10db36359cf485a7152ff2d = L.tileLayer(
var tile_layer_05c03651f72fbf9663af32ba9eb509d0 = L.tileLayer(
"https://tile.openstreetmap.org/{z}/{x}/{y}.png",
{
"minZoom": 0,
@ -95,7 +95,7 @@
);
tile_layer_76df0441e10db36359cf485a7152ff2d.addTo(map_15b2c6f7832115c94dd9daa84035059e);
tile_layer_05c03651f72fbf9663af32ba9eb509d0.addTo(map_8d82a52a75a0022facd97338a9de6951);
</script>
@ -116,7 +116,7 @@
}
trajeto_json_add({"features": []});
trajeto_json.addTo(map_15b2c6f7832115c94dd9daa84035059e);
trajeto_json.addTo(map_8d82a52a75a0022facd97338a9de6951);
function adicionarGeometria(novaGeometria) {
trajeto_json.addData(novaGeometria);
@ -179,9 +179,9 @@
var marcadorEquipamento = L.marker([0, 0], {
icon: customIcon
}).addTo(map_15b2c6f7832115c94dd9daa84035059e);
}).addTo(map_8d82a52a75a0022facd97338a9de6951);
var marcadorBase = L.marker([0, 0], {}).addTo(map_15b2c6f7832115c94dd9daa84035059e);
var marcadorBase = L.marker([0, 0], {}).addTo(map_8d82a52a75a0022facd97338a9de6951);
var icon = L.AwesomeMarkers.icon(
{"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"}
);
@ -246,7 +246,7 @@
}
if (foco) {
map_15b2c6f7832115c94dd9daa84035059e.setView(novaPosicao, map_15b2c6f7832115c94dd9daa84035059e.getZoom());
map_8d82a52a75a0022facd97338a9de6951.setView(novaPosicao, map_8d82a52a75a0022facd97338a9de6951.getZoom());
}
}
@ -268,7 +268,7 @@
marcadorDinamico.setRotationAngle(angulo);
adicionarCoordenada("Tj", [novaLongitude, novaLatitude]);
map_15b2c6f7832115c94dd9daa84035059e.setView(novaPosicao, map_15b2c6f7832115c94dd9daa84035059e.getZoom());*/
map_8d82a52a75a0022facd97338a9de6951.setView(novaPosicao, map_8d82a52a75a0022facd97338a9de6951.getZoom());*/
});
function calcularOrientacao(P1latitude, P1longitude, P2latitude, P2longitude) {

View File

@ -17,7 +17,7 @@
<meta name="viewport" content="width=device-width,
initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<style>
#map_23f8e35f17470dacda23acd5395a7fac {
#map_fa80b7c1ff2d8431553ba20c387f3aad {
position: relative;
width: 100.0%;
height: 100.0%;
@ -54,16 +54,16 @@
<body>
<div class="folium-map" id="map_23f8e35f17470dacda23acd5395a7fac" ></div>
<div class="folium-map" id="map_fa80b7c1ff2d8431553ba20c387f3aad" ></div>
</body>
<script>
var map_23f8e35f17470dacda23acd5395a7fac = L.map(
"map_23f8e35f17470dacda23acd5395a7fac",
var map_fa80b7c1ff2d8431553ba20c387f3aad = L.map(
"map_fa80b7c1ff2d8431553ba20c387f3aad",
{
center: [-22.172636164916668, -47.395186322185666],
center: [0.0, 0.0],
crs: L.CRS.EPSG3857,
...{
"zoom": 12,
@ -78,7 +78,7 @@
var tile_layer_683b3dff313760b3af581ab3e6a597ea = L.tileLayer(
var tile_layer_b446020bdc934e39b8d676cd95436167 = L.tileLayer(
"https://tile.openstreetmap.org/{z}/{x}/{y}.png",
{
"minZoom": 0,
@ -95,7 +95,7 @@
);
tile_layer_683b3dff313760b3af581ab3e6a597ea.addTo(map_23f8e35f17470dacda23acd5395a7fac);
tile_layer_b446020bdc934e39b8d676cd95436167.addTo(map_fa80b7c1ff2d8431553ba20c387f3aad);
@ -111,7 +111,7 @@
}*/
});
}
function geo_json_1f8972074523b6427449f533ba057bf8_onEachFeature(feature, layer) {
function geo_json_09ba5926a79ad74ce059c256c57c60e9_onEachFeature(feature, layer) {
layer.on({
@ -148,23 +148,23 @@
}*/
});
};
var geo_json_1f8972074523b6427449f533ba057bf8 = L.geoJson(null, {
onEachFeature: geo_json_1f8972074523b6427449f533ba057bf8_onEachFeature,
var geo_json_09ba5926a79ad74ce059c256c57c60e9 = L.geoJson(null, {
onEachFeature: geo_json_09ba5926a79ad74ce059c256c57c60e9_onEachFeature,
...{
}
});
function geo_json_1f8972074523b6427449f533ba057bf8_add (data) {
geo_json_1f8972074523b6427449f533ba057bf8
function geo_json_09ba5926a79ad74ce059c256c57c60e9_add (data) {
geo_json_09ba5926a79ad74ce059c256c57c60e9
.addData(data);
}
geo_json_1f8972074523b6427449f533ba057bf8_add({"features": [{"geometry": {"coordinates": [[-47.395205344, -22.172559531333334], [-47.395212610166666, -22.172614638833334], [-47.395219157, -22.172656417833334], [-47.395223544833335, -22.1726892105], [-47.39522414098443, -22.17269369161165], [-47.395225326538004, -22.172702654611555]], "id": null, "type": "LineString"}, "id": 0, "properties": {"Dist1": 14.558011415731592, "Dist2": 0.0, "Id": "1", "Length": 14.558011415731592, "Name": "CidadeJardimTerreno2"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.39521090233333, -22.172708800833334], [-47.395206943666665, -22.172679811], [-47.395202420666664, -22.1726491015], [-47.395198865666664, -22.172615782833333], [-47.395193255833334, -22.172577132833332], [-47.395192610024395, -22.17257265769541], [-47.395191325698136, -22.172563706509337]], "id": null, "type": "LineString"}, "id": 1, "properties": {"Dist1": 14.558011415731592, "Dist2": 0.0, "Id": "2", "Length": 14.771318274761821, "Name": "CidadeJardimTerreno2"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.3951762925, -22.172561603], [-47.395180824166665, -22.172591686166665], [-47.395185745333336, -22.172623080166666], [-47.395190433, -22.172656367166667], [-47.395195199, -22.172693641833334], [-47.39519576904436, -22.172698125891035], [-47.39519690267159, -22.172707094716973]], "id": null, "type": "LineString"}, "id": 2, "properties": {"Dist1": 14.558011415731592, "Dist2": 0.0, "Id": "3", "Length": 14.827915524386164, "Name": "CidadeJardimTerreno2"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.39518293216667, -22.1727127985], [-47.39517819266667, -22.172680514833335], [-47.3951732595, -22.172646752833334], [-47.39516880516667, -22.1726149155], [-47.39516381233334, -22.172581167166665], [-47.39516315429932, -22.172576693573966], [-47.39516184565584, -22.172567745443878]], "id": null, "type": "LineString"}, "id": 3, "properties": {"Dist1": 14.558011415731592, "Dist2": 0.0, "Id": "4", "Length": 14.785159385903514, "Name": "CidadeJardimTerreno2"}, "type": "Feature"}, {"geometry": {"coordinates": [[-47.395147317833334, -22.172566031], [-47.395151503166666, -22.172595452333333], [-47.3951561855, -22.172628011166665], [-47.39516159866667, -22.172663757333332], [-47.39516672716667, -22.172697770833334], [-47.395167397572706, -22.172702242832194], [-47.39516873082615, -22.17271118781009]], "id": null, "type": "LineString"}, "id": 4, "properties": {"Dist1": 14.558011415731592, "Dist2": 0.0, "Id": "5", "Length": 14.80117692191233, "Name": "CidadeJardimTerreno2"}, "type": "Feature"}], "type": "FeatureCollection"});
geo_json_1f8972074523b6427449f533ba057bf8.setStyle(function(feature) {return feature.properties.style;});
geo_json_09ba5926a79ad74ce059c256c57c60e9_add({"features": [{"geometry": {"coordinates": [[0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0], [0.0, 0.0]], "id": null, "type": "LineString"}, "id": 0, "properties": {"Dist1": 0.0, "Dist2": 0.0, "Id": "1", "Length": 0.0, "Name": "16_08_2025_13_03_09_Manual"}, "type": "Feature"}], "type": "FeatureCollection"});
geo_json_09ba5926a79ad74ce059c256c57c60e9.setStyle(function(feature) {return feature.properties.style;});
geo_json_1f8972074523b6427449f533ba057bf8.addTo(map_23f8e35f17470dacda23acd5395a7fac);
geo_json_09ba5926a79ad74ce059c256c57c60e9.addTo(map_fa80b7c1ff2d8431553ba20c387f3aad);
</script>
@ -185,7 +185,7 @@
}
trajeto_json_add({"features": []});
trajeto_json.addTo(map_23f8e35f17470dacda23acd5395a7fac);
trajeto_json.addTo(map_fa80b7c1ff2d8431553ba20c387f3aad);
function adicionarGeometria(novaGeometria) {
trajeto_json.addData(novaGeometria);
@ -243,7 +243,7 @@
}
trajeto_dinamico_json_add({"features": []});
trajeto_dinamico_json.addTo(map_23f8e35f17470dacda23acd5395a7fac);
trajeto_dinamico_json.addTo(map_fa80b7c1ff2d8431553ba20c387f3aad);
function adicionarGeometriaDinamica(novaGeometria) {
trajeto_dinamico_json.addData(novaGeometria);
@ -296,9 +296,9 @@
var marcadorEquipamento = L.marker([0, 0], {
icon: customIcon
}).addTo(map_23f8e35f17470dacda23acd5395a7fac);
}).addTo(map_fa80b7c1ff2d8431553ba20c387f3aad);
var marcadorBase = L.marker([0, 0], {}).addTo(map_23f8e35f17470dacda23acd5395a7fac);
var marcadorBase = L.marker([0, 0], {}).addTo(map_fa80b7c1ff2d8431553ba20c387f3aad);
var icon = L.AwesomeMarkers.icon(
{"extraClasses": "fa-rotate-0", "icon": "info-sign", "iconColor": "white", "markerColor": "red", "prefix": "glyphicon"}
);
@ -380,7 +380,7 @@
}
if (foco) {
map_23f8e35f17470dacda23acd5395a7fac.setView(novaPosicao, map_23f8e35f17470dacda23acd5395a7fac.getZoom());
map_fa80b7c1ff2d8431553ba20c387f3aad.setView(novaPosicao, map_fa80b7c1ff2d8431553ba20c387f3aad.getZoom());
}
}
@ -397,7 +397,7 @@
function atualizarSelecaoRuas(selecionadas) {
selecionadas = JSON.parse(selecionadas);
RuasSelecionadas = Array.isArray(selecionadas) ? [...selecionadas] : [];
geo_json_1f8972074523b6427449f533ba057bf8.eachLayer(function (layer) {
geo_json_09ba5926a79ad74ce059c256c57c60e9.eachLayer(function (layer) {
if (RuasSelecionadas.includes(parseInt(layer.feature.id))) {
layer.setStyle({ color: 'blue' });
} else {

View File

@ -123,8 +123,8 @@ class IMUCamera(ModuloDiagnosticoBase):
f_exec = 1.0 / (latencia + 1e-9)
ContextoGlobalRedis.atualizar_ctx_dict(
ContextoGlobalRedis.ModKey(T_Code.Imu),
roll=round(roll, 2),
pitch=round(pitch, 2),
roll=round(roll, 2), # lateral
pitch=round(-pitch, 2), # frontal
yaw=round(yaw, 2),
vel_mps=round(velocidade_mps, 3),
timestamp=t1,

View File

@ -72,14 +72,14 @@ def load_seg_config(force_reload=False):
# "kernel_morf": 3
# }
_CONFIG_CACHE = {
"debug_visual": True,
"debug_visual": False,
"ia_roi_begin": 0.0,
"ia_roi_size": 1.0,
"ia_resolution": [512,288],
"det_every_n": 1,
}
_CONFIG_CACHE["ia_model_path"] = ContextoGlobalRedis.get_equipamento().get("path_ia_model_ruas", "C:/AgroBaseModels/Ruas/model-1_1.blob")
_CONFIG_CACHE["ia_labelmap_path"] = ContextoGlobalRedis.get_equipamento().get("path_ia_labelmap_ruas", "C:/AgroBaseModels/Ruas/model-1_1.txt")
_CONFIG_CACHE["ia_model_path"] = ContextoGlobalRedis.get_equipamento().get("path_ia_model_ruas_seg", "C:/AgroBaseModels/Ruas/model-1_1.blob")
_CONFIG_CACHE["ia_labelmap_path"] = ContextoGlobalRedis.get_equipamento().get("path_ia_labelmap_ruas_seg", "C:/AgroBaseModels/Ruas/model-1_1.txt")
return _CONFIG_CACHE
@ -94,7 +94,6 @@ def load_det_config():
"ia_resolution": [300,300],
"det_every_n": 3,
"ia_conf": 0.5,
"ia_model_path": "C:\\AgroBaseModels\\Ruas\\det_3.blob",
"classes": [
"background",
"aeroplane","bicycle","bird","boat","bottle",
@ -103,5 +102,6 @@ def load_det_config():
"pottedplant","sheep","sofa","train","tvmonitor",
]
}
_CONFIG_DET["ia_model_path"] = ContextoGlobalRedis.get_equipamento().get("path_ia_model_ruas_det", "C:/AgroBaseModels/Ruas/modeldet-1_0.blob")
return _CONFIG_DET