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

Physics update #480

Merged
merged 37 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
b61b649
Add static assets
chrismbirmingham May 25, 2023
8845e95
Update templates to include jbc and rocks
chrismbirmingham May 25, 2023
3557127
Update scene binding for template and sphere geometry and textures
chrismbirmingham May 25, 2023
dcb0a86
Update templates on nodesettings
chrismbirmingham May 25, 2023
fc3fb34
Add rocks and moon sandbox
chrismbirmingham May 25, 2023
4bbdec1
Update rocks looks and mass
chrismbirmingham May 25, 2023
5deddbe
Add start location
chrismbirmingham May 29, 2023
78870c0
Update rock textures
chrismbirmingham Jun 7, 2023
f5c8146
WIP with latest base elements
chrismbirmingham Jun 9, 2023
1807c40
organize static content
chrismbirmingham Jun 22, 2023
c8a2e90
Add objects to moonbase
chrismbirmingham Jun 22, 2023
fa37e60
Add space template for objects
chrismbirmingham Jun 22, 2023
b8cfb6a
sort object definitions and bugfix science pad
chrismbirmingham Jun 22, 2023
9358263
Add indicator to science pad for moon rocks
chrismbirmingham Jun 23, 2023
23d0eb9
Demo ready update
chrismbirmingham Jun 29, 2023
9324a47
Ready for demo pt 2
chrismbirmingham Jun 29, 2023
44cc970
Finishing setup for simple demo
chrismbirmingham Jul 1, 2023
c4261e1
Update for location and settings bugs
chrismbirmingham Jul 11, 2023
9431a1e
Update to babylon 6.14.0
chrismbirmingham Jul 27, 2023
a64dd3a
Add Havok
chrismbirmingham Jul 27, 2023
e4a7484
remove ammo build
chrismbirmingham Jul 31, 2023
345e412
Fully remove all references to ammo
chrismbirmingham Jul 31, 2023
4dc74a6
Fix impostor spelling
chrismbirmingham Jul 31, 2023
da0cc3f
Update function names
chrismbirmingham Jul 31, 2023
7fa4af2
Engine compiles, motors still need fixing
chrismbirmingham Aug 3, 2023
10fcf04
Functional midpoint (robot location fixed)
chrismbirmingham Aug 16, 2023
f8e62f9
Update depreciated mesh builders
chrismbirmingham Aug 17, 2023
4da083b
PR cleanup
chrismbirmingham Aug 19, 2023
558f873
Fix arm and wheel bindings
chrismbirmingham Aug 24, 2023
037164e
Update to objects pt1
chrismbirmingham Aug 24, 2023
c22982e
Test update
chrismbirmingham Oct 4, 2023
1cd05c0
Fix motorspeed and origin orientation
chrismbirmingham Oct 25, 2023
9be2004
Fix for objects not reseting on open of new scene (including mats)
chrismbirmingham Oct 28, 2023
00f50b6
fix wheel movement issues
chrismbirmingham Oct 30, 2023
1a1ae92
Switch light sensor to port 2
chrismbirmingham Oct 30, 2023
553cb86
Fix loading and reset bug
chrismbirmingham Oct 31, 2023
f3e298a
Updated objects
chrismbirmingham Oct 31, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,6 @@ module.exports = {
"dist",
// Ignore webpack config files
"/configs",
// Ignore included ammo.js library
"/src/ammo.js",
// Ignore static files
"/static",
// Ignore dependencies
Expand Down
4 changes: 1 addition & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,4 @@
[submodule "dependencies/emsdk"]
path = dependencies/emsdk
url = https://github.com/emscripten-core/emsdk
[submodule "dependencies/ammo.js"]
path = dependencies/ammo.js
url = https://github.com/kipr/ammo.js

2 changes: 0 additions & 2 deletions configs/webpack/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ try {

const modules = ['node_modules'];
if (dependencies.cpython) modules.push(resolve(dependencies.cpython));
if (dependencies.ammo) modules.push(resolve(dependencies.ammo));

let libkiprCDocumentation = undefined;
if (dependencies.libkipr_c_documentation) {
Expand Down Expand Up @@ -142,7 +141,6 @@ module.exports = {
SIMULATOR_VERSION: JSON.stringify(require('../../package.json').version),
SIMULATOR_GIT_HASH: JSON.stringify(commitHash),
SIMULATOR_HAS_CPYTHON: JSON.stringify(dependencies.cpython !== undefined),
SIMULATOR_HAS_AMMO: JSON.stringify(dependencies.ammo !== undefined),
SIMULATOR_LIBKIPR_C_DOCUMENTATION: JSON.stringify(libkiprCDocumentation),
SIMULATOR_I18N: JSON.stringify(i18n),
}),
Expand Down
1 change: 0 additions & 1 deletion dependencies/ammo.js
Submodule ammo.js deleted from a8b359
104 changes: 52 additions & 52 deletions dependencies/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,27 @@
import multiprocessing

def is_tool(name):
"""Check whether `name` is on PATH and marked as executable."""
from shutil import which
return which(name) is not None
"""Check whether `name` is on PATH and marked as executable."""
from shutil import which
return which(name) is not None

# Sanity checks

if not is_tool('cmake'):
print('CMake is not installed. Please install CMake and try again.')
exit(1)
print('CMake is not installed. Please install CMake and try again.')
exit(1)

if not is_tool('make'):
print('Make is not installed. Please install Make and try again.')
exit(1)
print('Make is not installed. Please install Make and try again.')
exit(1)

if not is_tool('swig'):
print('SWIG is not installed. Please install SWIG and try again.')
exit(1)
print('SWIG is not installed. Please install SWIG and try again.')
exit(1)

if not is_tool('doxygen'):
print('Doxygen is not installed. Please install Doxygen and try again.')
exit(1)
print('Doxygen is not installed. Please install Doxygen and try again.')
exit(1)

working_dir = pathlib.Path(__file__).parent.absolute()

Expand Down Expand Up @@ -116,31 +116,31 @@ def is_tool(name):

print('Applying cpython patches...')
for patch_file in (working_dir / 'cpython_patches').glob('*.patch'):
print('Applying patch:', patch_file)
with open(patch_file) as patch:
subprocess.run(
['patch', '-p0', '--forward'],
stdin = patch,
cwd = working_dir
)
print('Applying patch:', patch_file)
with open(patch_file) as patch:
subprocess.run(
['patch', '-p0', '--forward'],
stdin = patch,
cwd = working_dir
)

print('Finding latest host python...')

python = 'python3'
if is_tool('python3.12'):
python = 'python3.12'
python = 'python3.12'
elif is_tool('python3.11'):
python = 'python3.11'
python = 'python3.11'
elif is_tool('python3.10'):
python = 'python3.10'
python = 'python3.10'
elif is_tool('python3.9'):
python = 'python3.9'
python = 'python3.9'
elif is_tool('python3.8'):
python = 'python3.8'
python = 'python3.8'
elif is_tool('python3.7'):
python = 'python3.7'
python = 'python3.7'
else:
print('Warning: Python 3.7+ could not be found. Using python3. This might not work.')
print('Warning: Python 3.7+ could not be found. Using python3. This might not work.')

print(f'Building cpython with {python}...')
subprocess.run(
Expand Down Expand Up @@ -196,31 +196,31 @@ def is_tool(name):
env = env
)

print('Configuring ammo.js...')
ammo_dir = working_dir / 'ammo.js'
ammo_build_dir = working_dir / 'ammo_build'
os.makedirs(ammo_build_dir, exist_ok=True)
subprocess.run(
[
'emcmake',
'cmake',
'-DCLOSURE=1',
'-DTOTAL_MEMORY=268435456',
'-DALLOW_MEMORY_GROWTH=1',
ammo_dir
],
cwd = ammo_build_dir,
check = True,
env = env
)

print('Building ammo.js...')
subprocess.run(
[ 'emmake', 'make', f'-j{multiprocessing.cpu_count()}' ],
cwd = ammo_build_dir,
check = True,
env = env
)
# print('Configuring ammo.js...')
# ammo_dir = working_dir / 'ammo.js'
# ammo_build_dir = working_dir / 'ammo_build'
# os.makedirs(ammo_build_dir, exist_ok=True)
# subprocess.run(
# [
# 'emcmake',
# 'cmake',
# '-DCLOSURE=1',
# '-DTOTAL_MEMORY=268435456',
# '-DALLOW_MEMORY_GROWTH=1',
# ammo_dir
# ],
# cwd = ammo_build_dir,
# check = True,
# env = env
# )

# print('Building ammo.js...')
# subprocess.run(
# [ 'emmake', 'make', f'-j{multiprocessing.cpu_count()}' ],
# cwd = ammo_build_dir,
# check = True,
# env = env
# )

print('Generating JSON documentation...')
libkipr_c_documentation_json = f'{libkipr_build_c_dir}/documentation/json.json'
Expand All @@ -244,9 +244,9 @@ def is_tool(name):
'libkipr_c': f'{libkipr_install_c_dir}',
'libkipr_python': f'{libkipr_build_python_dir}',
'cpython': f'{cpython_emscripten_build_dir}',
'ammo': f'{ammo_build_dir}',
# 'ammo': f'{ammo_build_dir}',
"libkipr_c_documentation": libkipr_c_documentation_json,
})

with open(working_dir / 'dependencies.json', 'w') as f:
f.write(output)
f.write(output)
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simulator",
"version": "1.3.0",
"version": "1.4.0",
"sideEffects": false,
"main": "dist/index.js",
"author": "KISS Institute for Practical Robotics",
Expand Down Expand Up @@ -53,14 +53,15 @@
"webpack-merge": "^5.7.3"
},
"dependencies": {
"@babylonjs/core": "^5.22.1",
"@babylonjs/loaders": "^5.22.1",
"@babylonjs/core": "^6.14.0",
"@babylonjs/loaders": "^6.14.0",
"@babylonjs/havok": "^1.0.0",
"@fortawesome/fontawesome-svg-core": "^6.2.0",
"@fortawesome/free-brands-svg-icons": "^6.2.0",
"@fortawesome/free-solid-svg-icons": "^6.2.0",
"@fortawesome/react-fontawesome": "^0.2.0",
"@types/react": "^16.9.25",
"babylonjs-gltf2interface": "^5.22.0",
"babylonjs-gltf2interface": "^6.14.0",
"body-parser": "^1.19.0",
"colorjs.io": "^0.4.2",
"connected-react-router": "^6.9.3",
Expand Down
Loading
Loading