Skip to content

Instantly share code, notes, and snippets.

View qiayuanl's full-sized avatar
🎯
Focusing

QiayuanLiao qiayuanl

🎯
Focusing
  • UC Berkeley
  • Berkeley
View GitHub Profile
import cv2 as cv
class ImageCropper:
def __init__(self, background, candidate, visualization=None):
self.ref_point = []
self.background = background
self.candidate = candidate
self.select = self.candidate.copy()
self.final = self.background.copy()
//
// Created by qiayuan on 2022/7/24.
//
#include "cbf_navigation/trajectories_publisher.h"
#include <ocs2_core/Types.h>
#include <ocs2_core/misc/LoadData.h>
#include <angles/angles.h>
# The ANYbotics style guide is based on google: https://anybotics.github.io/styleguide/cppguide.html
BasedOnStyle: Google
# Maximum line with is 140 characters (default: 80)
ColumnLimit: 140
# Indent of two spaces, no tabs.
IndentWidth: 2
# Always attach braces to surrounding context.
BreakBeforeBraces: Attach
# Force pointer alignment with the type (left).
DerivePointerAlignment: false
cmake_minimum_required(VERSION 3.24)
project(lalala C CXX ASM)
set(CMAKE_C_COMPILER arm-none-eabi-gcc)
set(CMAKE_CXX_COMPILER arm-none-eabi-g++)
set(CMAKE_ASM_COMPILER arm-none-eabi-gcc)
set(CMAKE_AR arm-none-eabi-ar)
set(CMAKE_OBJCOPY arm-none-eabi-objcopy)
set(CMAKE_OBJDUMP arm-none-eabi-objdump)
set(SIZE arm-none-eabi-size)
@qiayuanl
qiayuanl / hex.py
Created March 21, 2024 20:54
Intel hex modifly
def calculate_checksum(record):
total = sum(record)
checksum = ((~total + 1) & 0xFF)
return checksum
def verify_and_parse_record(line):
line = line.strip()[1:]
byte_count = int(line[0:2], 16)
address = int(line[2:6], 16)
record_type = int(line[6:8], 16)
@qiayuanl
qiayuanl / cleardrive.yaml
Last active June 17, 2024 01:20
rosdep.yaml
any_node:
ubuntu: [ros-noetic-any-node]
any_node_example:
ubuntu: [ros-noetic-any-node-example]
any_worker:
ubuntu: [ros-noetic-any-worker]
message_logger:
ubuntu: [ros-noetic-message-logger]
param_io:
ubuntu: [ros-noetic-param-io]