Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bullet Physics Integration #1 #91

Merged
merged 92 commits into from Aug 16, 2019
Merged
Show file tree
Hide file tree
Changes from 77 commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
e4e6ad4
Object loading minimal demo v0.1: loading cheezit box into skokloster…
Jun 3, 2019
3d647e3
Merge branch 'bullet-integration' of github.com:hzyjerry/habitat-sim
Jun 3, 2019
0f6c81b
Update physics example with build error
Jun 4, 2019
c6f3709
SceneManager debugging checkpoint: segfault
Jun 6, 2019
786081a
Refactor physics manager; gravity working; occasional segfault
Jun 7, 2019
617f25c
Minimal Friday demo; with segfault; position & mass hardcoded
Jun 7, 2019
06fe5a1
Fix segfault issue by refactoring
Jun 9, 2019
ec445a1
Collision working for GIC demo; use simplified collision shape (box &…
Jun 9, 2019
b97ad69
Surreal apt checkpoint (not working)
Jun 10, 2019
236ea39
Static mesh collision working (applied correct transform to collision…
Jun 10, 2019
6f9d891
Convex hull collision shape working; middle point as center of mass
Jun 10, 2019
cc1a6b2
Segfault debugging checkpoint
Jun 12, 2019
1d6a215
Erik's fixes
erikwijmans Jun 12, 2019
831f7cd
Merge pull request #1 from facebookresearch/master
hzyjerry Jun 25, 2019
7406de7
Resolve merge conflict
Jun 25, 2019
40c5fb3
Resolve merge conflicts
Jun 25, 2019
04258e7
Resolve merge conflict to build
Jun 28, 2019
df3b311
Clean up BulletObject and Physics Manager interface (with Corrade bui…
Jun 28, 2019
7e64cd8
Fix meshData interface issue, compile ready
Jul 1, 2019
dcb7697
Update
Jul 1, 2019
e9a44d5
Merge branch 'master' of https://github.com/facebookresearch/habitat-sim
Jul 1, 2019
74ee87a
Update class internal variable name, address Erik's comments
hzyjerry Jul 1, 2019
54e2b2b
Vangoth room working.
hzyjerry Jul 2, 2019
6254ce8
Clean up; class variable rename; bullet cmake update
hzyjerry Jul 2, 2019
dca1880
More cleanups
hzyjerry Jul 2, 2019
b74de0c
Replica and Surreal mesh loading functions working
hzyjerry Jul 5, 2019
87c1ce5
Refactor to use smart pointer; introduce applyForce/applyPoke functio…
hzyjerry Jul 11, 2019
f38d352
Refactor to hide Magnum-Bullet/Bullet raw details from users, includi…
hzyjerry Jul 12, 2019
f2f28bb
modified: src/esp/assets/ResourceManager.cpp
aclegg3 Jul 12, 2019
f584d9e
modified: src/esp/assets/MeshMetaData.h
aclegg3 Jul 12, 2019
a71b048
Remove smart pointer get()
hzyjerry Jul 14, 2019
d292e23
modified: src/esp/assets/ResourceManager.cpp
aclegg3 Jul 16, 2019
84945ca
Object instancing checkpoint: decoupled load and add object
hzyjerry Jul 17, 2019
d2e2221
Rebase from master
hzyjerry Jul 17, 2019
d28b0d7
WIP: rebasing on Alex's changes, added instancing; rendering mesh mis…
hzyjerry Jul 22, 2019
939dc35
Merge
hzyjerry Jul 22, 2019
89cc0b8
Merge branch 'master' of https://github.com/facebookresearch/habitat-…
hzyjerry Jul 22, 2019
a55f458
Add sourced default physics config file + bug fixes and refactoring.
aclegg3 Jul 23, 2019
9f59c4f
Separate PhysicsManagaer/RigidObject abstraction from Bullet implemen…
aclegg3 Jul 26, 2019
d0c541b
Merge branch 'master' of https://github.com/facebookresearch/habitat-…
hzyjerry Jul 29, 2019
3c3c2e1
Merge branch 'master' into bullet-integration
hzyjerry Jul 29, 2019
6e67b42
Enabled Bullet physics conditional build.
aclegg3 Jul 29, 2019
06527a0
Merge branch 'bullet-integration' of github.com:hzyjerry/habitat-sim …
hzyjerry Jul 29, 2019
754ab11
Ran clang-format
hzyjerry Jul 29, 2019
f77bf4a
Run py format
hzyjerry Jul 29, 2019
6870423
Refactor
aclegg3 Jul 30, 2019
7d7c19e
Merge branch 'bullet-integration' of https://github.com/hzyjerry/habi…
aclegg3 Jul 30, 2019
b37c361
Allow removing last kinematic object; refactor addObject to only live…
hzyjerry Jul 31, 2019
7f9533a
Remove dynamic object and disassociate from bullet world
hzyjerry Jul 31, 2019
6fafa67
Getter/setter for global scene states
hzyjerry Aug 1, 2019
0c9c562
Refactored PhysicsManager object ID management to use std::map instea…
aclegg3 Aug 2, 2019
4abefac
Merge branch 'master' of https://github.com/facebookresearch/habitat-…
hzyjerry Aug 2, 2019
0c04bbb
Full getter/setter functions WIP
hzyjerry Aug 3, 2019
84cc664
Added Attributes objects. Replaced PhysicsObjectMetaData usage with A…
aclegg3 Aug 5, 2019
aa6f863
Merge; update bullet getter/setters
hzyjerry Aug 6, 2019
864451a
Update bullet setter/getters (except COM & linear factor)
hzyjerry Aug 6, 2019
4edbaa9
Isort changes
hzyjerry Aug 6, 2019
eba6af7
Fix isort conflict
hzyjerry Aug 6, 2019
fb96e0c
Minor refactoring of scene loading. Enabled pybind build.
aclegg3 Aug 6, 2019
71ff5d0
CircleCI include necessary packages
hzyjerry Aug 6, 2019
82a3b47
CPP library updates
hzyjerry Aug 6, 2019
9561717
Update circle ci download data script
hzyjerry Aug 6, 2019
5d38cef
Fixed CI bug on multiple Simulator initialization.
aclegg3 Aug 7, 2019
2d4ad65
Moved Manager<Importer> out of ResourceManager. Fixed ResourceManager…
aclegg3 Aug 7, 2019
c37eafa
Resolve conflict with master
hzyjerry Aug 8, 2019
b6f967b
Fix tinyobjloader issue
hzyjerry Aug 8, 2019
5f7af52
Pass vec & matrix data by reference
hzyjerry Aug 8, 2019
e53867a
Fix references; add transformation getters; remove logs
hzyjerry Aug 8, 2019
4f69ee6
Added PhysicsManager to Simulator class.
aclegg3 Aug 8, 2019
34295ef
Merge branch 'bullet-integration' of https://github.com/hzyjerry/habi…
aclegg3 Aug 8, 2019
4a314b3
Update README with instructions for downloading object_v0.1.zip; runn…
hzyjerry Aug 8, 2019
c6d5b5d
Merge branch 'bullet-integration' of github.com:hzyjerry/habitat-sim …
hzyjerry Aug 8, 2019
dffe6a7
Removed logging, removed reference getters and unused functions
aclegg3 Aug 8, 2019
78d92c5
Merge branch 'bullet-integration' of https://github.com/hzyjerry/habi…
aclegg3 Aug 8, 2019
b48c7eb
Update readme for build instructions
hzyjerry Aug 9, 2019
f78cb7b
Add RigidObject type enum; clean up based on review
hzyjerry Aug 9, 2019
6278e3b
Clean up
hzyjerry Aug 9, 2019
5a7f575
Changed shared pointers to raw pointers for physicsManager existingOb…
aclegg3 Aug 12, 2019
bcdf7a7
Merge branch 'bullet-integration' of https://github.com/hzyjerry/habi…
aclegg3 Aug 12, 2019
acdd01c
Added getter/setter for object MotionType, added torque aplpication t…
aclegg3 Aug 12, 2019
4fc44c7
Merge branch 'master' into bullet-integration
aclegg3 Aug 12, 2019
06d95d4
Setup pysics interface in Simulator class for pybinding.
aclegg3 Aug 12, 2019
913b98f
Merge branch 'bullet-integration' of https://github.com/hzyjerry/habi…
aclegg3 Aug 13, 2019
75febd5
isort change
aclegg3 Aug 13, 2019
3968ca6
Fix reference to optional setting bug
aclegg3 Aug 14, 2019
2cbba91
Merge 'master' changes into bullet-integration
aclegg3 Aug 15, 2019
ba8b915
Added physics profiling to example.py, updated readme, added pybindin…
aclegg3 Aug 16, 2019
61e84e9
Remove DebugTools
aclegg3 Aug 16, 2019
0c7b8e7
Fixed Simulator applyTorque copy paste bug.
aclegg3 Aug 16, 2019
3dc693e
Merge remote-tracking branch 'public/master' into bullet-integration
aclegg3 Aug 16, 2019
dcda359
Merge remote-tracking branch 'public/master' into bullet-integration
aclegg3 Aug 16, 2019
3245e7a
merge and deps/magnum,corrade
aclegg3 Aug 16, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 2 additions & 2 deletions .circleci/config.yml
Expand Up @@ -16,7 +16,7 @@ jobs:
- run:
name: setup
command: |
sudo pip install -U black "isort[pyproject]" numpy pytest sphinx
sudo pip install -U black "isort[pyproject]" numpy pytest sphinx pillow tqdm
sudo pip install -r requirements.txt --progress-bar off
- run:
name: run black
Expand Down Expand Up @@ -166,7 +166,7 @@ jobs:
name: Download test data
command: |

if [ ! -d ./habitat-sim/data ]
if [ ! -d ./habitat-sim/data/scene_datasets/habitat-test-scenes/van-gogh-room.glb ]
then
cd habitat-sim
wget http://dl.fbaipublicfiles.com/habitat/habitat-test-scenes.zip
Expand Down
7 changes: 7 additions & 0 deletions README.md
Expand Up @@ -160,6 +160,13 @@ To run the above benchmarks on your machine, see instructions in the [examples](
Use W/A/S/D keys to move forward/left/backward/right and arrow keys to control gaze direction (look up/down/left/right).
Try to find the picture of a woman surrounded by a wreath.
Have fun!
1. **Physical interactions**: If you would like to try out habitat with dynamical objects (under development), first install [Bullet Physics](https://github.com/bulletphysics/bullet3/). Then download pre-processed object set from this [link](http://dl.fbaipublicfiles.com/habitat/objects_v0.1.zip) and extract as `habitat-sim/data/objects/`. Next use
```bash
python setup.py install --bullet # build habitat with bullet physics
build/viewer --enable-physics /path/to/data/scene_datasets/habitat-test-scenes/van-gogh-room.glb
```
Move around, and press O key to add object, press P/F to interact with the last added object, press V to remove, and press V key to invert gravity.

1. **Non-interactive testing**: Run the example script:
```bash
python examples/example.py --scene /path/to/data/scene_datasets/habitat-test-scenes/skokloster-castle.glb
Expand Down
12 changes: 12 additions & 0 deletions data/default.phys_scene_config.json
@@ -0,0 +1,12 @@
{
"physics simulator": "bullet",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO it makes more sense to not have spaces in names. _ or - makes more sense as that's more inline with what people expect.

"timestep": 0.01,
"gravity": [0,-9.8,0],
"friction coefficient": 0.4,
"restitution coefficient": 0.1,
"rigid object paths":[
"objects/cheezit",
"objects/chefcan",
"objects/banana"
]
}
8 changes: 7 additions & 1 deletion setup.py
Expand Up @@ -37,6 +37,12 @@ def build_parser():
help="""Build in headless mode.
Use "HEADLESS=True pip install ." to build in headless mode with pip""",
)
parser.add_argument(
"--bullet",
dest="use_bullet",
action="store_true",
help="""Build with Bullet simulation engine.""",
)
parser.add_argument(
"--force-cmake",
"--cmake",
Expand Down Expand Up @@ -87,7 +93,6 @@ def build_parser():
"This is nice for incrementally building for development but "
"can cause install magnum bindings to fall out-of-sync",
)

return parser


Expand Down Expand Up @@ -230,6 +235,7 @@ def build_extension(self, ext):
# NOTE: BUILD_TEST is intentional as opposed to BUILD_TESTS which collides
# with definition used by some of our dependencies
cmake_args += ["-DBUILD_TEST={}".format("ON" if args.build_tests else "OFF")]
cmake_args += ["-DWITH_BULLET={}".format("ON" if args.use_bullet else "OFF")]
cmake_args += [
"-DBUILD_DATATOOL={}".format("ON" if args.build_datatool else "OFF")
]
Expand Down
3 changes: 3 additions & 0 deletions src/CMakeLists.txt
Expand Up @@ -46,6 +46,8 @@ include(cmake/dependencies.cmake)
# include source dirs
include_directories(${PROJECT_SOURCE_DIR})

# Physics
add_definitions(-DBT_ENABLE_PROFILE)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this needed globally, or just for the things that link to bullet? If the latter, you can use target_compile_definitions(<lib> PUBLIC BT_ENABLE_PROFILE) -- that'll also make it available to anything that links with that lib.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this make everything really slow? (That's what profiling usually does, in my experience.) Shouldn't that be configurable via an option() (and the recently-added configure_file()) instead?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It shouldn't make things very slow. In addition, you can call an API that makes it almost for free. See Bullet/src/LinearMath/btQuickprof.h

# compiler define for enabling ptex support
if(BUILD_PTEX_SUPPORT)
message("Building with ptex support")
Expand All @@ -59,6 +61,7 @@ add_subdirectory(esp/gfx/)
add_subdirectory(esp/assets)
add_subdirectory(esp/io)
add_subdirectory(esp/scene)
add_subdirectory(esp/physics)
add_subdirectory(esp/nav)
add_subdirectory(esp/agent)
add_subdirectory(esp/sensor)
Expand Down
7 changes: 6 additions & 1 deletion src/cmake/dependencies.cmake
Expand Up @@ -112,6 +112,8 @@ if(NOT USE_SYSTEM_MAGNUM)

# These are enabled by default but we don't need them right now -- disabling
# for slightly faster builds. If you need any of these, simply delete a line.
set(WITH_INTERCONNECT OFF CACHE BOOL "" FORCE)
set(WITH_TESTSUITE OFF CACHE BOOL "" FORCE)
set(WITH_DEBUGTOOLS OFF CACHE BOOL "" FORCE)
set(WITH_PRIMITIVES OFF CACHE BOOL "" FORCE)
set(WITH_TEXT OFF CACHE BOOL "" FORCE)
Expand All @@ -125,8 +127,11 @@ if(NOT USE_SYSTEM_MAGNUM)
set(WITH_STBIMAGEIMPORTER ON CACHE BOOL "WITH_STBIMAGEIMPORTER" FORCE)
set(WITH_STBIMAGECONVERTER ON CACHE BOOL "WITH_STBIMAGECONVERTER" FORCE)
set(WITH_SDL2APPLICATION OFF CACHE BOOL "WITH_SDL2APPLICATION" FORCE)
set(WITH_EIGEN ON CACHE BOOL "WITH_EIGEN" FORCE)
# Debug tool to visualize physics interaction
set(WITH_PRIMITIVES ON CACHE BOOL "WITH_PRIMITIVES" FORCE)
set(WITH_DEBUGTOOLS ON CACHE BOOL "WITH_DEBUGTOOLS" FORCE)
set(WITH_GLFWAPPLICATION OFF CACHE BOOL "WITH_GLFWAPPLICATION" FORCE)
set(WITH_EIGEN ON CACHE BOOL "WITH_EIGEN" FORCE) # Eigen integration
if(BUILD_PYTHON_BINDINGS)
set(WITH_PYTHON ON CACHE BOOL "" FORCE) # Python bindings
endif()
Expand Down
259 changes: 259 additions & 0 deletions src/esp/assets/Attributes.cpp
@@ -0,0 +1,259 @@
// Copyright (c) Facebook, Inc. and its affiliates.
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.

#include "Attributes.h"
#include <algorithm>

namespace esp {
namespace assets {

Attributes::Attributes() {
doubleMap_ = std::map<std::string, double>();
intMap_ = std::map<std::string, int>();
stringMap_ = std::map<std::string, std::string>();
magnumVec3Map_ = std::map<std::string, Magnum::Vector3>();
vecStringsMap_ = std::map<std::string, std::vector<std::string> >();
}

// return true if any container has the key
bool Attributes::exists(std::string key) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
bool Attributes::exists(std::string key) {
bool Attributes::exists(const std::string& key) {

if (doubleMap_.count(key) > 0)
hzyjerry marked this conversation as resolved.
Show resolved Hide resolved
return true;
if (intMap_.count(key) > 0)
return true;
if (stringMap_.count(key) > 0)
return true;
if (magnumVec3Map_.count(key) > 0)
return true;
if (vecStringsMap_.count(key) > 0)
return true;

return false;
}

// check if an attribute of a specific type exists
bool Attributes::existsAs(DataType t, std::string key) {
if (t == DOUBLE)
if (doubleMap_.count(key) > 0)
return true;
if (t == INT)
if (intMap_.count(key) > 0)
return true;
if (t == STRING)
if (stringMap_.count(key) > 0)
return true;
if (t == MAGNUMVEC3)
if (magnumVec3Map_.count(key) > 0)
return true;
if (t == VEC_STRINGS)
if (vecStringsMap_.count(key) > 0)
return true;
return false;
}

// count the number of containers with the key
int Attributes::count(std::string key) {
int numAttributes = 0;
if (doubleMap_.count(key) > 0)
numAttributes++;
if (intMap_.count(key) > 0)
numAttributes++;
if (stringMap_.count(key) > 0)
numAttributes++;
if (magnumVec3Map_.count(key) > 0)
numAttributes++;
if (vecStringsMap_.count(key) > 0)
numAttributes++;
return numAttributes;
}

// erase the key from all maps
void Attributes::eraseAll(std::string key) {
if (doubleMap_.count(key) > 0)
doubleMap_.erase(key);
if (intMap_.count(key) > 0)
intMap_.erase(key);
if (stringMap_.count(key) > 0)
stringMap_.erase(key);
if (magnumVec3Map_.count(key) > 0)
magnumVec3Map_.erase(key);
if (vecStringsMap_.count(key) > 0)
vecStringsMap_.erase(key);
}

// erase the key from a particular map
void Attributes::eraseAs(DataType t, std::string key) {
if (t == DOUBLE) {
if (doubleMap_.count(key) > 0)
doubleMap_.erase(key);
} else if (t == INT) {
if (intMap_.count(key) > 0)
intMap_.erase(key);
} else if (t == STRING) {
if (stringMap_.count(key) > 0)
stringMap_.erase(key);
} else if (t == MAGNUMVEC3) {
if (magnumVec3Map_.count(key) > 0)
magnumVec3Map_.erase(key);
} else if (t == VEC_STRINGS) {
if (vecStringsMap_.count(key) > 0)
vecStringsMap_.erase(key);
}
}

// clear all maps
void Attributes::clear() {
doubleMap_.clear();
intMap_.clear();
stringMap_.clear();
magnumVec3Map_.clear();
vecStringsMap_.clear();
}

// clear only a particular map
void Attributes::clearAs(DataType t) {
if (t == DOUBLE) {
doubleMap_.clear();
} else if (t == INT) {
intMap_.clear();
} else if (t == STRING) {
stringMap_.clear();
} else if (t == MAGNUMVEC3) {
magnumVec3Map_.clear();
} else if (t == VEC_STRINGS) {
vecStringsMap_.clear();
}
}

//----------------------------------------//
// Type specific getters/setters
//----------------------------------------//
// return the queried entry in the double map
// will throw an exception if the key does not exist in the double map
double Attributes::getDouble(std::string key) {
return doubleMap_.at(key);
}

// set a double attribute key->val
void Attributes::setDouble(std::string key, double val) {
doubleMap_[key] = val;
}

int Attributes::getInt(std::string key) {
return intMap_.at(key);
}

void Attributes::setInt(std::string key, int val) {
intMap_[key] = val;
}

std::string Attributes::getString(std::string key) {
return stringMap_.at(key);
}

void Attributes::setString(std::string key, std::string val) {
stringMap_[key] = val;
}

Magnum::Vector3 Attributes::getMagnumVec3(std::string key) {
return magnumVec3Map_.at(key);
}

void Attributes::setMagnumVec3(std::string key, Magnum::Vector3 val) {
magnumVec3Map_[key] = val;
}
std::vector<std::string> Attributes::getVecStrings(std::string key) {
return vecStringsMap_.at(key);
}

void Attributes::setVecStrings(std::string key, std::vector<std::string> val) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
void Attributes::setVecStrings(std::string key, std::vector<std::string> val) {
void Attributes::setVecStrings(const std::string& key, const std::vector<std::string>& val) {

Particularly important for std::vector

vecStringsMap_[key] = val;
}

// add a string to a string vector (to avoid get/set copying)
void Attributes::appendVecStrings(std::string key, std::string val) {
vecStringsMap_[key].push_back(val);
}

void Attributes::removeFromVecString(std::string key, std::string val) {
std::vector<std::string>& stringVec = vecStringsMap_[key];
std::vector<std::string>::iterator position =
std::find(stringVec.begin(), stringVec.end(), val);
if (position != stringVec.end()) // == .end() means the element was not found
stringVec.erase(position);
}

// return a formated string exposing the current contents of the attributes maps
std::string Attributes::listAttributes() {
std::string attributes =
"List of attributes: \n----------------------------------------\n";

attributes += "\nDoubles: \n";
for (auto it = doubleMap_.begin(); it != doubleMap_.end(); ++it) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You do not have to change.

Just FYI: A simpler way is to:
for (auto it : double_Map)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yay for auto and range-based for loops tho :)

attributes += it->first + " : " + std::to_string(it->second) + "\n";
}

attributes += "\nInts: \n";
for (auto it = intMap_.begin(); it != intMap_.end(); ++it) {
attributes += it->first + " : " + std::to_string(it->second) + "\n";
}

attributes += "\nStrings: \n";
for (auto it = stringMap_.begin(); it != stringMap_.end(); ++it) {
attributes += it->first + " : " + it->second + "\n";
}

attributes += "\nMagnum Vector3s: \n";
for (auto it = magnumVec3Map_.begin(); it != magnumVec3Map_.end(); ++it) {
attributes += it->first + " : [" + std::to_string(it->second[0]) + ", " +
std::to_string(it->second[1]) + ", " +
std::to_string(it->second[2]) + "]\n";
}

attributes += "\nVectors of Strings: \n";
for (auto it = vecStringsMap_.begin(); it != vecStringsMap_.end(); ++it) {
attributes += it->first + " : [";
for (auto vs_it = it->second.begin(); vs_it != it->second.end(); ++vs_it) {
if (vs_it != it->second.begin())
attributes += ", ";
attributes += *vs_it;
}
attributes += "]\n";
}

attributes += "\n----------------------------------------\n\n";
return attributes;
}

PhysicsObjectAttributes::PhysicsObjectAttributes() {
// fill necessary attribute defaults
setDouble("mass", 1.0);
setDouble("margin", 0.01);
setDouble("scale", 1.0);
setMagnumVec3("COM", Magnum::Vector3(0));
setMagnumVec3("inertia", Magnum::Vector3(0., 0., 0.));
setDouble("frictionCoefficient", 0.5);
setDouble("restitutionCoefficient", 0.6);
setDouble("linDamping", 0.2);
setDouble("angDamping", 0.2);
setString("originHandle", "");
setString("renderMeshHandle", "");
setString("collisionMeshHandle", "");
}

PhysicsSceneAttributes::PhysicsSceneAttributes() {
setMagnumVec3("gravity", Magnum::Vector3(0, -9.8, 0));
setDouble("frictionCoefficient", 0.4);
setDouble("restitutionCoefficient", 0.05);
setString("renderMeshHandle", "");
setString("collisionMeshHandle", "");
}

PhysicsManagerAttributes::PhysicsManagerAttributes() {
setString("simulator", "none");
setDouble("timestep", 0.01);
setInt("maxSubsteps", 10);
}
} // namespace assets
} // namespace esp