Skip to content

Instantly share code, notes, and snippets.

@PeterMitrano
PeterMitrano / serialize_deserialize_rospy_python3
Created March 4, 2021 15:58
Quick example of how to serialize then deserialize a ROS msg in python 3
from io import BytesIO
from geometry_msgs.msg import Point
p = Point(x=2, y=4)
print(p)
buff = BytesIO()
p.serialize(buff)
serialized_bytes = buff.getvalue()
@mgrider
mgrider / vim-swift-setup.sh
Last active March 22, 2024 01:55 — forked from jlehikoinen/setup.sh
Swift syntax highlighting for Vim
# Swift syntax highlighting for Vim
# Original Source: http://wingsquare.com/blog/swift-script-syntax-highlighting-and-indentation-for-vim-text-editor/
# Another helpful article: https://billyto.github.io/blog/swift-syntax-vim
# More about Vim packages: http://vimcasts.org/episodes/packages/
echo "--- creating ~/.vim/pack/bundle/start dir.."
mkdir -p ~/.vim/pack/bundle/start
echo "--- Cloning Apple's Swift repo.."
@nalt
nalt / Shell: Check launch files against DTD
Last active June 25, 2023 17:25
Roslaunch XML schema, DTD and XSD
wget https://gist.githubusercontent.com/nalt/dfa2abc9d2e3ae4feb82ca5608090387/raw/roslaunch.dtd
find /opt/ros -iname '*.launch' -exec xmllint --valid --dtdvalid roslaunch.dtd --noout {} ';' 2>&1 | grep -v "no DTD found" | grep -v '<launch>'
# Missing DOCTYPE is reported as an error.
# $(...) will be rejected by this DTD for enum attributes
@ClintLiddick
ClintLiddick / rust-robotics-libraries.md
Last active April 3, 2023 02:38
Rust Libraries for Robotics

Motivation

tl;dr I want to use Rust to program robots. Help me find the best core libraries to build on.

Robotic systems require high performance and reliability, but also have enormous complexity in terms of algorithms employed, number of subsystems, embedded hardware control, and other metrics. Development is mostly split between C++ for performance and safety critical components, and MatLab or Python for quick research or task iteration.

@ocornut
ocornut / imgui_node_graph_test.cpp
Last active April 23, 2024 19:02
Node graph editor basic demo for ImGui
// Creating a node graph editor for Dear ImGui
// Quick sample, not production code!
// This is quick demo I crafted in a few hours in 2015 showcasing how to use Dear ImGui to create custom stuff,
// which ended up feeding a thread full of better experiments.
// See https://github.com/ocornut/imgui/issues/306 for details
// Fast forward to 2023, see e.g. https://github.com/ocornut/imgui/wiki/Useful-Extensions#node-editors
// Changelog
// - v0.05 (2023-03): fixed for renamed api: AddBezierCurve()->AddBezierCubic().
@CristinaSolana
CristinaSolana / gist:1885435
Created February 22, 2012 14:56
Keeping a fork up to date

1. Clone your fork:

git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git

2. Add remote from original repository in your forked repository:

cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream