Skip to content

Instantly share code, notes, and snippets.

View AlexandrLucas's full-sized avatar

Alex Lucas AlexandrLucas

  • Sheffield
View GitHub Profile
@AlexandrLucas
AlexandrLucas / dep.sh
Created November 23, 2022 16:02
Robotics + manipulator dependencies
sudo apt install ros-noetic-gazebo* ros-noetic-ros-control* ros-noetic-control* \
ros-noetic-moveit* ros-noetic-industrial-core ros-noetic-dynamixel-sdk \
ros-noetic-dynamixel-workbench* ros-noetic-robotis-manipulator
@AlexandrLucas
AlexandrLucas / ftl_linux.md
Created April 6, 2022 12:35
FTL: Faster Than Light Steam Cloud sync on Linux and MacOS X

Credits to Danilo Pianini

mv ~/.local/share/FasterThanLight ~/.local/share/FasterThanLight.backup
ln -s ~/.local/share/fasterthanlight ~/.local/share/FasterThanLight
@AlexandrLucas
AlexandrLucas / launch_full.sh
Created March 20, 2022 17:38
MDK Gazebo with ROS Bridge
#!/bin/bash
#
# @section COPYRIGHT
# Copyright (C) 2021 Consequential Robotics Ltd
#
# @section AUTHOR
# Consequential Robotics http://consequentialrobotics.com
#
# @section LICENSE
# For a full copy of the license agreement, and a complete
@AlexandrLucas
AlexandrLucas / string_search.py
Last active August 5, 2021 12:12
(Hacky) recursive grep in Python
#!/usr/bin/env python3
import os
user_input = input('What is the name of your directory?\n')
searchstring = input('What string are you trying to find?\n')
def recr(dir):
for fname in os.listdir(dir):
rel_fname = dir + os.sep + fname
if os.path.isfile(rel_fname):
@AlexandrLucas
AlexandrLucas / install_iiwa_stack.sh
Created July 13, 2021 08:35
MRC 2021: teaching environment for WSL-ROS 2101d
#! /bin/bash
curl -s https://raw.githubusercontent.com/ros/rosdistro/master/ros.asc | sudo apt-key add -
sudo apt update
yes | sudo apt upgrade
yes | sudo apt autoremove
sudo apt autoclean
yes | sudo apt install ros-melodic-moveit ros-melodic-moveit-visual-tools ros-melodic-moveit-commander ros-melodic-joint-trajectory-controller python-catkin-tools
mkdir ~/iiwa_stack_ws
@AlexandrLucas
AlexandrLucas / AstroA20-Ubuntu.md
Last active December 14, 2022 19:45
Enabling Astro A20 on Ubuntu 20.04

Description

The Astro A20 headphones are NOT being registered as an output device on Ubuntu 20.04, even though the built-in mic is registered correctly as an input device.

Fix

Append the function below to your ~/.bashrc and then you can simply type in a20 in the terminal whenever you need to connect your A20 headset.
It checks to make sure the headset is plugged in and uses a regex to automatically detect the card number, which often changes. The device number on the other hand seems to be always "1" (at least for me). If you want to connect the headset at startup, simply copy the function body (what's inside the curly brackets) to ~/.profile.

# Astro A20 headphones
@AlexandrLucas
AlexandrLucas / addtopythonpath.sh
Created March 1, 2021 13:17
Add to PYTHONPATH
# A simple script to append the current working directory to PYTHONPATH environment variable temporarily
export PYTHONPATH="${PYTHONPATH}:${PWD}"