Skip to content

Instantly share code, notes, and snippets.

@madratman
madratman / main.cpp
Created August 20, 2015 18:51
Tracking the seg fault
#include <ros/ros.h>
#include <actionlib/client/simple_action_client.h>
#include <control_msgs/FollowJointTrajectoryAction.h>
#include <descartes_moveit/moveit_state_adapter.h>
#include <descartes_planner/dense_planner.h>
#include <descartes_trajectory/axial_symmetric_pt.h>
#include <descartes_trajectory/cart_trajectory_pt.h>
#include <moveit/move_group_interface/move_group.h>
#include <moveit/robot_model_loader/robot_model_loader.h>
#include <moveit/robot_state/conversions.h>
@madratman
madratman / compare_str_char_ptr.cpp
Last active February 27, 2016 18:12
compare_str_char_ptr.cpp
#include <iostream>
#include <string>
#include <cstring>
#define xstr(a) str(a)
#define str(a) #a
int main()
{
char* name = "madratman";
if( xstr(name) == "name" )
#include <iostream>
#include <string>
#include <cstring>
#define xstr(a) str(a)
#define str(a) #a
int main()
{
std::string name = "madratman";
if( xstr(name) == "name" && !strcmp(xstr(name), "name") && "madratman"==name && "madratman"=="madratman" )
mport cPickle as pickle
from datetime import datetime
import os
import sys
import matplotlib.pyplot as plt
import numpy as np
from lasagne import layers
from sklearn.utils import shuffle
import theano
FROM ubuntu:14.04
LABEL maintainer "NVIDIA CORPORATION <cudatools@nvidia.com>"
LABEL com.nvidia.volumes.needed="nvidia_driver"
RUN NVIDIA_GPGKEY_SUM=d1be581509378368edeec8c1eb2958702feedf3bc3d17011adbf24efacce4ab5 && \
NVIDIA_GPGKEY_FPR=ae09fe4bbd223a84b2ccfce3f60f4b3d7fa2af80 && \
apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/7fa2af80.pub && \
apt-key adv --export --no-emit-version -a $NVIDIA_GPGKEY_FPR | tail -n +2 > cudasign.pub && \
echo "$NVIDIA_GPGKEY_SUM cudasign.pub" | sha256sum -c --strict - && rm cudasign.pub && \
def add_dilated(**kwargs):
# print kwargs['key']
return "net['{0}'] = DilatedConv2DLayer(net['{1}'], num_filters={2}, filter_size={3}, dilation={4}, name='{0}')".format(
kwargs['curr_layer_name'], kwargs['prev_layer_name'], kwargs['num_filters'], kwargs['filter_size'], kwargs['dilation'])
def add_vanilla(**kwargs):
# print kwargs['key']
return "net['{0}'] = ConvLayer(net['{1}'], num_filters={2}, filter_size={3}, pad={4}, name='{0}')".format(
kwargs['curr_layer_name'], kwargs['prev_layer_name'], kwargs['num_filters'], kwargs['filter_size'], kwargs['pad'])
@madratman
madratman / params.yaml
Created March 20, 2017 04:27
stereo_params
# Kl = ( Mat_<float>(3,3) << Kl_[0], 0.0, Kl_[2],
# 0.0, Kl_[1], Kl_[3],
# 0.0, 0.0, 1.0 );
cam0:
Kl: [536.1659550000001, 536.538415, 317.456864, 261.798048] #fx, fy, cx, cy
Kr: [535.427087, 535.775524, 314.884298, 261.374341]
cam_bl: 0.17454185842
cam_height: 512
cam_model: Pinhole
cam_width: 640
@madratman
madratman / gist:a6c73dbd0a2301902f63f5035a945c1f
Created March 27, 2017 03:04
from rand import permissions
sudo chgrp -R GROUP_NAME PATH_TO_DIR
sudo chmod -R g+w PATH_TO_DIR #for write permission
[2017.04.01-23.18.12:566][918]BlueprintLog: New page: Pre-Play auto-recompile
[2017.04.01-23.18.12:566][918]LogPlayLevel: [PlayLevel] Compiling LandscapeMap before play...
[2017.04.01-23.18.15:628][918]LogBlueprint:Error: [Compiler PersistentLevel.LandscapeMap] Error Spawn node SpawnActor NONE must have a Class specified.
[2017.04.01-23.18.15:629][918]LogBlueprint:Warning: [Compiler PersistentLevel.LandscapeMap] Warning Could not find a variable named "bIsOutOfBounds" in 'LandscapeMap'.
Make sure 'LandscapeMap' has been compiled for Set bIsOutOfBounds
[2017.04.01-23.18.15:629][918]LogBlueprint:Warning: [Compiler PersistentLevel.LandscapeMap] Warning Can't connect pins Return Value and Object : This cast has an invalid target type (was the class deleted without a redirect?).
[2017.04.01-23.18.15:629][918]LogBlueprint:Warning: [Compiler PersistentLevel.LandscapeMap] Warning Can't connect pins Object and Return Value : This cast has an invalid target type (was the class deleted without a redirect?).
[
[2017.04.01-23.14.00:638][351]BlueprintLog: New page: Pre-Play auto-recompile
[2017.04.01-23.14.00:638][351]LogPlayLevel: [PlayLevel] Compiling LandscapeMap before play...
[2017.04.01-23.14.00:778][351]LogBlueprint:Error: [Compiler PersistentLevel.LandscapeMap] Error Spawn node  SpawnActor NONE  must have a  Class  specified.
[2017.04.01-23.14.00:778][351]LogBlueprint:Warning: [Compiler PersistentLevel.LandscapeMap] Warning Could not find a variable named "bIsOutOfBounds" in 'LandscapeMap'.
Make sure 'LandscapeMap' has been compiled for  Set bIsOutOfBounds
[2017.04.01-23.14.00:778][351]LogBlueprint:Warning: [Compiler PersistentLevel.LandscapeMap] Warning Can't connect pins  Return Value  and  Object : This cast has an invalid target type (was the class deleted without a redirect?).
[2017.04.01-23.14.00:779][351]LogBlueprint:Warning: [Compiler PersistentLevel.LandscapeMap] Warning Can't connect pins  Object  and  Return Value : This cast has an invalid target type (was the class deleted without a redirect?