Skip to content

Instantly share code, notes, and snippets.

View pattylo's full-sized avatar
💻
Gazing

Patrick Lo pattylo

💻
Gazing
View GitHub Profile
# Disable Wayland
For symless synergy and anydesk, remember to disable wayland
```
[daemon]
WaylandEnable=false
```
@pattylo
pattylo / T265_realsense_install.md
Last active October 14, 2025 19:47
realsense v2.50.0 for T265
git clone https://github.com/IntelRealSense/librealsense.git
cd librealsense
git checkout v2.50.0
mkdir build && cd build
cmake ../ -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true
make -j$(nproc)
sudo make install
realsense-viewer
@pattylo
pattylo / osqpwrapper.cpp
Last active October 31, 2024 05:13
osqpwrapper.h
#include "osqpwrapper.h"
void osqpwrapper::qp_opt(
Eigen::MatrixXd _MQM,
Eigen::MatrixXd _A,
Eigen::MatrixXd _g,
Eigen::MatrixXd _ub,
Eigen::MatrixXd _lb)
{
// Load problem data
@pattylo
pattylo / add_ros_submodule.sh
Created August 21, 2024 05:57
add_ros_submodule.sh
```
git submodule add https://github.com/HKPolyU-UAV/airo_message.git && \
git submodule add https://github.com/pattylo/ros_utilities.git && \
git submodule add https://github.com/pattylo/cv_bridge.git
```
@pattylo
pattylo / doc.tex
Last active August 9, 2024 06:07
General Document for .tex
% Source: http://tex.stackexchange.com/a/5374/23931
\documentclass[12pt]{article}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage[margin=0.8in]{geometry}
\usepackage{hyperref}
\newcommand{\HRule}{\rule{\linewidth}{0.5mm}}
\newcommand{\Hrule}{\rule{\linewidth}{0.3mm}}
@pattylo
pattylo / settings.json
Last active August 14, 2024 07:02
VScode Frequent Used Settingss
"editor.indentSize": "tabSize",
"editor.wordWrap": "off",
@pattylo
pattylo / mainserver.py
Created April 13, 2023 02:52
Python script for basic state machine for running PX4 Quadrotors
#! /usr/bin/env python
# mainserver.py
import rospy
from geometry_msgs.msg import PoseStamped
from mavros_msgs.msg import State
from mavros_msgs.srv import CommandBool, CommandBoolRequest, SetMode, SetModeRequest
from std_msgs.msg import Bool
import numpy as np
@pattylo
pattylo / source_code_description
Last active September 14, 2023 13:57
source code description
/*
This file is part of {software_name} - {software_description}
{software_name} is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
{software_name} is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
@pattylo
pattylo / icp.cpp
Created July 27, 2022 10:42
PCL ICP
pcl::console::setVerbosityLevel(pcl::console::L_VERBOSE);
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_in (new pcl::PointCloud<pcl::PointXYZ>(4,1));
pcl::PointCloud<pcl::PointXYZ>::Ptr cloud_out (new pcl::PointCloud<pcl::PointXYZ>(4,1));
double t1 = ros::Time::now().toSec();
// Fill in the CloudIn data
for (int i = 0; i < 4; i++)
{