Skip to content

Instantly share code, notes, and snippets.


Peter Mitrano PeterMitrano

View GitHub Profile
source /opt/ros/noetic/setup.bash
mkdir catkin_ws
cd catkin_ws
mkdir src
cd src
sudo apt install python3-wstool python3-osrf-pycommon python3-catkin-tools
PeterMitrano / ompl_python_is_satisfied
Created Mar 11, 2021
demo that is satisfied cannot be overridden in python
View ompl_python_is_satisfied
from functools import partial
from math import sin, cos
import numpy as np
from ompl import base as ob
from ompl import control as oc
class MySampleableGoalRegion(ob.GoalSampleableRegion):
PeterMitrano / serialize_deserialize_rospy_python3
Created Mar 4, 2021
Quick example of how to serialize then deserialize a ROS msg in python 3
View serialize_deserialize_rospy_python3
from io import BytesIO
from geometry_msgs.msg import Point
p = Point(x=2, y=4)
buff = BytesIO()
serialized_bytes = buff.getvalue()
PeterMitrano /
Created Feb 21, 2021
Naive Random Tree Animation
import matplotlib
import matplotlib.pyplot as plt
from matplotlib import cm
import numpy as np
from matplotlib.animation import FuncAnimation
N = 100
a_max = 0.1
s = 1
PeterMitrano /
Last active Feb 6, 2021
Example of a class with a thread
#!/usr/bin/env python
import threading
import time
import weakref
class BadRobot:
def __init__(self):
self.should_disconnect = False
PeterMitrano /
Last active Nov 29, 2020
ROS Noetic via conda workspace setup
#!/bin/env python
import argparse
from multiprocessing import Process
import contextlib
import os
import pathlib
from subprocess import run
import requests
import yaml
PeterMitrano / conda-ros-noetic-env.yml
Last active Nov 28, 2020
View conda-ros-noetic-env.yml
name: peter
- defaults
- conda-forge
- robostack
- cmake=3.18
- log4cxx=0.10.0
- protobuf=3.11.4
- python
View mednafen
sound.driver sdl
sound.volume 10


sudo snap install chromium
sudo apt install g++ build-essential cmake git htop tree tmux openssh-server maim vim-gtk3 i3 python3-pip python3-virtualenv libappindicator3-dev castxml qt5-style-plugins trash-cli checkinstall gparted net-tools rename libreadline-dev imagemagick
sudo snap install pycharm-professional --classic
sudo snap install clion --classic
sudo snap install slack --classic
sudo snap install spotify --classic
sudo ubuntu-drivers autoinstall
View gist:64bc72b1e71c9e322f20797af2377d09