> [!NOTE]
> Highlights information that users should take into account, even when skimming.
> [!TIP]
> Optional information to help a user be more successful.
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 -*- | |
"""Extract a folder of ply from a rosbag. | |
python3 bag_to_ply.py FILE_NAME.bag FOLDER_NAME TOPIC_NAME | |
e.g., | |
python3 bag_to_ply.py FILE_NAME.bag FOLDER_NAME /point_cloud/cloud_registered | |
""" | |
import os |
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
from ultralytics import YOLO | |
import time | |
import cv2 | |
import math | |
image = cv2.imread('bus.jpg') | |
model = YOLO('yolov8n.pt') # pretrained YOLOv8n model | |
# object classes |
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 os | |
import cv2 | |
import open3d as o3d | |
import numpy as np | |
from sensor_msgs.msg import PointCloud2 | |
from sensor_msgs.msg import CompressedImage | |
import rclpy | |
from rclpy.node import Node | |
from rclpy.qos import QoSProfile | |
import pcl |
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
### Add these lines in your ~/.bashrc file | |
# Show git branch name | |
force_color_prompt=yes | |
color_prompt=yes | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/' | |
} | |
if [ "$color_prompt" = yes ]; then | |
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ ' |
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
FROM ubuntu:20.04 | |
ARG DEBIAN_FRONTEND=noninteractive | |
RUN apt-get update && apt-get -y upgrade \ | |
&& apt-get install -y \ | |
apt-utils \ | |
unzip \ | |
tar \ | |
curl \ | |
xz-utils \ | |
ocl-icd-libopencl1 \ |
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 the necessary packages | |
import argparse | |
import imutils | |
import cv2 | |
# construct the argument parser and parse the arguments | |
ap = argparse.ArgumentParser() | |
ap.add_argument("-i", "--image", required=True, help="path to input image containing ArUCo tag") | |
args = vars(ap.parse_args()) | |
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 streamlit as st | |
import io | |
import pyvista as pv | |
from pyvista.jupyter.pv_pythreejs import convert_plotter | |
from ipywidgets import embed | |
import streamlit.components.v1 as components | |
def show_CAD_window(): | |
mesh = pv.read('model.obj') |
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
################################################################################ | |
## WRITE PICKLE | |
#!/usr/bin/env python | |
import pickle | |
import numpy as np | |
a = np.matrix('1 2; 3 4') | |
b = 0 |
NewerOlder