Skip to content

Instantly share code, notes, and snippets.

#include <vector>
#include <iostream>
struct TreeNode {
int value;
TreeNode *left;
TreeNode *right;
TreeNode(int value_): value(value_), left(nullptr), right(nullptr) {}
~TreeNode() { delete left; delete right; }
@gnoliyil
gnoliyil / torch_rnn_classifier.py
Created April 22, 2019 21:43
Torch RNN Classifier (modified)
import numpy as np
from operator import itemgetter
import torch
import torch.nn as nn
import torch.utils.data
from torch_model_base import TorchModelBase
from utils import progress_bar
__author__ = "Christopher Potts"
__version__ = "CS224u, Stanford, Spring 2019"
@gnoliyil
gnoliyil / WUG-4th-pamphlet.txt
Created August 30, 2017 08:12
WUG 4th pamphlet
4年目のライブツアーがいよいよ始まります。
吉 ツアーではいつも地元大阪でのライブがあるので、実家に帰るんですけど。去年は先日入ができた美海と美佑が遊びに来てくれたんです。
青 (独り言で)誰と対談してると思ってるんだ……。
吉 うちの近くのお店のおっきたこ焼きをお母さんが買ってくれて。
青 ええなー(ふてくされた態度)。

Joints in ODE & Gazebo

Anchor

  • Set Anchor
    • In gazebo: void ODEHingeJoint::SetAnchor(unsigned int /*index*/, const math::Vector3 &_anchor)
      • _anchor is the coordinate of anchor (joint)
    • In ode: dJointSetHingeAnchor (dxJointHinge *joint, dReal x, dReal y, dReal z)

PR2 Robot in ROS

Models

URDF Model

URDF models of PR2 are stored in pr2_description package, including the following files:

  • urdf directory: definition of PR2 and parts of PR2.
  • parts directory: for example, there are three files in directory base_v0
@gnoliyil
gnoliyil / Compile-ROS-in-Unreal.md
Last active February 9, 2026 09:44
Notes on Compilation and Linkage with ROS in Unreal Engine 4

Compilation and Linkage with ROS in Unreal Engine

Libraries and Source Code

We need these libraries:

  • cpp_common
  • rosconsole
  • rosconsole_backend_interface
  • rosconsole_log4cxx
<VirtualHost *:80>
ServerAdmin webmaster@localhost
# DocumentRoot /var/www/html
WSGIDaemonProcess workshop user=gnoliyil threads=5 home=/var/www/custipen-website
WSGIScriptAlias /workshop/huzhou2017 /var/www/custipen-website/workshop.wsgi
<Directory /var/www/custipen-website>
WSGIProcessGroup workshop
WSGIApplicationGroup %{GLOBAL}