Skip to content

Instantly share code, notes, and snippets.

@donghee
donghee / ai_avatar_gradio.py
Last active May 8, 2024 11:31
Testing AI avtar project using Gradio
import sqlite3
import gradio as gr
import pandas as pd
import random
from apscheduler.schedulers.background import BackgroundScheduler
DB_FILE = "./survey.db"
db = sqlite3.connect(DB_FILE)
try:
@donghee
donghee / robot.cpp
Last active May 5, 2024 06:25
Robot driving with gnuplot
// @file main.cpp
// @author Donghee Park
//
// Copyright (c) 2024 Donghee Park, all rights reserved
#include <cstdlib>
#include <fstream>
#include <iostream>
#include <unistd.h>
#include <math.h>
#define ANALOG_READ 'a'
#define GET_BAUDRATE 'b'
#define PIN_MODE 'c'
#define DIGITAL_READ 'd'
#define READ_ENCODERS 'e'
#define MOTOR_SPEEDS 'm'
#define MOTOR_POSITIONS 'p'
#define MOTOR_RAW_PWM 'o'
//#define PING 'p'
#define RESET_ENCODERS 'r'
@donghee
donghee / client.js
Last active July 1, 2023 10:34
Ground Station: Transmit the joystick command to the robot via WebRTC data channel https://www.youtube.com/watch?v=d-2WEI0uTZA
var pc = null;
var localVideo = document.querySelector("video#localVideo");
var serverVideo = document.querySelector("video#serverVideo");
navigator.mediaDevices
.getUserMedia({
video: {
height: 360,
width: 480,
},
// @file main.cpp
// @author Donghee Park
//
// Copyright (c) 2023 Donghee Park, all rights reserved
#include <iostream>
class Marine {
int hp;
int coord_x, coord_y;
int damage;
import carla
import random
client = carla.Client('127.0.0.1', 2000)
client.set_timeout(2.0)
world = client.get_world()
people = []
for i in range(2):
@donghee
donghee / install-mavproxy-service.md
Last active September 22, 2022 06:40
install mavproxy service

mavproxy 설치하기

  1. 다음 파일을 /home/agx 디렉토리에 복사
  • mavproxy.service, run-mavproxy.sh, mavproxy.sh

mavproxy.service

@donghee
donghee / hpc.cpp
Last active February 14, 2023 17:49
hybrid power control in mbed 2
#include "mbed.h"
DigitalOut power_out_led(D11);
DigitalOut mppt_led(D12);
DigitalOut fuel_led(D13);
DigitalOut fuel_off(D7);
DigitalOut batt_off(D9);
AnalogIn power_out_volt(A0);
@donghee
donghee / readme.md
Created June 13, 2022 14:09
KakuteH7에 ardupilot bootloader 올리기

KakuteH7에 ardupilot bootloader 설치하기

준비물:

  • KakuteH7 하드웨어,
  • KakuteH7용 ardupilot bootloader(KakuteH7_AP_Bootloader.bin)
  • dfu-util-static.exe
  • zadig
  1. 원도우에 KakuteH7하드웨어 libusb 드라이버 설정