- sudo fdisk /dev/nvme0n1
- Choose “n” to create a new partition, then “p” then “1” to create a new primary partition. Just use defaults for the sector numbers. Then “w” to write the data to the disk
- sudo mkfs -t ext4 /dev/nvme0n1p1
- sudo mkdir /media/nvme0n1p1
- sudo mount /dev/nvme0n1p1 /media/nvme0n1p1
- sudo chown -R : /media/nvme0n1p1
- UID= /media/nvme ext4 defaults 0 0
- To find the UUID, enter: sudo blkid
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
<launch> | |
<arg name="IMAGE_TOPIC" default="/camera/image_raw"/> | |
<arg name="FILENAME" default="test.bag"/> | |
<arg name="SAVE_PATH" default="ROS_HOME"/> | |
<arg name="FPS" default="10.0"/> | |
<node pkg="rosbag" type="play" name="rosbag" required="true" args="$(arg FILENAME)"/> | |
<node name="extract" pkg="image_view" type="extract_images" respawn="false" required="true" output="screen" cwd="$(arg SAVE_PATH)"> | |
<remap from="image" to="$(arg IMAGE_TOPIC)"/> | |
<param name="sec_per_frame" value="$(eval (1/arg('FPS')))"/> |
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
// Taken from http://www.visiondummy.com/2014/04/draw-error-ellipse-representing-covariance-matrix/ | |
// previously defined | |
cv::Mat covmat; | |
// Get the eigenvalues and eigenvectors | |
cv::Mat eigenvalues, eigenvectors; | |
cv::eigen(covmat, eigenvalues, eigenvectors); | |
// Calculate the angle between the largest eigenvector and the x-axis |
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
// count character occurances in string | |
std::string s = "the answer; should ;be ;; four"; | |
size_t n = std::count(s.begin(), s.end(), ';'); | |
// Mahalanobis distance | |
double dist = sqrt((x - u).transposeInPlace() * cov_matrix.inverse() * (x - u)); // untested |
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
# First create the SSL certificate (.crt file) | |
# See: https://www.digitalocean.com/community/tutorials/how-to-create-a-self-signed-ssl-certificate-for-apache-in-ubuntu-16-04 | |
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /etc/ssl/private/apache-selfsigned.key -out /etc/ssl/certs/apache-selfsigned.crt | |
# Then generate the .pfx file | |
# See: https://www.ssl.com/how-to/create-a-pfx-p12-certificate-file-using-openssl/ | |
openssl pkcs12 -export -out certificate.pfx -inkey privateKey.key -in certificate.crt | |
# This output file is what you use for the digital signature. | |
# Cheers. |
Get the python-catkin-tools
package from apt-get. Execute the following
command to download the ROS repositories which contain the .deb for
catkin_tools:
$ sudo sh \
-c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" \
> /etc/apt/sources.list.d/ros-latest.list'
$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
Then execute the following to install catkin_tools:
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
// function declaration | |
std::vector<float> unique(const cv::Mat& input, bool sort); | |
// the actual function | |
std::vector<float> unique(const cv::Mat& input, bool sort) | |
{ | |
if (input.channels() > 1 || input.type() != CV_32F) | |
{ | |
std::cerr << "unique !!! Only works with CV_32F 1-channel Mat" << std::endl; | |
return std::vector<float>(); |
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
// previously defined | |
cv::Mat cv_matrix; | |
std::string r; | |
int type = cv_matrix.type(); | |
uchar depth = type & CV_MAT_DEPTH_MASK; | |
uchar chans = 1 + (type >> CV_CN_SHIFT); | |
switch ( depth ) { |
Summarizing the instructions of the pass
tool (as seen on its website).
Execute: $ sudo apt install pass
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
version: "3.4" | |
services: | |
ros-rviz: | |
build: | |
context: . | |
dockerfile: Dockerfile | |
image: rviz_container:melodic | |
container_name: rviz_test | |
network_mode: "host" |
OlderNewer