Skip to content

Instantly share code, notes, and snippets.

Kelvin Ly cactorium

Block or report user

Report or block cactorium

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
cactorium /
Last active Feb 27, 2019
Lunar Knights 2018 notes

So the most important thing to keep in mind when looking at ROS-based designs is that it's meant to be very modular. This hopefully simplifies the task of automotonously controlling a robot into smaller problems that are a little easier to solve, so the problem goes from "autonomously controlling a robot" to "sensing the robot's position in the environment", "moving the robot", and "figuring out where to move the robot based on its position". "Sensing the robot's position" is broken into "calculating wheel odometry", "reading from the IMU", "calculating visual odometry", and "combining all the data to get an accurate robot pose (ROS's term for position and orientation)" "Moving the robot" is broken into "calculating the commands to send to the ESCs", "sending teleop commands", "letting teleop override the autonomous controls" and "sending the commands to the ESCs over CAN" "Figuring out where to move the robot" is broken into "figuring out how to move the robot to a new pose" and "figuring out the next pose t

View ryan2018.js
cactorium /
Created Sep 14, 2018
Lens configuration calculator for a simple microscope
# finds possible lens configurations to make a working microscope given a set of available lenses and a couple of other parameters
# outputs the max and min magnification of each valid lens ordering and the total length of each lens system
lens = [25.4, 25.4, 25.4, 100.0, -75.0]
eye_dist = 270.00
# each lens adds one degree of freedom to the system; it's fully constrained
# with 2 lens but every additional lens adds a DoF
# so we'll brute force it by checking every possible combination of lengths
# between 10mm and 100mm and pick the best set of valid parameters
cactorium / texture_test.cpp
Last active Jul 13, 2018
OpenCV texture test
View texture_test.cpp
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/core/cuda.hpp>
#include <opencv2/core/cuda_stream_accessor.hpp>
#include <opencv2/cudev/ptr2d/glob.hpp>
void transfer_caller(cv::cudev::GlobPtrSz<float> in, cv::cudev::PtrStepSz<float> out);
cactorium / ADA4807.cir
Created Jun 6, 2018
Noninverting amplifier test
View ADA4807.cir
* ADA4807 SPICE Macro-model
* Function: Amplifier
* Revision History:
* Rev. 4.0 Dec 2014 -TC
* Copyright 2014 by Analog Devices
* Refer to
* for License Statement. Use of this model indicates your acceptance
* of the terms and provisions in the License Staement.

Keybase proof

I hereby claim:

  • I am cactorium on github.
  • I am cactorium ( on keybase.
  • I have a public key whose fingerprint is 9872 DAA3 6680 490B CD12 D694 0DC7 89A1 5B2E 6E75

To claim this, I am signing this object:

cactorium /
Created Oct 26, 2016
Week three UCF Lunar Knights C++ notes
// so this week we're starting where we left off last week!
// we moved some of the stuff into a header file called "vectors.h"
// so check that out before moving forward
// include stuff as before
#include <vector>
#include <iostream>
// here we include our brand new header file
// note that its name is surrounded in quotes instead of brackets
// Same #includes as last time, nothing new here
#include <vector>
#include <iostream>
// C++ has structs just like C!
// This defines a new type of thing, called a Point
// so you can make Points, and they'll all have these exact components
struct Point {
double x, y, z, mass;
// NOTE: if you are running in an IDE, you may need to add -std=c++11
// to the compiler settings for this to compile correctly.
// GCC (which is the most common compiler suite) defaults to using an older standard of
// C++, so it won't be able to understand all the awesomecool features we're using here
// until you tell it that you want to use them
// A line that starts with two slashes like this is a comment!
// They're ignored by the compiler, so you can write whatever you want in them
// They're mainly used for commenting code, to better describe what's happening
// in the code if it's complicated
You can’t perform that action at this time.