Skip to content

Instantly share code, notes, and snippets.

Autonomous Systems Interview Preparations

This document contains some interview questions as provided in Udacity's Robotics Engineer Nanodegree program.

Project Instructions

Role Selection

It's time for you to practice your interviewing skills! Over the next several pages, you'll see that we have specific roles in Autonomous Systems, just like the videos you watched before:

@qianqian121
qianqian121 / LIST OF MAT TYPE IN OPENCV.md
Created December 24, 2022 23:02 — forked from yangcha/LIST OF MAT TYPE IN OPENCV.md
LIST OF MAT TYPE IN OPENCV
@qianqian121
qianqian121 / memory_check.cpp
Created December 3, 2022 00:31 — forked from thirdwing/memory_check.cpp
C++ code to print out runtime memory usage
#include <iostream>
#include <fstream>
#include <unistd.h>
void process_mem_usage(double& vm_usage, double& resident_set)
{
vm_usage = 0.0;
resident_set = 0.0;
// the two fields we want
@qianqian121
qianqian121 / glGetTexImage.cpp
Created October 16, 2022 21:36 — forked from bigfacebear/glGetTexImage.cpp
How to read an image by opencv, then copy it to a texture, and read it out at last.
cv::Mat img = cv::imread("img.png");
GLuint tex_in;
glGenTextures(1, &tex_in);
glBindTexture(GL_TEXTURE_2D, tex_in);
/*By practice, the internalParam:
* GL_RGB, GL_RGBA, GL_RGB8, GL_RGBA8 work
* GL_RGB8UI, GL_RGBA8UI don't work
*/
glTexImage2D(GL_TEXTURE_2D, 0, GL_RGB8, img.cols, img.rows, 0, GL_BGR, GL_UNSIGNED_BYTE, img.data); // copy data to texture object
@qianqian121
qianqian121 / GLSL-Noise.md
Created October 13, 2022 05:29 — forked from patriciogonzalezvivo/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}
@qianqian121
qianqian121 / standalone_readpixels.c
Created October 8, 2022 23:23 — forked from mike-bourgeous/standalone_readpixels.c
Linux and GLX example of fast glReadPixels with PBOs
/*
* Minimal Linux- and GLX-specific example of using a pool of Pixel Buffer
* Objects to stream pixel data.
*
* This is a minimal test case for opening an OpenGL window with raw
* X11/Xlib/GLX, drawing a simple test image, and fast PBO-based streaming of
* image data to disk with glReadPixels().
*
* On an NVidia RTX2080 Super, on Ubuntu 20.04, saving to an SSD, this sustains
* 150+fps (peaking at 500+, hitting 900+ if only writing a single file instead
@qianqian121
qianqian121 / GlslSobel.frag
Created October 8, 2022 09:45 — forked from Hebali/GlslSobel.frag
GLSL Fragment Shader: Sobel Edge Detection
// Sobel Edge Detection Filter
// GLSL Fragment Shader
// Implementation by Patrick Hebron
uniform sampler2D texture;
uniform float width;
uniform float height;
void make_kernel(inout vec4 n[9], sampler2D tex, vec2 coord)
{
@qianqian121
qianqian121 / FindOpenMP.cmake
Created October 3, 2022 17:29 — forked from mirkow/FindOpenMP.cmake
Modified FindOpenMP to work with Clang 3.8 under Ubuntu 14.04
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
# file Copyright.txt or https://cmake.org/licensing for details.
#.rst:
# FindOpenMP
# ----------
#
# Finds OpenMP support
#
# This module can be used to detect OpenMP support in a compiler. If
@qianqian121
qianqian121 / example_bicubic.cc
Created September 21, 2022 07:23 — forked from DmitriyKorchemkin/example_bicubic.cc
Sample for bicubic interpolation and autodiff
/* Small example of using bicubic interpolation in ceres with autodiff */
#include <ceres/ceres.h>
#include <ceres/cubic_interpolation.h>
#include <cassert>
using Grid = ceres::Grid2D<double>;
using Interpolator = ceres::BiCubicInterpolator<Grid>;
struct Residual {
@qianqian121
qianqian121 / new empty git branch.md
Created September 7, 2022 20:41 — forked from ozh/new empty git branch.md
Create a new empty branch in Git
$ git checkout --orphan NEWBRANCH
$ git rm -rf .

--orphan creates a new branch, but it starts without any commit. After running the above command you are on a new branch "NEWBRANCH", and the first commit you create from this state will start a new history without any ancestry.

You can then start adding files and commit them and they will live in their own branch. If you take a look at the log, you will see that it is isolated from the original log.