Skip to content

Instantly share code, notes, and snippets.

View atotto's full-sized avatar
🌏
Working from home

Ato Araki atotto

🌏
Working from home
View GitHub Profile
@atotto
atotto / apriltag_video_capture.py
Last active March 27, 2024 15:41
apriltag video capture example
# https://github.com/AprilRobotics/apriltag
# example image: https://github.com/AprilRobotics/apriltag-imgs/blob/master/tagStandard41h12/mosaic.png
import cv2
from apriltag import apriltag
cam = cv2.VideoCapture(0)
cv2.namedWindow("detections")
img_counter = 0
@atotto
atotto / ros_odometry_publisher_example.py
Last active November 8, 2023 10:15
Publishing Odometry Information over ROS (python)
#!/usr/bin/env python
import math
from math import sin, cos, pi
import rospy
import tf
from nav_msgs.msg import Odometry
from geometry_msgs.msg import Point, Pose, Quaternion, Twist, Vector3
@atotto
atotto / firebase_idtoken_test.go
Created November 27, 2018 06:11
Firebase generate user id token
package hoge
import (
"bytes"
"context"
"encoding/json"
"fmt"
"io/ioutil"
"net/http"
"os"
@atotto
atotto / ssh.go
Last active August 11, 2023 02:43
golang ssh terminal client
package main
import (
"context"
"flag"
"fmt"
"log"
"os"
"os/signal"
"syscall"
@atotto
atotto / google_drive_create_file_example.go
Created June 6, 2016 06:57
google drive example (v3 create file)
package main
import (
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
"net/url"
"os"
@atotto
atotto / ros_laser_scanner_example.py
Last active February 20, 2023 21:40
Publishing Sensor Streams Over ROS (python)
#!/usr/bin/env python
import rospy
from sensor_msgs.msg import LaserScan
rospy.init_node('laser_scan_publisher')
scan_pub = rospy.Publisher('scan', LaserScan, queue_size=50)
num_readings = 100
@atotto
atotto / example_google-cloud-vision_test.go
Created August 13, 2016 07:42
google cloud vision golang example
package gcv_test
import (
"encoding/base64"
"encoding/json"
"fmt"
"io/ioutil"
"log"
"net/http"
@atotto
atotto / mqtt_test.go
Created January 25, 2017 09:02
github.com/eclipse/paho.mqtt.golang example
package mqtt_test
import (
"sync"
"testing"
mqtt "github.com/eclipse/paho.mqtt.golang"
)
func TestMqttPubSub(t *testing.T) {
@atotto
atotto / dash_button_server.go
Created July 17, 2017 08:51
Amazon Dash Button Server
package main
import (
"log"
"net"
"github.com/google/gopacket"
"github.com/google/gopacket/layers"
)
@atotto
atotto / chan_test.go
Created March 4, 2014 09:13
golang channel benchmark
package chan_test
import (
"testing"
)
func BenchmarkStructChan(b *testing.B) {
ch := make(chan struct{})
go func() {
for {