See: https://askubuntu.com/questions/1241202/cant-access-webcam-settings
$ sudo apt install v4l-utils
$ v4l2-ctl --list-devices
$ v4l2-ctl -d /dev/videoX --list-ctrls
$ v4l2-ctl --device /dev/video3 --set-ctrl=zoom_absolute=120
bool angleBetweenVectors(Eigen::Vector3f u, Eigen::Vector3f v, double& angle_rad) | |
{ | |
float dot_product = u.dot(v); | |
float norms = u.norm() * v.norm(); | |
// Avoid division by zero or invalid acos input | |
if (norms == 0) { | |
RCLCPP_ERROR(this->get_logger(), "One or both vectors have zero magnitude."); | |
return false; | |
} |
See: https://askubuntu.com/questions/1241202/cant-access-webcam-settings
$ sudo apt install v4l-utils
$ v4l2-ctl --list-devices
$ v4l2-ctl -d /dev/videoX --list-ctrls
$ v4l2-ctl --device /dev/video3 --set-ctrl=zoom_absolute=120
Taken from here:
ip a # get DEVICE
sudo ifconfig <DEVICE> up
nmcli dev wifi list # get SSID
sudo nmcli --ask dev wifi connect <SSID>
Find the page that hosts the keyworkd:
pdfgrep -in <keyword> <pdf-file>
Extract specific pdf page:
pdftk cat output
When you first install Docker, you have to execute its commands with sudo
. Follow these steps to add your user to the docker group such that there won't be a need to execute with sudo.
See: https://docs.docker.com/engine/install/linux-postinstall/
This method relies on a static folder. Doesn't work when hosted on the web - which is why I needed to leverage the Google Cloud Storage.
@app.route('/display/<filename>')
def display_image(filename):
return redirect(url_for('static', filename='processed_imgs/' + filename), code=301)
Syntax to use in html file if wanting to use the display_image function
Instructions for using git lfs
to track large file (greater tham 100MBs). See instructions here.
You can also watch this video to learn about the different features that lfs provides.
$ sudo apt install git-lfs
$ cd /path/to/[GIT REPO]
$ git lfs install
$ git track [filename or type of file you wish to track]
Sometimes a Docker container can get stuck in the "Removal in progress" status. If and when this happens it just hangs forever. Running docker rm -f
doesn't work. The following set of instructions is a good workaround.
$ sudo systemctl stop docker.socket
)$ sudo rm -rf /var/lib/docker/containers/[FULL CONTAINER ID]
)$ sudo systemctl restart docker.socket
).See: https://askubuntu.com/questions/1230016/headset-microphone-not-working-on-ubuntu-20-04#1232155\
Execute the following:
$ mv ~/.config/pulse ~/.config/pulse_old
$ pulseaudio -k && sudo alsa force-reload
Your system should now recognize your buds' mic.