This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
/// <sammary> | |
/// オリジナルライトセイバーを実装する Lv02 | |
/// </sammary> | |
public class OVRLightSaber : CustomOVRGrabbable { | |
[SerializeField] | |
protected GameObject m_blade; // 光刃 z方向に長い | |
protected PhysicalLaserPointer m_laser;// 光刃(LineRenderer based)用クラス |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEngine; | |
/// <sammary> | |
/// オリジナルライトセイバーを実装する Lv01 | |
/// </sammary> | |
public class OVRLightSaber : CustomOVRGrabbable { | |
protected PhysicalLaserPointer m_laser;// 光刃用クラス | |
// 手離したら光刃をOFFにする |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
using UnityEngine.Events; | |
public class CustomOVRGrabbable : OVRGrabbable, IfGrabbable { | |
[SerializeField] | |
protected Transform m_bodyTrans; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This script is based on the following discussion. | |
# https://blenderartists.org/t/how-do-i-create-a-simple-curve-in-python/477260/5 | |
import bpy | |
import numpy as np | |
import math | |
import mathutils | |
def Lissajous(t, a=1, b=2, delta=0): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
import numpy as np | |
import math | |
import mathutils | |
def WaveXY(x, y, x0=0, y0=0, period=1, a=1): | |
# Cos Wave | |
r = np.sqrt((x - x0) ** 2 + (y - y0) ** 2) | |
return a * np.cos(2.0 * np.pi * r / period) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Additonal classes according to FontAwesome */ | |
/* makes the font 33% larger relative to the icon container */ | |
.fb-lg { | |
font-size: 1.33333333em; | |
line-height: 0.75em; | |
vertical-align: -15%; | |
} | |
.fb-2x { | |
font-size: 2em; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef _M5_SERVO_ | |
#define _M5_SERVO_ | |
// http://ogimotokin.hatenablog.com/entry/2018/07/22/182140 | |
class M5Servo{ | |
protected: | |
constexpr static const float MIN_WIDTH_MS = 0.6; | |
constexpr static const float MAX_WIDTH_MS = 2.4; | |
constexpr static const int LEDC_CHANNEL = 3; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
M5Stack Fire | |
M5Stack, MPU9250 and ROS Publisher Example Code | |
by: Kris Winer | |
date: April 1, 2014 | |
license: Beerware - Use this code however you'd like. If you | |
find it useful you can buy me a beer some time. | |
Modified by Brent Wilkins July 19, 2016 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @brief Drive brushed DC-motors with TB6612 | |
* @author botamochi6277 | |
*/ | |
#include "ros/ros.h" | |
#include <iostream> | |
#include <chrono> | |
#include <thread> | |
#include <TB6612.hpp> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* MPU9250 Basic Example Code for Dual MPU9250 | |
* Copyright (c) 2014 Kris Winer | |
* Copyright (c) 2018 botamochi6277 | |
* license: Beerware - Use this code however you'd like. If you | |
* find it useful you can buy me a beer some time. | |
*/ | |
#include <M5Stack.h> | |
#include "utility/MPU9250.h" |