Skip to content

Instantly share code, notes, and snippets.

View saching13's full-sized avatar
🤖
Roboting

Sachin Guruswamy saching13

🤖
Roboting
View GitHub Profile
@jhurliman
jhurliman / Dockerfile
Last active May 9, 2022 23:20
Build depthai-ros from source (OAK-D Luxonis DepthAI)
FROM ros:noetic-ros-core-focal
# Install dependencies for depthai, ros, and build
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
libjpeg-dev \
libopencv-dev \
libpng-dev \
@sorny
sorny / x11_forwarding_macos_docker.md
Last active July 26, 2024 04:28
X11 forwarding with macOS and Docker

X11 forwarding on macOS and docker

A quick guide on how to setup X11 forwarding on macOS when using docker containers requiring a DISPLAY. Works on both Intel and M1 macs!

This guide was tested on:

  • macOS Catalina 10.15.4
  • docker desktop 2.2.0.5 (43884) - stable release
  • XQuartz 2.7.11 (xorg-server 1.18.4)
  • Macbook Pro (Intel)
@ialhashim
ialhashim / eigen_matrix_helper.cpp
Created July 27, 2014 21:14
Eigen matrix helper functions - from and to std::vector and from and to file (Qt)
template<typename Scalar, typename Container>
inline static Eigen::Matrix<Scalar,-1,-1> toEigenMatrix( const Container& vectors ){
typedef typename Container::value_type VectorType;
typedef typename VectorType::value_type Scalar;
Eigen::Matrix<Scalar,-1,-1> M(vectors.size(), vectors.front().size());
for(size_t i = 0; i < vectors.size(); i++)
for(size_t j = 0; j < vectors.front().size(); j++)
M(i,j) = vectors[i][j];
return M;
}