Skip to content

Instantly share code, notes, and snippets.

View Ar-Ray-code's full-sized avatar
🥰
🍓🥕🎠🐢🤖

Ar-Ray Ar-Ray-code

🥰
🍓🥕🎠🐢🤖
View GitHub Profile
// ==================================================================
// program : param.cpp
// author: Ar-Ray (https://github.com/Ar-Ray-code)
// Date: 2021-08-15
// License: Apache License 2.0
// ==================================================================
#include <rclcpp/rclcpp.hpp>
#include <std_msgs/msg/int32.hpp>
class param_example:public rclcpp::Node
@Ar-Ray-code
Ar-Ray-code / base.launch.py
Created March 23, 2022 04:56
launch_launch: Sample program to call a launch file from a launch file (https://ar-ray.hatenablog.com/entry/2021/08/15/203449)
import launch
import launch_ros.actions
def generate_launch_description():
param0 = launch.substitutions.LaunchConfiguration('param0', default="0")
param1 = launch.substitutions.LaunchConfiguration('param1', default="0")
param2 = launch.substitutions.LaunchConfiguration('param2', default="0")
param3 = launch.substitutions.LaunchConfiguration('param3', default="0")
argment0 = launch.actions.DeclareLaunchArgument("param0", default_value="1")
#!/bin/python3
# ===========================
# Ar-Ray-code 2022
# https://gist.github.com/Ar-Ray-code/ae1a68006ed304ea52b617f991aa3ec2
# ===========================
from PySide2.QtWidgets import QApplication, QWidget, QFileDialog
import sys
import argparse
@Ar-Ray-code
Ar-Ray-code / joy2cursor.cpp
Last active March 14, 2022 15:49
JoyStick(PS5)の左ジョイスティックをマウスカーソルと連動させる練習用プログラム
#include <iostream>
#include <fcntl.h>
#include <unistd.h>
#include <X11/Xlib.h>
// #include <X11/Xutil.h>
#include <linux/joystick.h>
#define JOY_DEV "/dev/input/js0"
@Ar-Ray-code
Ar-Ray-code / T265Realsense2Box.cs
Created February 3, 2022 07:47
RealSense T265の rs_t265.launch.pyのオドメトリ出力をros2-for-unity経由でGameObjectに伝えるだけのc#スクリプト
using System;
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace ROS2
{
/// <summary>
# src : https://gist.github.com/YashasSamaga/e2b19a6807a13046e399f4bc3cca3a49#file-yolov4-py
import cv2
import time
CONFIDENCE_THRESHOLD = 0.3
NMS_THRESHOLD = 0.4
COLORS = [(0, 255, 255), (255, 255, 0), (0, 255, 0), (255, 0, 0)]
class_names = []