first commit

This commit is contained in:
dykim 2024-05-29 18:58:46 +09:00
commit 9e0e90960d
183 changed files with 1263045 additions and 0 deletions

23
acquisition_config.json Executable file
View File

@ -0,0 +1,23 @@
{
"amqp_url": "127.0.0.1",
"amqp_port": 5672,
"amqp_vhost": "/",
"amqp_id": "username",
"amqp_pw": "password",
"amqp_queue": "gseps-mq",
"amqp_ReadyQ": "gseps-ready",
"AccessKey": "AKIAQB3AM4WPR2CHIIH4",
"SecretKey": "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",
"Boto3SignatureVersion": "s3v4",
"Boto3RegionName": "ap-northeast-2",
"gseps_stage_bucket":"stage-gs-eps-frontend",
"BucketKey": "sdt/mv_bottom_ash_particle_size",
"S3BucketName": "gseps-data",
"image_save_path": "/home/sdt/Workspace/gseps-test/image_bucket",
"laser_save_path": "/home/sdt/Workspace/gseps_test/laser_value",
"fail_log_file": "/home/sdt/Workspace/gseps_edge/image_acquisition/logs/fail_message.log",
"success_log_file": "/home/sdt/Workspace/gseps_edge/image_acquisition/logs/acquisition.log",
"capture_single_time_interval": 1,
"capture_batch_time_interval": 120,
"laser_device_path": "/dev/ttyS0"
}

24
acquisition_config.json.bk Executable file
View File

@ -0,0 +1,24 @@
{
"amqp_url": "25.5.252.53",
"amqp_port": 5672,
"amqp_vhost": "/",
"amqp_id": "sdt",
"amqp_pw": "251327",
"amqp_queue": "gseps-mq",
"amqp_ReadyQ": "gseps-ready",
"Minio_url": "http://25.5.252.53:9000",
"AccessKey": "AKIAQB3AM4WPR2CHIIH4",
"SecretKey": "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",
"Boto3SignatureVersion": "s3v4",
"Boto3RegionName": "ap-northeast-2",
"gseps_stage_bucket":"stage-gs-eps-frontend",
"BucketKey": "sdt/mv_bottom_ash_particle_size",
"S3BucketName": "gseps-data",
"image_save_path": "/home/sdt/Workspace/gseps-test/image_bucket/",
"fail_log_file": "/home/sdt/Workspace/gseps_edge/image_acquisition/logs/fail_message.log",
"success_log_file": "/home/sdt/Workspace/gseps_edge/image_acquisition/logs/acquisition.log",
"capture_single_time_interval": 1,
"capture_batch_time_interval": 120,
"cam2_device_path": "/dev/v4l/by-path/pci-0000:00:14.0-usb-0:2:1.0-video-index0",
"laser_device_path": "/dev/serial/by-path/pci-0000:00:14.0-usb-0:1:1.0-port0"
}

23
acquisition_config_install.json Executable file
View File

@ -0,0 +1,23 @@
{
"amqp_url": "25.10.82.120",
"amqp_port": 5672,
"amqp_vhost": "/",
"amqp_id": "sdt",
"amqp_pw": "251327",
"amqp_queue": "gseps-mq",
"amqp_ReadyQ": "gseps-ready",
"AccessKey": "AKIAQB3AM4WPR2CHIIH4",
"SecretKey": "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",
"Boto3SignatureVersion": "s3v4",
"Boto3RegionName": "ap-northeast-2",
"gseps_stage_bucket":"stage-gs-eps-frontend",
"BucketKey": "sdt/mv_bottom_ash_particle_size",
"S3BucketName": "gseps-data",
"image_save_path": "/home/sdt/Workspace/gseps_edge/image_acquisition/capture/",
"laser_save_path": "/home/sdt/Workspace/gseps_edge/laser/laser_value",
"fail_log_file": "/home/sdt/Workspace/gseps_edge/image_acquisition/logs/fail_message.log",
"success_log_file": "/home/sdt/Workspace/gseps_edge/image_acquisition/logs/acquisition.log",
"capture_single_time_interval": 1,
"capture_batch_time_interval": 120,
"laser_device_path": "/dev/ttyS0"
}

8
config.json Normal file
View File

@ -0,0 +1,8 @@
{
"appId": "2674b0bc-77c3-4342-b111-ec9d7515b438",
"topic": "performance",
"host": {
"address": "192.168.100.200",
"hostname": "sdt"
}
}

View File

@ -0,0 +1,11 @@
[Unit]
Description=gseps-image-acquisition
[Service]
ExecStart=/home/sdt/miniconda3/bin/python main.py
Restart=always
RestartSec=10
WorkingDirectory=/home/sdt/Workspace/gseps-test
[Install]
WantedBy=multi-user.target

10
install.sh Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash
set -e
sudo sed -i "s/appName/$1_$2/g" /usr/local/sdt/app/$1_$2/gseps-image-acquisition.service
sudo sed -i "s/appIDvalue/$2/g" /usr/local/sdt/app/$1_$2/config.json
sudo cp /usr/local/sdt/app/$1_$2/gseps-image-acquisition.service /etc/systemd/system/$1.service
sudo systemctl start $1
sudo systemctl enable $1

30
laser_test.py Normal file
View File

@ -0,0 +1,30 @@
import time
import serial
def hex_to_int(data):
data_length = data[2]
hex_distance = data[3:3+data_length]
return int.from_bytes(hex_distance, byteorder='big')
for i in range(1000):
ser = serial.Serial(
port="/dev/ttyS0",
baudrate=19200,
timeout=1,
bytesize=serial.EIGHTBITS,
parity=serial.PARITY_NONE,
stopbits=serial.STOPBITS_ONE
)
req = b'\x01\x04\x00\x00\x00\x01\x31\xca'
time.sleep(0.3)
ser.write(req)
result = ser.read(6)
distance = hex_to_int(result)
print(f'Laser Distance: {distance}mm')
ser.close()

1057
laser_value/0207-19.csv Normal file

File diff suppressed because it is too large Load Diff

7392
laser_value/0207-20.csv Normal file

File diff suppressed because it is too large Load Diff

7405
laser_value/0207-21.csv Normal file

File diff suppressed because it is too large Load Diff

7404
laser_value/0207-22.csv Normal file

File diff suppressed because it is too large Load Diff

7132
laser_value/0207-23.csv Normal file

File diff suppressed because it is too large Load Diff

7092
laser_value/0208-00.csv Normal file

File diff suppressed because it is too large Load Diff

7150
laser_value/0208-01.csv Normal file

File diff suppressed because it is too large Load Diff

7165
laser_value/0208-02.csv Normal file

File diff suppressed because it is too large Load Diff

7157
laser_value/0208-03.csv Normal file

File diff suppressed because it is too large Load Diff

6806
laser_value/0208-04.csv Normal file

File diff suppressed because it is too large Load Diff

7167
laser_value/0208-05.csv Normal file

File diff suppressed because it is too large Load Diff

7175
laser_value/0208-06.csv Normal file

File diff suppressed because it is too large Load Diff

7162
laser_value/0208-07.csv Normal file

File diff suppressed because it is too large Load Diff

7154
laser_value/0208-08.csv Normal file

File diff suppressed because it is too large Load Diff

7172
laser_value/0208-09.csv Normal file

File diff suppressed because it is too large Load Diff

7171
laser_value/0208-10.csv Normal file

File diff suppressed because it is too large Load Diff

6949
laser_value/0208-11.csv Normal file

File diff suppressed because it is too large Load Diff

6746
laser_value/0208-12.csv Normal file

File diff suppressed because it is too large Load Diff

7173
laser_value/0208-13.csv Normal file

File diff suppressed because it is too large Load Diff

7209
laser_value/0208-14.csv Normal file

File diff suppressed because it is too large Load Diff

7400
laser_value/0208-15.csv Normal file

File diff suppressed because it is too large Load Diff

7354
laser_value/0208-16.csv Normal file

File diff suppressed because it is too large Load Diff

7116
laser_value/0208-17.csv Normal file

File diff suppressed because it is too large Load Diff

7435
laser_value/0208-18.csv Normal file

File diff suppressed because it is too large Load Diff

7445
laser_value/0208-19.csv Normal file

File diff suppressed because it is too large Load Diff

7442
laser_value/0208-20.csv Normal file

File diff suppressed because it is too large Load Diff

7444
laser_value/0208-21.csv Normal file

File diff suppressed because it is too large Load Diff

7437
laser_value/0208-22.csv Normal file

File diff suppressed because it is too large Load Diff

7443
laser_value/0208-23.csv Normal file

File diff suppressed because it is too large Load Diff

7440
laser_value/0209-00.csv Normal file

File diff suppressed because it is too large Load Diff

7405
laser_value/0209-01.csv Normal file

File diff suppressed because it is too large Load Diff

7440
laser_value/0209-02.csv Normal file

File diff suppressed because it is too large Load Diff

7436
laser_value/0209-03.csv Normal file

File diff suppressed because it is too large Load Diff

7439
laser_value/0209-04.csv Normal file

File diff suppressed because it is too large Load Diff

7436
laser_value/0209-05.csv Normal file

File diff suppressed because it is too large Load Diff

7434
laser_value/0209-06.csv Normal file

File diff suppressed because it is too large Load Diff

7436
laser_value/0209-07.csv Normal file

File diff suppressed because it is too large Load Diff

7434
laser_value/0209-08.csv Normal file

File diff suppressed because it is too large Load Diff

7444
laser_value/0209-09.csv Normal file

File diff suppressed because it is too large Load Diff

7442
laser_value/0209-10.csv Normal file

File diff suppressed because it is too large Load Diff

7447
laser_value/0209-11.csv Normal file

File diff suppressed because it is too large Load Diff

7420
laser_value/0209-12.csv Normal file

File diff suppressed because it is too large Load Diff

7417
laser_value/0209-13.csv Normal file

File diff suppressed because it is too large Load Diff

7419
laser_value/0209-14.csv Normal file

File diff suppressed because it is too large Load Diff

7414
laser_value/0209-15.csv Normal file

File diff suppressed because it is too large Load Diff

7426
laser_value/0209-16.csv Normal file

File diff suppressed because it is too large Load Diff

7421
laser_value/0209-17.csv Normal file

File diff suppressed because it is too large Load Diff

7423
laser_value/0209-18.csv Normal file

File diff suppressed because it is too large Load Diff

7403
laser_value/0209-19.csv Normal file

File diff suppressed because it is too large Load Diff

7417
laser_value/0209-20.csv Normal file

File diff suppressed because it is too large Load Diff

7409
laser_value/0209-21.csv Normal file

File diff suppressed because it is too large Load Diff

7413
laser_value/0209-22.csv Normal file

File diff suppressed because it is too large Load Diff

7411
laser_value/0209-23.csv Normal file

File diff suppressed because it is too large Load Diff

7419
laser_value/0210-00.csv Normal file

File diff suppressed because it is too large Load Diff

7404
laser_value/0210-01.csv Normal file

File diff suppressed because it is too large Load Diff

7429
laser_value/0210-02.csv Normal file

File diff suppressed because it is too large Load Diff

7428
laser_value/0210-03.csv Normal file

File diff suppressed because it is too large Load Diff

7433
laser_value/0210-04.csv Normal file

File diff suppressed because it is too large Load Diff

7430
laser_value/0210-05.csv Normal file

File diff suppressed because it is too large Load Diff

7428
laser_value/0210-06.csv Normal file

File diff suppressed because it is too large Load Diff

7425
laser_value/0210-07.csv Normal file

File diff suppressed because it is too large Load Diff

7424
laser_value/0210-08.csv Normal file

File diff suppressed because it is too large Load Diff

7419
laser_value/0210-09.csv Normal file

File diff suppressed because it is too large Load Diff

7432
laser_value/0210-10.csv Normal file

File diff suppressed because it is too large Load Diff

7432
laser_value/0210-11.csv Normal file

File diff suppressed because it is too large Load Diff

7434
laser_value/0210-12.csv Normal file

File diff suppressed because it is too large Load Diff

7420
laser_value/0210-13.csv Normal file

File diff suppressed because it is too large Load Diff

7418
laser_value/0210-14.csv Normal file

File diff suppressed because it is too large Load Diff

7422
laser_value/0210-15.csv Normal file

File diff suppressed because it is too large Load Diff

7415
laser_value/0210-16.csv Normal file

File diff suppressed because it is too large Load Diff

7417
laser_value/0210-17.csv Normal file

File diff suppressed because it is too large Load Diff

7412
laser_value/0210-18.csv Normal file

File diff suppressed because it is too large Load Diff

7448
laser_value/0210-19.csv Normal file

File diff suppressed because it is too large Load Diff

7440
laser_value/0210-20.csv Normal file

File diff suppressed because it is too large Load Diff

7440
laser_value/0210-21.csv Normal file

File diff suppressed because it is too large Load Diff

7444
laser_value/0210-22.csv Normal file

File diff suppressed because it is too large Load Diff

7448
laser_value/0210-23.csv Normal file

File diff suppressed because it is too large Load Diff

7442
laser_value/0211-00.csv Normal file

File diff suppressed because it is too large Load Diff

7413
laser_value/0211-01.csv Normal file

File diff suppressed because it is too large Load Diff

7447
laser_value/0211-02.csv Normal file

File diff suppressed because it is too large Load Diff

7450
laser_value/0211-03.csv Normal file

File diff suppressed because it is too large Load Diff

7454
laser_value/0211-04.csv Normal file

File diff suppressed because it is too large Load Diff

7457
laser_value/0211-05.csv Normal file

File diff suppressed because it is too large Load Diff

7459
laser_value/0211-06.csv Normal file

File diff suppressed because it is too large Load Diff

7459
laser_value/0211-07.csv Normal file

File diff suppressed because it is too large Load Diff

7452
laser_value/0211-08.csv Normal file

File diff suppressed because it is too large Load Diff

7454
laser_value/0211-09.csv Normal file

File diff suppressed because it is too large Load Diff

7457
laser_value/0211-10.csv Normal file

File diff suppressed because it is too large Load Diff

7454
laser_value/0211-11.csv Normal file

File diff suppressed because it is too large Load Diff

7452
laser_value/0211-12.csv Normal file

File diff suppressed because it is too large Load Diff

7449
laser_value/0211-13.csv Normal file

File diff suppressed because it is too large Load Diff

7444
laser_value/0211-14.csv Normal file

File diff suppressed because it is too large Load Diff

7443
laser_value/0211-15.csv Normal file

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More