Skip to content

Commit

Permalink
Merge pull request #197 from USU-Robosub/feature/slam_kyler
Browse files Browse the repository at this point in the history
Added data structures and basic project setup. ...As well as some other things...
  • Loading branch information
madfrog54321 authored Feb 24, 2017
2 parents 0b68363 + 661ab81 commit 278f759
Show file tree
Hide file tree
Showing 14 changed files with 11,514 additions and 16 deletions.
224 changes: 209 additions & 15 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,26 +1,220 @@
###Git Ignore Filetypes###
Release/
Debug/
Build/
Drivers/
googletest/
TestFootage


# JetBrains
.idea/

#compiled source#
#################

# Created by https://www.gitignore.io/api/macos,windows,linux,jetbrains,cmake,c++,node

### C++ ###
# Prerequisites
*.d
*.cbp

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

Release/
Debug/
Build/
# Fortran module files
*.mod
*.smod

#cmake-generated files#
.cmake
# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

### CMake ###
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake-build-*
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake

### JetBrains ###
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839

# User-specific stuff:
.idea/

## File-based project format:
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties
fabric.properties

### JetBrains Patch ###
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721

# *.iml
# modules.xml
# .idea/misc.xml
# *.ipr

### Linux ###
*~

# temporary files which can be created if a process still has a handle open of a deleted file
.fuse_hidden*

# KDE directory preferences
.directory

# NPM
# Linux trash folder which might appear on any partition or disk
.Trash-*

# .nfs files are created when an open file is removed but is still being accessed
.nfs*

### macOS ###
*.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon


# Thumbnails
._*

# Files that might appear in the root of a volume
.DocumentRevisions-V100
.fseventsd
.Spotlight-V100
.TemporaryItems
.Trashes
.VolumeIcon.icns
.com.apple.timemachine.donotpresent

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk

### Node ###
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# Submodules
Drivers/
googletest/
# Typescript v1 declaration files
typings/

TestFootage
# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env


### Windows ###
# Windows thumbnail cache files
Thumbs.db
ehthumbs.db
ehthumbs_vista.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk

# End of https://www.gitignore.io/api/macos,windows,linux,jetbrains,cmake,c++,node
2 changes: 2 additions & 0 deletions SLAM/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
slam_tests
libslam.a
11 changes: 11 additions & 0 deletions SLAM/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
cmake_minimum_required(VERSION 2.8.9)
project(SLAM)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wall -Wextra -pedantic") # -Werror

file(GLOB_RECURSE HEADER_FILES "include/*.h" "include/*.hpp")
file(GLOB_RECURSE SOURCE_FILES "src/*.cpp" "src/*.hpp" "src/*.h")
file(GLOB_RECURSE TEST_SOURCE_FILES "test/*.cpp" "test/*.hpp" "test/*.h")

add_library(slam STATIC ${HEADER_FILES} ${SOURCE_FILES})
add_executable(slam_tests ${HEADER_FILES} ${SOURCE_FILES} ${TEST_SOURCE_FILES})
44 changes: 43 additions & 1 deletion SLAM/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,43 @@
Use `src` and `include` folders for code.

# SLAM
Simultaneous Location and Mapping for the USU Autonomous RoboSub.

---

## Contributing

Use `src` and `include` folders for code.

### Namespace `slam`

Please place everything in `namespace slam`. For example:

```c++
namespace slam {
class MyClass {...}
struct MyStruct {...}
void doSomething() {...}
}
```
### Tests
Use `test` folder for writing unit tests. Every concrete class should have
a set of associated unit tests.
### How to build
```bash
mkdir out
cd out
cmake ..
make slam # <-- libslam.a is created
```

### How to run tests
```bash
mkdir out
cd out
cmake ..
make slam_tests # <-- slam_tests is created
./slam_tests
```
25 changes: 25 additions & 0 deletions SLAM/include/CameraFrame.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
//
// Created by Kyler Jensen on 2/15/17.
//

#ifndef SLAM_CAMERAFRAME_H
#define SLAM_CAMERAFRAME_H

#include "_tmp.h"
#include "RGBColor.h"
#include <vector>

namespace slam {

struct CameraFrame {

const Chrono timestamp;
const std::vector<std::vector<RGBColor>> data;

};

}



#endif //SLAM_CAMERAFRAME_H
16 changes: 16 additions & 0 deletions SLAM/include/DepthMap.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
//
// Created by Kyler Jensen on 2/15/17.
//

#ifndef SLAM_DEPTHMAP_H
#define SLAM_DEPTHMAP_H

namespace slam {

struct DepthMap {
//TODO
};

}

#endif //SLAM_DEPTHMAP_H
17 changes: 17 additions & 0 deletions SLAM/include/Pose.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
//
// Created by Kyler Jensen on 2/15/17.
//

#ifndef SLAM_POSE_H
#define SLAM_POSE_H

namespace slam {

struct Pose {
//TODO
};

}


#endif //SLAM_POSE_H
23 changes: 23 additions & 0 deletions SLAM/include/RGBColor.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
//
// Created by Kyler Jensen on 2/22/17.
//

#ifndef SLAM_RGBCOLOR_H
#define SLAM_RGBCOLOR_H

#include <cstdint>

namespace slam {

struct RGBColor {

const uint8_t red;
const uint8_t green;
const uint8_t blue;
const uint8_t gray;

};

}

#endif //SLAM_RGBCOLOR_H
Loading

0 comments on commit 278f759

Please sign in to comment.