Skip to content

Instantly share code, notes, and snippets.

Avatar
🔬

Peter Mitrano PeterMitrano

🔬
View GitHub Profile
View setup_catkin_ws.sh
#!/bin/bash
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
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
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)
print(p)
buff = BytesIO()
p.serialize(buff)
serialized_bytes = buff.getvalue()
@PeterMitrano
PeterMitrano / naive_random_tree.py
Created Feb 21, 2021
Naive Random Tree Animation
View naive_random_tree.py
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
PeterMitrano / thread_test.py
Last active Feb 6, 2021
Example of a class with a thread
View thread_test.py
#!/usr/bin/env python
import threading
import time
import weakref
class BadRobot:
def __init__(self):
self.should_disconnect = False
@PeterMitrano
PeterMitrano / setup_script.py
Last active Nov 29, 2020
ROS Noetic via conda workspace setup
View setup_script.py
#!/bin/env python
import argparse
from multiprocessing import Process
import contextlib
import os
import pathlib
from subprocess import run
import requests
import yaml
@PeterMitrano
PeterMitrano / conda-ros-noetic-env.yml
Last active Nov 28, 2020
conda-ros-noetic-env.yml
View conda-ros-noetic-env.yml
name: peter
channels:
- defaults
- conda-forge
- robostack
dependencies:
- cmake=3.18
- log4cxx=0.10.0
- protobuf=3.11.4
- python
View mednafen
sound.driver sdl
sound.volume 10
View linux-setup.md

Install

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
# https://linuxconfig.org/how-to-install-the-nvidia-drivers-on-ubuntu-20-04-focal-fossa-linux
sudo ubuntu-drivers autoinstall
View gist:64bc72b1e71c9e322f20797af2377d09
CATKIN_WHITELIST_PACKAGES:STRING=shape_completion_training;link_bot_data;link_bot_pycommon;peter_msgs;link_bot_classifiers;state_space_dynamics;ros_numpy;gazebo_msgs;moonshine;link_bot_planning;link_bot_gazebo_python;jsk_recognition_msgs;mps_shape_completion_msgs;tf;angles;tf2_ros;tf2;tf2_msgs;tf2_py;victor_hardware_interface_msgs;arm_video_recorder;victor