This file contains hidden or 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
######################################################################## | |
## MAKE YAML | |
#!/usr/bin/env python | |
import yaml | |
import numpy as np | |
a = np.matrix('1 2; 3 4') | |
z = 'hello world' |
This file contains hidden or 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
# NOTES: ROS Melodic -- Python3.7 | |
# Solution is to build cv_bridge with python3. | |
sudo apt-get install python-catkin-tools python3-dev python3-catkin-pkg-modules python3-numpy python3-yaml ros-melodic-cv-bridge | |
# Create catkin workspace | |
mkdir catkin_workspace | |
cd catkin_workspace | |
catkin init | |
# Instruct catkin to set cmake variables |
This file contains hidden or 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 images from a rosbag. | |
e.g. | |
python3 bag_to_images.py BAG_FILE_NAME FOLDER_NAME TOPIC_IMAGE_NAME | |
""" | |
import os |
This file contains hidden or 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
"""Simple sliding window dashboard-style | |
plot that updates periodically pulling from | |
a random generator | |
""" | |
import streamlit as st | |
import time | |
import random | |
# values cannot be used in st.session_state!! | |
if 'my_values' not in st.session_state: |
This file contains hidden or 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
# NOTES: ROS Melodic -- Python3.7 | |
# Solution is to build cv_bridge with python3. | |
sudo apt-get install python-catkin-tools python3-dev python3-catkin-pkg-modules python3-numpy python3-yaml ros-melodic-cv-bridge | |
# Create catkin workspace | |
mkdir catkin_workspace | |
cd catkin_workspace | |
catkin init | |
# Instruct catkin to set cmake variables |
This file contains hidden or 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
# !/bin/bash | |
# Installation instructions from https://docs.docker.com/engine/install/ubuntu/ | |
# Update the apt package index and install packages to allow apt to use a repository over HTTPS: | |
sudo apt update | |
sudo apt install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common | |
# Add Docker’s official GPG key | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
# Use the following command to set up the stable repository | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
# INSTALL DOCKER ENGINE |
This file contains hidden or 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
# !/bin/bash | |
# Installation instructions from https://docs.docker.com/engine/install/ubuntu/ | |
# Update the apt package index and install packages to allow apt to use a repository over HTTPS: | |
sudo apt update | |
sudo apt install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common | |
# Add Docker’s official GPG key | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
# Use the following command to set up the stable repository | |
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | |
# INSTALL DOCKER ENGINE |
This file contains hidden or 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 python3 | |
import rospy | |
import cv2 | |
from std_msgs.msg import String | |
from sensor_msgs.msg import Image | |
from cv_bridge import CvBridge | |
bridge = CvBridge() |
This file contains hidden or 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 python3 | |
import streamlit as st | |
import rospy | |
import time | |
import threading | |
from std_msgs.msg import String, Int32 | |
from sensor_msgs.msg import Image | |
from cv_bridge import CvBridge |
This file contains hidden or 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
""" | |
Created on Mon Dec 11 14:02:33 2017 | |
@author: merwan | |
""" | |
import os | |
import argparse | |
import cv2 | |
import rosbag | |
import sys |