Skip to content

Instantly share code, notes, and snippets.

View h3ct0r's full-sized avatar
☢️
Quarantine

Héctor Azpúrua h3ct0r

☢️
Quarantine
View GitHub Profile
@bhaskara
bhaskara / openni_record_player.launch
Created April 16, 2012 17:38
Example ROS launch file that uses depth_image_proc to convert an RGB-depth image pair into a point cloud
<launch>
<!--
To distinguish between the cases where the rgb image is
1280x1024 versus 640x480. This affects the pipeline.
-->
<arg name="high_res_rgb" default="true"/>
<arg name="cloud_input_ns" value="camera/rgb_downsampled"
if="$(arg high_res_rgb)"/>
<arg name="cloud_input_ns" value="camera/rgb" unless="$(arg high_res_rgb)"/>
@sebclaeys
sebclaeys / non_blocking_read.py
Created September 21, 2011 13:56
Python non-blocking read with subprocess.Popen
import fcntl
import os
from subprocess import *
def non_block_read(output):
fd = output.fileno()
fl = fcntl.fcntl(fd, fcntl.F_GETFL)
fcntl.fcntl(fd, fcntl.F_SETFL, fl | os.O_NONBLOCK)
try:
return output.read()