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
### ekf config file ### | |
ekf_filter_node: | |
ros__parameters: | |
# The frequency, in Hz, at which the filter will output a position estimate. Note that the filter will not begin | |
# computation until it receives at least one message from one of the inputs. It will then run continuously at the | |
# frequency specified here, regardless of whether it receives more measurements. Defaults to 30 if unspecified. | |
frequency: 25.0 | |
# The period, in seconds, after which we consider a sensor to have timed out. In this event, we carry out a predict | |
# cycle on the EKF without correcting it. This parameter can be thought of as the minimum frequency with which the |
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 launch | |
from launch_ros.actions import ComposableNodeContainer, Node | |
from launch_ros.descriptions import ComposableNode | |
def generate_launch_description(): | |
"""Launch file which brings up visual slam node configured.""" | |
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
#include <i2cmaster.h> | |
#define uint16_t unsigned int | |
typedef struct | |
{ | |
uint16_t Red; | |
uint16_t Green; | |
uint16_t Blue; | |
uint16_t Clear; | |
} RGB; |
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
#!/usr/bin/env python | |
import sys | |
import rospy | |
import rosbag | |
import cv2 | |
from sensor_msgs.msg import Image | |
from cv_bridge import CvBridge, CvBridgeError | |
def save_images_from_rosbag(rosbag_file, topic_name, output_file): |
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 cv2 | |
#assert cv2.__version__[0] == '3', 'The fisheye module requires opencv version >= 3.0.0' | |
import numpy as np | |
import os | |
import glob | |
CHECKERBOARD = (7,10) | |
subpix_criteria = (cv2.TERM_CRITERIA_EPS+cv2.TERM_CRITERIA_MAX_ITER, 30, 0.1) | |
calibration_flags = cv2.fisheye.CALIB_RECOMPUTE_EXTRINSIC+cv2.fisheye.CALIB_CHECK_COND+cv2.fisheye.CALIB_FIX_SKEW | |
# calibration_flags = cv2.fisheye.CALIB_RECOMPUTE_EXTRINSIC+cv2.fisheye.CALIB_FIX_SKEW | |
objp = np.zeros((1, CHECKERBOARD[0]*CHECKERBOARD[1], 3), np.float32) |
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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
# Copyright 2016 Massachusetts Institute of Technology | |
"""Extract images from a rosbag. | |
""" | |
import os | |
import argparse |
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
/** | |
* | |
*/ | |
const int dirPin = 8; | |
const int stepPin = 9; | |
const int enablePin = 7; | |
const int sw = 6; | |
const int delayMicros = 500; //Delay between each step | |
const int maximumSteps = 230; |
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
#include <AccelStepper.h> | |
const int StepPin = 9; | |
const int DirPin = 8; | |
const int EnablePin = 7; | |
AccelStepper stepper(AccelStepper::DRIVER, StepPin, DirPin, 0, 0, true); |
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
const int dirPin = 8; | |
const int stepPin = 9; | |
const int enablePin = 7; | |
void setup() { | |
pinMode(enablePin, OUTPUT); | |
pinMode(stepPin, OUTPUT); | |
pinMode(dirPin, OUTPUT); | |
digitalWrite(enablePin, LOW); |
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
/** | |
ตัวอย่างการใช้ PS2 Wireless กับ Arduino | |
PS2X_lib | |
ในการอ่านค่า joy PS2 ของร้าน Modulemore | |
โดยต่อ | |
UNO R3 --- > PS2 adapter | |
GND - GND | |
5v - VCC | |
D3 - DAT | |
D4 - CMD |