This is a small tutorial on how to debug a ROS2 C++ node usign VSCode.
This implementation was done using:
#!/usr/bin/env python3 | |
# Adapted from: | |
# | |
# https://gist.github.com/mjcarroll/f620ef8d88efc3a03711259d6fc9a578 | |
# | |
# Original gist fixed to work with latest version of cartographer: | |
# | |
# [~/sensmetry/slam/cartographer:master]λ git describe --always | |
# bcd5486 |
// A simple quickref for Eigen. Add anything that's missing. | |
// Main author: Keir Mierle | |
#include <Eigen/Dense> | |
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d. | |
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols. | |
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd. | |
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major. | |
Matrix3f P, Q, R; // 3x3 float matrix. |
The instructions are based on this answers.ros.org thread.
You may need the latest pip, follow the official instructions.
Install bloom:
#!/bin/bash | |
prezto.sh(){ | |
clear | |
sudo apt-get install -y git | |
sudo apt-get update && sudo apt-get install -y zsh | |
# Get prezto | |
git clone --recursive https://github.com/sorin-ionescu/prezto.git ~/.zprezto | |
# Backup zsh config if it exists |
Simple guide for setting up OTG modes on the Raspberry Pi Zero - By Andrew Mulholland (gbaman).
The Raspberry Pi Zero (and model A and A+) support USB On The Go, given the processor is connected directly to the USB port, unlike on the B, B+ or Pi 2 B, which goes via a USB hub.
Because of this, if setup to, the Pi can act as a USB slave instead, providing virtual serial (a terminal), virtual ethernet, virtual mass storage device (pendrive) or even other virtual devices like HID, MIDI, or act as a virtual webcam!
It is important to note that, although the model A and A+ can support being a USB slave, they are missing the ID pin (is tied to ground internally) so are unable to dynamically switch between USB master/slave mode. As such, they default to USB master mode. There is no easy way to change this right now.
It is also important to note, that a USB to UART serial adapter is not needed for any of these guides, as may be documented elsewhere across the int
// sending to sender-client only | |
socket.emit('message', "this is a test"); | |
// sending to all clients, include sender | |
io.emit('message', "this is a test"); | |
// sending to all clients except sender | |
socket.broadcast.emit('message', "this is a test"); | |
// sending to all clients in 'game' room(channel) except sender |
cmake_minimum_required(VERSION 2.8.3) | |
project(foo) | |
if(NOT WIN32) | |
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall") | |
endif() | |
# find dependencies |
Look at LSB init scripts for more information.
Copy to /etc/init.d
:
# replace "$YOUR_SERVICE_NAME" with your service's name (whenever it's not enough obvious)