diff --git a/config/70-sensors.rules b/config/70-sensors.rules index 750f68f..161387c 100644 --- a/config/70-sensors.rules +++ b/config/70-sensors.rules @@ -1 +1,21 @@ -SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ACTION=="add", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", MODE="666", SYMLINK+="ZLAC8015D", GROUP="dialout" +# Copy this file to /etc/udev/rules.d/ + +# SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ACTION=="add", ATTRS{idVendor}=="1a86", ATTRS{idProduct}=="7523", MODE="666", SYMLINK+="ZLAC8015D", GROUP="dialout" +SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ACTION=="add", ATTRS{idVendor}=="10c4", ATTRS{idProduct}=="ea60", MODE="666", SYMLINK+="ZLAC8015D", GROUP="dialout" +SUBSYSTEMS=="usb", KERNEL=="ttyACM[0-9]*", ACTION=="add", ATTRS{idVendor}=="15d1", ATTRS{idProduct}=="0000", MODE="666", SYMLINK+="sensors/hokuyo_urg", GROUP="dialout" +SUBSYSTEMS=="usb", KERNEL=="ttyACM[0-9]*", ACTION=="add", ATTRS{idVendor}=="2886", ATTRS{idProduct}=="802f", MODE="666", SYMLINK+="sensors/imu", GROUP="dialout" + + + +# igvc2022 +# SUBSYSTEMS=="usb", KERNEL=="ttyACM[0-9]*", ACTION=="add", ATTRS{idVendor}=="15d1", ATTRS{idProduct}=="0000", MODE="666", SYMLINK+="sensors/hokuyo_urg", GROUP="dialout" +# SUBSYSTEMS=="usb", KERNEL=="ttyACM[0-9]*", ACTION=="add", ATTRS{idVendor}=="03eb", ATTRS{idProduct}=="6119", MODE="666", SYMLINK+="sensors/icart-mini", GROUP="dialout" +# SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ACTION=="add", ATTRS{product}=="FT232R USB UART", MODE="666", SYMLINK+="sensors/ftdi%n", GROUP="dialout" +# SUBSYSTEMS=="usb", KERNEL=="ttyACM[0-9]*", ACTION=="add", ATTRS{idVendor}=="1546", ATTRS{idProduct}=="01a8", MODE="666", SYMLINK+="sensors/rtkgps", GROUP="dialout" +# SUBSYSTEMS=="usb", KERNEL=="ttyACM[0-9]*", ACTION=="add", ATTRS{idVendor}=="1546", ATTRS{idProduct}=="01a9", MODE="666", SYMLINK+="sensors/gps", GROUP="dialout" +# SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", MODE="666", SYMLINK+="sensors/jg35fd", GROUP="dialout" +# SUBSYSTEMS=="usb", KERNEL=="ttyUSB[0-9]*", ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6015", MODE="666", SYMLINK+="sensors/LED", GROUP="dialout" +# SUBSYSTEMS=="usb", KERNEL=="video2", ACTION=="add", ATTRS{idVendor}=="2e1a", ATTRS{idProduct}=="1000", MODE="666", SYMLINK+="sensors/insta360_air", GROUP="dialout" +# SUBSYSTEMS=="usb", KERNEL=="ttyACM[0-9]*", ACTION=="add", ATTRS{idVendor}=="2341", ATTRS{idProduct}=="0043", MODE="666", SYMLINK+="arduino", GROUP="dialout" +# SUBSYSTEMS=="usb", KERNEL=="ttyACM[0-9]*", ACTION=="add", ATTRS{idVendor}=="2886", ATTRS{idProduct}=="802f", MODE="666", SYMLINK+="sensors/imu", GROUP="dialout" +# ACTION=="add", ATTRS{idVendor}=="05ca", ATTRS{idProduct}=="2711",MODE="666" diff --git a/run.sh b/run.sh new file mode 100755 index 0000000..f3ba96f --- /dev/null +++ b/run.sh @@ -0,0 +1,23 @@ +if [ -n "$1" ]; then + TAG=$1 +else + read REPOSITORY TAG ID CREATED SIZE < <(docker images | grep bvbnatsu) +fi + +echo "Starting bvbnatsu/tsukuba2022:$TAG" + +docker run \ + -p 6080:80 \ + -p 2222:22 \ + -p 10940:10940 \ + -p 2368:2368/udp \ + -p 8308:8308/udp \ + --shm-size=512m \ + -e HOME=/home/ubuntu -e SHELL=/bin/bash \ + --device /dev/ZLAC8015D:/dev/ZLAC8015D:mwr \ + --device /dev/sensors/hokuyo_urg:/dev/sensors/hokuyo_urg:mwr \ + --device /dev/sensors/imu:/dev/sensors/imu:mwr \ + --device /dev/input/js0:/dev/input/js0:mwr \ + --entrypoint '/startup.sh' bvbnatsu/tsukuba2022:$TAG + + #-e RESOLUTION=1920x1080 diff --git a/runLite.sh b/runLite.sh index e317266..e0408d3 100755 --- a/runLite.sh +++ b/runLite.sh @@ -1,7 +1,7 @@ if [ -n "$1" ]; then - TAG=$1 +TAG=$1 else - read REPOSITORY TAG ID CREATED SIZE < <(docker images | grep bvbnatsu) +read REPOSITORY TAG ID CREATED SIZE < <(docker images | grep bvbnatsu) fi echo "Starting bvbnatsu/tsukuba2022:$TAG" @@ -18,3 +18,5 @@ --shm-size=512m \ --entrypoint '/startup.sh'\ bvbnatsu/tsukuba2022:$TAG + + #-e RESOLUTION=1920x1080 \ diff --git a/startnet.sh b/startnet.sh new file mode 100755 index 0000000..6bb96c1 --- /dev/null +++ b/startnet.sh @@ -0,0 +1,3 @@ +sudo ifconfig enp3s0 192.168.3.1 +sudo route add -host 192.168.3.11 gw 192.168.3.1 enp3s0 +sudo route add -host 192.168.3.201 gw 192.168.3.1 enp3s0 diff --git a/velodyne.py b/velodyne.py new file mode 100755 index 0000000..d00ce84 --- /dev/null +++ b/velodyne.py @@ -0,0 +1,10 @@ +#!/usr/bin/env python3 +import subprocess +import time + +try: + while True: + subprocess.run(["bash", "/home/kbkn/tsukuba2022/orange2022/startnet.sh"]) + time.sleep(2.0) +except KeyboardInterrupt: + print("\nFinished")