-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
54 changed files
with
38,583 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[submodule "ext/eigen"] | ||
path = ext/eigen | ||
url = https://gitlab.com/libeigen/eigen.git | ||
[submodule "ext/glm"] | ||
path = ext/glm | ||
url = https://github.com/g-truc/glm.git | ||
[submodule "ext/glfw"] | ||
path = ext/glfw | ||
url = https://github.com/glfw/glfw.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
cmake_minimum_required( VERSION 3.0 ) | ||
|
||
## Use the variable PROJECT_NAME for changing the target name | ||
set( PROJECT_NAME "NH_TTC" ) | ||
|
||
## Set our project name | ||
project( ${PROJECT_NAME} ) | ||
|
||
# Build GLFW | ||
# Also disable building some of the extra things GLFW has (examples, tests, docs) | ||
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL " " FORCE) | ||
set(GLFW_BUILD_TESTS OFF CACHE BOOL " " FORCE) | ||
set(GLFW_BUILD_DOCS OFF CACHE BOOL " " FORCE) | ||
|
||
# Now actually run cmake on the CMakeLists.txt file found inside of the GLFW directory | ||
add_subdirectory(ext/glfw) | ||
|
||
include_directories( SYSTEM ext ) | ||
include_directories( SYSTEM ext/eigen ) | ||
include_directories( SYSTEM ext/glm ) | ||
include_directories( SYSTEM ext/glad/include ) | ||
include_directories( SYSTEM ext/glfw/include ) | ||
|
||
add_subdirectory( ext ) | ||
|
||
add_library(nativefd STATIC IMPORTED) | ||
if (WIN32) | ||
set_target_properties(nativefd PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/ext/nativefd/lib/nfd.lib) | ||
elseif(APPLE) | ||
set_target_properties(nativefd PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/ext/nativefd/lib/libnfd_osx.a) | ||
else() | ||
set_target_properties(nativefd PROPERTIES IMPORTED_LOCATION ${CMAKE_CURRENT_SOURCE_DIR}/ext/nativefd/lib/libnfd_linux.a) | ||
endif() | ||
|
||
find_package( Threads REQUIRED ) | ||
|
||
if(WIN32) | ||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /O2") | ||
else() | ||
set( CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -O3 -g -Wall -Wextra -Wpedantic -Wno-unused-parameter" ) | ||
endif() | ||
|
||
include_directories( src ) | ||
add_subdirectory( src ) | ||
|
||
if (WIN32) | ||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT run_nhttc) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# NH-TTC: A generalized framework for anticipatory collision avoidance | ||
This repository hosts the companion code to the RSS 2020 paper "NH-TTC: A generalized framework for anticipatory collision avoidance". | ||
Within this repository is both the code for the collision avoidnace, as well as a live, graphical frontend. | ||
|
||
Please see the corresponding webpage for videos of results: http://motion.cs.umn.edu/r/NH-TTC/ | ||
|
||
## Contents | ||
* [Building](#building) | ||
* [Linux](#linux) | ||
* [Windows](#windows) | ||
* [OSX](#osx) | ||
* [Live Demo Usage](#live-demo-usage) | ||
|
||
## Building | ||
### Linux | ||
Install all required components. On a fresh Ubuntu install: | ||
``` | ||
apt install git cmake g++ xorg-dev libgtk-3-dev | ||
``` | ||
|
||
Clone the repository and all submodules: | ||
``` | ||
git clone https://github.com/davisbo/NHTTC.git | ||
cd NHTTC | ||
git submodule init | ||
git submodule update | ||
``` | ||
|
||
Build the repository | ||
``` | ||
mkdir build | ||
cd build | ||
cmake .. | ||
make | ||
``` | ||
|
||
Run the demo | ||
``` | ||
cd src/nhttc_opengl | ||
./run_nhttc | ||
``` | ||
|
||
### Windows | ||
The windows build is set up for using CMake (https://cmake.org/) and Visual Studio (https://visualstudio.microsoft.com/) | ||
Once these are installed, clone the repository and all submodules: | ||
``` | ||
git clone https://github.com/davisbo/NHTTC.git | ||
cd NHTTC | ||
git submodule init | ||
git submodule update | ||
``` | ||
|
||
Configure and generate the project file with CMake, and then open the project file in Visual Studio. | ||
The code can now be compiled and run as normal. | ||
|
||
### OSX | ||
Ensure you have git, cmake, and the xcode dev tools installed. | ||
|
||
Clone the repository and all submodules: | ||
``` | ||
git clone https://github.com/davisbo/NHTTC.git | ||
cd NHTTC | ||
git submodule init | ||
git submodule update | ||
``` | ||
|
||
Build the repository | ||
``` | ||
mkdir build | ||
cd build | ||
cmake .. | ||
make | ||
``` | ||
|
||
Run the demo | ||
``` | ||
cd src/nhttc_opengl | ||
./run_nhttc | ||
``` | ||
|
||
## Live Demo Usage | ||
* Click and drag to move the camera. Scroll the mouse to zoom in or out. | ||
* 'Space': Pauses or Resumes execution. | ||
* 'C': Clears all agents from the simulation. | ||
* 'L': Brings up a file dialog to load a scene file. The 'scenes' folder contains a variety of scenes used in the corresponding paper. | ||
* 'S': Brings up a file dialog to save the current agent positions and goal positions to a scene file. | ||
* 'R': Swaps the initial position of an agent and its goal, giving a quick way to reverse a simulation. | ||
* 'A': Enters adding mode | ||
* First, use the scroll wheel to select and agent type. In order they are: velocity, acceleration, differential drive, smooth differential drive, simple car, smooth car, and then non-reactive versions of each (i.e. agents that don't account for any other agents in planning). Click to lock in that agent type. | ||
* Next, for any agent with orientation, move the mouse to orient the agent. Click once the desired orientation is reached. | ||
* Finally, move the mouse to the desired goal location. Click to lock this in. | ||
* Note that entering adding mode automatically pauses the simulation. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
add_subdirectory( glad ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
add_library( glad src/glad.c include/glad/glad.h ) | ||
target_link_libraries( glad ${CMAKE_DL_LIBS} ) |
Oops, something went wrong.