Skip to content

Instantly share code, notes, and snippets.

View soulslicer's full-sized avatar

Raaj soulslicer

  • Carnegie Mellon University Robotics Institute
View GitHub Profile
@soulslicer
soulslicer / ubuntu-nvidia-instructions
Created August 22, 2017 15:49
ubuntu-nvidia-instructions
# Disbale Nouveau driver and reboot (In safe mode if needed)
sudo sh -c "echo 'blacklist nouveau' >> /etc/modprobe.d/blacklist.conf"
sudo update-initramfs -u
sudo reboot
# Download drivers
wget http://us.download.nvidia.com/XFree86/Linux-x86_64/375.20/NVIDIA-Linux-x86_64-375.20.run
wget https://developer.nvidia.com/compute/cuda/8.0/prod/local_installers/cuda_8.0.44_linux-run
# Remove the xorg file
sudo mv /etc/X11/xorg.conf /etc/X11/xorg.conf.BACKUP
# Go to CMD and Stop lightdm
@soulslicer
soulslicer / mvs-texturing_single_texture.txt
Last active September 4, 2017 02:23
MVS-Texturing Single Texture
diff --git a/libs/tex/calculate_data_costs.cpp b/libs/tex/calculate_data_costs.cpp
index d56cb3e..2024204 100644
--- a/libs/tex/calculate_data_costs.cpp
+++ b/libs/tex/calculate_data_costs.cpp
@@ -184,7 +184,7 @@ calculate_face_projection_infos(mve::TriangleMesh::ConstPtr mesh,
if (viewing_angle < 0.0f || viewing_direction.dot(view_to_face_vec) < 0.0f)
continue;
- if (std::acos(viewing_angle) > MATH_DEG2RAD(75.0f))
+ if (std::acos(viewing_angle) > MATH_DEG2RAD(89.0f))
@soulslicer
soulslicer / fail.cpp
Created February 17, 2018 01:15
OpenGL Thread fail
class Renderer{
public:
GLFWwindow* window_slave;
GLuint fb, rbc, rbd, pbo;
struct Vertex{
GLfloat position[3];
GLfloat normal[3];
GLfloat texcoord[2];
};
# import sys
# sys.path.insert(0, 'python')
# import caffe
# caffe.set_mode_cpu()
# solver = caffe.SGDSolver('solver.prototxt')
# solver.net.params['lstm1'][2].data[15:30]=5
# import numpy as np
# a = np.arange(0,32,0.01)
# d = 0.5*np.sin(2*a) - 0.05 * np.cos( 17*a + 0.8 ) + 0.05 * np.sin( 25 * a + 10 ) - 0.02 * np.cos( 45 * a + 0.3)
name: "LSTM"
input: "data"
# T = 320 time_steps, N = 1 streams, 1-D data
input_shape { dim: 320 dim: 1 dim: 1}
input: "clip"
input_shape { dim: 320 dim: 1 }
input: "label"
input_shape { dim: 320 dim: 1 }
layer {
Testsssss
@soulslicer
soulslicer / pf.py
Created September 20, 2015 09:27
2d Particle filter example with Visualization
# Make a robot called myrobot that starts at
# coordinates 30, 50 heading north (pi/2).
# Have your robot turn clockwise by pi/2, move
# 15 m, and sense. Then have it turn clockwise
# by pi/2 again, move 10 m, and sense again.
#
# Your program should print out the result of
# your two sense measurements.
#
# Don't modify the code below. Please enter
@soulslicer
soulslicer / rl-patch-callback-collision-dist.diff
Created August 2, 2017 06:09
rl-patch-callback-collision-dist.diff
diff --git a/src/rl/hal/CMakeLists.txt b/src/rl/hal/CMakeLists.txt
index a21695b..d7704d3 100644
--- a/src/rl/hal/CMakeLists.txt
+++ b/src/rl/hal/CMakeLists.txt
@@ -2,7 +2,7 @@ project(rlhal)
find_package(Atidaq)
find_package(Comedi)
-find_package(Libdc1394)
+#find_package(Libdc1394)
@soulslicer
soulslicer / mac_patch.txt
Created May 21, 2019 15:02
Mac Patch OpenCL Caffe
diff --git a/cmake/Modules/FindvecLib.cmake b/cmake/Modules/FindvecLib.cmake
index 7459f623..9c5ee818 100644
--- a/cmake/Modules/FindvecLib.cmake
+++ b/cmake/Modules/FindvecLib.cmake
@@ -12,13 +12,17 @@ endif()
set(__veclib_include_suffix "Frameworks/vecLib.framework/Versions/Current/Headers")
-find_path(vecLib_INCLUDE_DIR vecLibTypes.h
+exec_program(xcode-select ARGS -print-path OUTPUT_VARIABLE CMAKE_XCODE_DEVELOPER_DIR)
#!/usr/bin/env python
# Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma de
# Barcelona (UAB).
#
# This work is licensed under the terms of the MIT license.
# For a copy, see <https://opensource.org/licenses/MIT>.
import glob
import os