Skip to content

Instantly share code, notes, and snippets.

View michalpelka's full-sized avatar

Michał Pełka michalpelka

View GitHub Profile
@michalpelka
michalpelka / ZED_NMEA_LIVOX360
Created April 6, 2024 19:46
ZED-F9P and Mid360 config
{
"type": "CFG-ITEM",
"items": [
{
"value": 9600,
"layer": 0,
"action": "Set",
"valueType": "U4",
"requestId": "1882a918-6321-4b5f-aa26-ac4a1f98fa68",
"key": "0x40520001"
from pathlib import Path
import gpxpy
import gpxpy.gpx
from rosbags.highlevel import AnyReader
import sys
bag = sys.argv[1]
gpx = sys.argv[2]
@michalpelka
michalpelka / sample.cpp
Created January 19, 2024 10:12
O3DE draw coordinate system
#include <Atom/RPI.Public/AuxGeom/AuxGeomFeatureProcessorInterface.h>
#include <Atom/RPI.Public/Scene.h>
void MyComponent::Activate()
{
auto* entityScene = AZ::RPI::Scene::GetSceneForEntityId(GetEntityId());
m_drawQueue = AZ::RPI::AuxGeomFeatureProcessorInterface::GetDrawQueueForScene(entityScene);
AZ::TickBus::Handler::BusConnect();
TwistNotificationBus::Handler::BusConnect(GetEntityId());
#!/usr/bin/env python
# --------------------------------------------------------------------
# Simple sum of squared differences (SSD) stereo-matching using Numpy
# --------------------------------------------------------------------
# Copyright (c) 2016 David Christian
# Licensed under the MIT License
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.patches as patches
# Copyright (c) 2021 PickNik, Inc.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the

My enviorment

ros2 Humble, ubuntu 22.04

Step by step

Clone:

mkdir -p ~/husky_ws/src
cd ~/husky_ws/src
git clone https://github.com/husky/husky.git
cd husky
@michalpelka
michalpelka / usbmount-headless.md
Last active April 23, 2023 12:52 — forked from zebrajaeger/usbmount-headless.md
usbmount (also ntfs) for Raspberry PI 4b - Raspberry PI OS lite 32 (headless)

usbmount (also ntfs) for Raspberry PI 4b - Raspberry PI OS lite 32 (headless)

1. Install OS

Download and install "Raspberry Pi Imager" from https://www.raspberrypi.org/software/

Choose "Raspberry PI OS Lite 32" Press Ctrl+Shift+X

  • Maybe switch to save always
@michalpelka
michalpelka / chain.urdf
Created February 27, 2023 10:12
test_urdf_shapes
<?xml version="1.0"?>
<robot name="urdf_test">
<material name="darkgrey">
<color rgba="0.25 0.25 0.25 0.8"/>
</material>
<material name="lightgrey">
<color rgba="0.8 0.8 0.8 1.0"/>
</material>
from PyPDF2 import PdfWriter, PdfReader
import glob
import os.path
INPUT_DIR = "data"
OUTPUT_DIR="data_proc"
files = glob.glob(INPUT_DIR+"/*.pdf")
for f in files:
basename = os.path.basename(f)
basename = basename[:-4]
print (basename)

Setup VSCode and Debug Open 3D Engine with LLDB

VSCode allows to development of CMake applications and gives a full debugging experience.

Please follow the installation guide using the Debian package:

Visual Studio Code - Code Editing. Redefined

System components