First of all install update and upgrade your system:
$ sudo apt update
$ sudo apt upgrade
Then, install required libraries:
import numpy as np | |
import scipy | |
def fill_hull(image): | |
""" | |
Compute the convex hull of the given binary image and | |
return a mask of the filled hull. | |
Adapted from: | |
https://stackoverflow.com/a/46314485/162094 |
#!/bin/bash | |
# install CUDA Toolkit v8.0 | |
# instructions from https://developer.nvidia.com/cuda-downloads (linux -> x86_64 -> Ubuntu -> 16.04 -> deb (network)) | |
CUDA_REPO_PKG="cuda-repo-ubuntu1604_8.0.61-1_amd64.deb" | |
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/${CUDA_REPO_PKG} | |
sudo dpkg -i ${CUDA_REPO_PKG} | |
sudo apt-get update | |
sudo apt-get -y install cuda |
""" | |
pointgrey_camera_driver (at least the version installed with apt-get) doesn't | |
properly handle camera info in indigo. | |
This node is a work-around that will read in a camera calibration .yaml | |
file (as created by the cameracalibrator.py in the camera_calibration pkg), | |
convert it to a valid sensor_msgs/CameraInfo message, and publish it on a | |
topic. | |
The yaml parsing is courtesy ROS-user Stephan: | |
http://answers.ros.org/question/33929/camera-calibration-parser-in-python/ |
Removing the last commit
To remove the last commit from git, you can simply run git reset --hard HEAD^
If you are removing multiple commits from the top, you can run git reset --hard HEAD~2 to remove the last two commits. You can increase the number to remove even more commits.
If you want to "uncommit" the commits, but keep the changes around for reworking, remove the "--hard": git reset HEAD^
which will evict the commits from the branch and from the index, but leave the working tree around.
If you want to save the commits on a new branch name, then run git branch newbranchname
before doing the git reset.
/** | |
* BMW IBus Daemon reads BMW IBus data through serial port. It detects | |
* BMW board monitor(at least BM53) unit and steering wheel button presses | |
* from IBus data, maps them to key events and injects them to system event | |
* queue via uinput. | |
* | |
* It also can be configured to inject key events only in certain state like | |
* TAPE or AUX which can be useful if you want to hijack for example TAPE | |
* mode for other use. | |
* |