Yuxiang-Ma / 2.12-Hololens2

Unity project for Hololens2
1 stars 0 forks source link

implement displaying images #6

Closed young-j-park closed 1 year ago

young-j-park commented 1 year ago

closes #3

young-j-park commented 1 year ago

Can anyone please test whether the code works in your environment? Note that you need to make a directory and put the sample image.

young-j-park commented 1 year ago

If you want to generate image with the python module, you can generate the dummy data with the following code:

import datetime
from time import sleep

import numpy as np

dt = 1.0

while True:
    t = datetime.datetime.now(tz=datetime.timezone.utc).timestamp()

    f = np.sin(t)
    d = np.cos(t)

    with open('./ur5_force.csv', 'a') as file:
        file.write(f'{t}, {f}\n')

    with open('./ur5_displacement.csv', 'a') as file:
        file.write(f'{t}, {d}\n')

    sleep(dt)