Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@lucasw
lucasw / create_cloud_xyzrgb.py
Created April 25, 2018 00:08
Create PointCloud2 with python with rgb
#!/usr/bin/env python
# PointCloud2 color cube
# https://answers.ros.org/question/289576/understanding-the-bytes-in-a-pcl2-message/
import rospy
import struct
from sensor_msgs import point_cloud2
from sensor_msgs.msg import PointCloud2, PointField
from std_msgs.msg import Header
@lucasw
lucasw / open_source_dos_games.md
Last active January 1, 2024 07:45
Open Source DOS Games

Actual dos games that could at least theoretically be recompiled with the right dos tools, and then played in dosbox or on real hardware.

Doom doesn't count because the dos source is not available.

Look at http://dosgames.com/forum/about19706.html

@lucasw
lucasw / split_bag.sh
Last active November 26, 2023 06:20
Split ros bag into two
#!/bin/bash
# provide input.bag output_prefix time_fraction (0.0-1.0)
echo $1, $2, $3
t0=`rosbag info -y -k start $1`
t1=`rosbag info -y -k end $1`
tfr=`echo "$t0 + ($t1 - $t0) * $3" | bc -l`
echo $t0, $t1, $tfr
# thalf=`echo "($(rosbag info -y -k start output.bag) + $(rosbag info -y -k end output.bag))/2.0" | bc -l`
rosbag filter $1 $2_a.bag "t.secs <= $tfr"
rosbag filter $1 $2_b.bag "t.secs > $tfr"
@lucasw
lucasw / doom_compile_linux.md
Last active September 8, 2023 01:13
Compile Doom on Linux

Anything on github?

The original Id software release is there, but no dos version because of a sound library issue. (Why not release dos source without sound?

This is still under development, try it out:

https://sourceforge.net/projects/prboom-plus/

Where can I checkout the source code?

@lucasw
lucasw / rosrerun.sh
Last active May 13, 2023 13:55
Restart an already running ros node with same remappings
#!/usr/bin/env bash
# Lucas Walter
# source rosrerun.sh my_node_name
# https://answers.ros.org/question/378981/is-it-possible-to-stop-or-restart-a-node-at-run-time/
node_name=$1
echo $node_name
# only take first match
orig_cmd=`ps -eo args | grep "__name:=$node_name" | grep __name | head -n 1`
Around 80 applicants, this playlist found 54 Conceptual Design Review videos (one is hosted on vimeo but there is a video link to it):
https://www.youtube.com/playlist?list=PLfRlBDdqxV8II-dl_kMsYeMaW4dhA2Amo
[![uWaterloo](https://img.youtube.com/vi/xi5wFZ1SiKU/0.jpg)](https://www.youtube.com/watch?v=xi5wFZ1SiKU)
#ROSpiration
@lucasw
lucasw / usb_cameras_with_ros.md
Last active February 21, 2023 23:24
USB/V4L/UVC Cameras with ROS

USB 'web' cameras vs. ethernet and network cameras

Cost and feature/performance trade-offs

Built-in laptop camera

$ lsusb
Bus 002 Device 004: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor
Bus 002 Device 002: ID 8087:8000 Intel Corp. 
@lucasw
lucasw / linux_nes.md
Last active October 30, 2021 15:07
Linux Nintendo NES development

Ubuntu 16.04

install cc65

mkdir ~/other
cd ~/other
git clone https://github.com/cc65/cc65
cd cc65
make
@lucasw
lucasw / linux_commodore_64.md
Last active October 28, 2020 00:23
Linux Commodore 64

Use cc65 just like for NES https://gist.github.com/lucasw/53ece8eed3b99beb6215b42cc686d1a7

Emulator

vice emulator- not in ubuntu repo, need to build from source- on sourceforge:

Need some old autoconf tools (and xa65 cross assembler) to build it:

sudo apt-get install autoconf byacc flex libreadline-dev libxaw7-dev texinfo xa65