Skip to content

Instantly share code, notes, and snippets.

@dhruvms
dhruvms / pr2.urdf
Created April 27, 2021 19:57
PR2 Single File URDF
<?xml version="1.0" ?>
<!-- =================================================================================== -->
<!-- | This document was autogenerated by xacro from pr2.urdf.xacro | -->
<!-- | EDITING THIS FILE BY HAND IS NOT RECOMMENDED | -->
<!-- =================================================================================== -->
<robot name="pr2" xmlns:xacro="http://www.ros.org/wiki/xacro">
<!--TODO Define and give source-->
<!-- ============================ Shoulder ============================ -->
<!-- ============================ Upper Arm ============================ -->
<!-- ============================ Forearm ============================ -->
@dhruvms
dhruvms / table.tex
Created January 22, 2021 16:35
Latex results table
\begin{table*}[t]
\caption{Simulation study of various planners in the \MAMO domain.}
\label{tab:exps_sim}
\begingroup
\setlength{\tabcolsep}{3pt}
\centering
\begin{tabular}{ll*{6}c*{6}c}
\toprule
& & \multicolumn{12}{c}{\textbf{Planning Algorithms}} \\
@dhruvms
dhruvms / pyplot_fonts.py
Created September 12, 2019 19:50
Fonts available to matplotlib
# http://jonathansoma.com/lede/data-studio/matplotlib/list-all-fonts-available-in-matplotlib-plus-samples/
# Run in Jupyter notebook
import matplotlib.font_manager
from IPython.core.display import HTML
def make_html(fontname):
return "<p>{font}: <span style='font-family:{font}; font-size: 24px;'>{font}</p>".format(font=fontname)
code = "\n".join([make_html(font) for font in sorted(set([f.name for f in matplotlib.font_manager.fontManager.ttflist]))])
@dhruvms
dhruvms / pyvenv.sh
Created April 26, 2018 18:52
Setup new Python virtualenv
#!/bin/bash
PYTHON_VER=$1
BOOTSTRAP_NAME=$2
WS_NAME=$3
wget https://files.pythonhosted.org/packages/b1/72/2d70c5a1de409ceb3a27ff2ec007ecdd5cc52239e7c74990e32af57affe9/virtualenv-15.2.0.tar.gz
tar xzf virtualenv-15.2.0.tar.gz
${PYTHON_VER} virtualenv-15.2.0/virtualenv.py "${BOOTSTRAP_NAME}"
rm -rf virtualenv-15.2.0/
${BOOTSTRAP_NAME}/bin/pip install --upgrade pip
@dhruvms
dhruvms / latex_pdf_compile.sh
Created October 4, 2017 02:50
Script to compile LaTeX files with pdflatex and delete temporary files.
#!/bin/bash
IFS='.' read -ra FILE <<< "$1"
AUX="${FILE[0]}.aux"
PDF="${FILE[0]}.pdf"
mkdir -p output
pdflatex -c-style-errors -output-directory=output/ $1
bibtex output/$AUX
pdflatex -c-style-errors -output-directory=output/ $1
@dhruvms
dhruvms / sbpl_ws.txt
Last active August 10, 2018 20:44
SBPL Workspace Setup
# Install ROS Indigo, create catkin workspace - follow ROS Wiki
cd <catkin_ws>/src/
git clone https://github.com/sbpl/sbpl
cd sbpl && mkdir build && cd build && cmake .. && make && sudo make install && cd ../../
git clone https://github.com/sbpl/sbpl_geometry_utils
cd sbpl_geometry_utils && mkdir build && cd build && cmake .. && make && sudo make install && cd ../../
git clone https://github.com/aurone/sbpl_manipulation