Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
579 commits
Select commit Hold shift + click to select a range
5c6af6a
edge case fix
nvikramraj Feb 25, 2025
74acb15
Added exception to edge case and fixed return values for similar exce…
LucasEby Feb 25, 2025
3ab83e9
Merge pull request #136 from krishauser/PerceptionB_main
LucasEby Feb 25, 2025
e416888
Fix zed sdk version for cuda11.8
harishkumarbalaji Feb 25, 2025
97799bc
remove other changes
harishkumarbalaji Feb 25, 2025
d1c9ca9
Fix indent
harishkumarbalaji Feb 25, 2025
49d1bc6
updated graphs with comfort/safety scale
pravshot Feb 25, 2025
576e051
Merge remote-tracking branch 'refs/remotes/origin/infraBComfortSafety…
pravshot Feb 25, 2025
176817f
removed plot.py file
pravshot Feb 25, 2025
c14d7af
added pedestrian distance metric and cleaned code
pravshot Feb 25, 2025
ec44350
check for 0 pedestrians in log
pravshot Feb 26, 2025
534436f
added documentation
pravshot Feb 26, 2025
5cdfb6b
Include data capture code
michalj1 Mar 13, 2025
08fa470
Include data capture code
michalj1 Mar 13, 2025
073bf49
Add collection from additional sensors
michalj1 Mar 13, 2025
c67909e
Add collection from additional sensors
michalj1 Mar 13, 2025
e2a689b
Collect GNSS latitude and longitude from septentrio
michalj1 Mar 13, 2025
d8dceb9
Collect GNSS latitude and longitude from septentrio
michalj1 Mar 13, 2025
f1ef086
Attempt to add component to track state in local frame
michalj1 Mar 13, 2025
da59317
Attempt to add component to track state in local frame
michalj1 Mar 13, 2025
1798d5b
calibration scripts
rjsun06 Mar 24, 2025
84105be
calibration scripts
rjsun06 Mar 24, 2025
b041270
Collect all camera intrinsics and write to files
michalj1 Mar 24, 2025
b75d59f
Collect all camera intrinsics and write to files
michalj1 Mar 24, 2025
e88e422
file rename and play with pycolmap
rjsun06 Mar 24, 2025
b269829
file rename and play with pycolmap
rjsun06 Mar 24, 2025
d44c8e0
Merge branch 's2025_EstCal' of https://github.com/krishauser/GEMstack…
rjsun06 Mar 24, 2025
79fdd6e
Merge branch 's2025_EstCal' of https://github.com/krishauser/GEMstack…
rjsun06 Mar 24, 2025
2e6b444
typo
rjsun06 Mar 24, 2025
f9cf542
typo
rjsun06 Mar 24, 2025
f242fa7
typo
rjsun06 Mar 24, 2025
09011b0
typo
rjsun06 Mar 24, 2025
9111107
Merge branch 'main' into s2025
krishauser Mar 25, 2025
65784dc
Versions working on GEM
michalj1 Mar 26, 2025
10a5b92
Versions working on GEM
michalj1 Mar 26, 2025
b4a68ef
ok
rjsun06 Apr 2, 2025
880f08e
ok
rjsun06 Apr 2, 2025
f6e846d
Merge branch 's2025_EstCal' of https://github.com/krishauser/GEMstack…
rjsun06 Apr 2, 2025
a308ec9
Merge branch 's2025_EstCal' of https://github.com/krishauser/GEMstack…
rjsun06 Apr 2, 2025
d6b2c02
ok
rjsun06 Apr 3, 2025
69675a9
ok
rjsun06 Apr 3, 2025
8574545
Gazebo Gem Integration
nvikramraj Apr 3, 2025
3f183be
yaml change
nvikramraj Apr 3, 2025
086f7ad
added send_command
danielzhuang11 Apr 6, 2025
454bc7e
small fixes
danielzhuang11 Apr 6, 2025
b5a2f39
IT MOVES
danielzhuang11 Apr 6, 2025
5a50c75
Add code to manually tune calibration
michalj1 Apr 7, 2025
a5423d9
Add code to manually tune calibration
michalj1 Apr 7, 2025
a2063eb
Merge branch 's2025_EstCal' of https://github.com/krishauser/GEMstack…
michalj1 Apr 7, 2025
413f55d
Merge branch 's2025_EstCal' of https://github.com/krishauser/GEMstack…
michalj1 Apr 7, 2025
bc6ee35
steering is reversed for some reason
danielzhuang11 Apr 7, 2025
1f5c120
Add script to rectify images
michalj1 Apr 7, 2025
4431f7f
Add script to rectify images
michalj1 Apr 7, 2025
2e71f76
added some TODO messages
danielzhuang11 Apr 7, 2025
3e354a3
cali by segmentation
rjsun06 Apr 7, 2025
2789ce3
Merge branch 's2025_EstCal' of https://github.com/krishauser/GEMstack…
rjsun06 Apr 7, 2025
974f368
Clean code and allow it to collect scans when not all sensors are wor…
michalj1 Apr 7, 2025
577d49e
Clean code and allow it to collect scans when not all sensors are wor…
michalj1 Apr 7, 2025
7f5876c
Merge branch 's2025_EstCal' of https://github.com/krishauser/GEMstack…
michalj1 Apr 7, 2025
03f084b
Merge branch 's2025_EstCal' of https://github.com/krishauser/GEMstack…
michalj1 Apr 7, 2025
ad16ed0
Merge branch 'main' of https://github.com/krishauser/GEMstack into s2…
whizkid42 Apr 7, 2025
19f7521
Add camera intrinsics and minor changes in some calibration scripts
michalj1 Apr 8, 2025
d8c79db
Add camera intrinsics and minor changes in some calibration scripts
michalj1 Apr 8, 2025
9faafd8
Add intrinsics and minor changes in some calibration scripts
michalj1 Apr 8, 2025
b3609fd
Add intrinsics and minor changes in some calibration scripts
michalj1 Apr 8, 2025
2975c91
incorporated vehicle switching from sys args
nvikramraj Apr 8, 2025
c2ad121
Merge branch 's2025_Simulation_vikram' into s2025_Simulation_input
nvikramraj Apr 8, 2025
8db2b6f
Merge pull request #156 from krishauser/s2025_Simulation_input
nvikramraj Apr 8, 2025
5533213
Fixed GNSS
nvikramraj Apr 8, 2025
1459022
GEM e4 integrated
nvikramraj Apr 8, 2025
0b90bc5
Attached read me
nvikramraj Apr 8, 2025
cd4c649
updated readme
nvikramraj Apr 8, 2025
65df967
updated readme
nvikramraj Apr 8, 2025
a316c63
SfM with hand-eye calibration
rjsun06 Apr 13, 2025
4102339
Merge branch 's2025_EstCal' of https://github.com/krishauser/GEMstack…
rjsun06 Apr 13, 2025
19aebf6
include distortion and skew in xxx_in.yaml
rjsun06 Apr 13, 2025
8be544d
removed accidentally added large file
rjsun06 Apr 13, 2025
62c18b8
Calibration integration
nvikramraj Apr 14, 2025
6d6dffb
updated readme
nvikramraj Apr 15, 2025
2e78a1c
add gem_gazebo interface with control commands to gazebo
harishkumarbalaji Apr 15, 2025
cd9257e
fix gem_gazebo and update readme
harishkumarbalaji Apr 15, 2025
074a196
Merge branch 'infra-b/docker_setup' into simulation integration
harishkumarbalaji Apr 15, 2025
f6df3db
Merge remote-tracking branch 'origin/infraBComfortSafetyMetrics' into…
harishkumarbalaji Apr 15, 2025
7863bd5
add mpl viz
harishkumarbalaji Apr 15, 2025
33d5455
now using ros sensor topics defined in yaml file
pravshot Apr 15, 2025
a5cb7e4
removed type check
pravshot Apr 15, 2025
cd28d13
Add script for intrinsic calibration
michalj1 Apr 16, 2025
6ac0eee
Resolve merge conflicts
michalj1 Apr 16, 2025
a052e29
documentation (praveen) + longitudinal control (daniel)
danielzhuang11 Apr 21, 2025
2caf27c
Delete GEMstack/knowledge/routes/gazebo.csv
danielzhuang11 Apr 21, 2025
1c6263f
updated metric script to show acceleration and remove dot plots
pravshot Apr 22, 2025
601d37d
test_comfort get latest log
danielzhuang11 Apr 23, 2025
3d7bdb1
tune controller
harishkumarbalaji Apr 23, 2025
893eed2
Merge pull request #157 from krishauser/s2025_Simulation_vikram
harishkumarbalaji Apr 23, 2025
55ba9a8
add install ackermann-msgs in docker
harishkumarbalaji Apr 23, 2025
ff6b765
update documentation
harishkumarbalaji Apr 23, 2025
a03c204
Create cone_detection.py
Ren990420 Apr 23, 2025
0b84d28
Create cone_detection.yaml
Ren990420 Apr 23, 2025
ec41cf7
Update agent.py
Ren990420 Apr 23, 2025
cfcd03b
revert current yaml, fix accel/heading states
danielzhuang11 Apr 24, 2025
045289d
Merge branch 'main' into s2025
krishauser Apr 25, 2025
84002c3
Merge branch 'main' into s2025
krishauser Apr 25, 2025
2951536
Standardize interface for scripts and clean messy code
michalj1 Apr 25, 2025
1e9c506
flipped lat and long
danielzhuang11 Apr 28, 2025
2f4aba4
readme
rjsun06 Apr 29, 2025
27ce08a
readme-followup
rjsun06 Apr 29, 2025
5813a01
readme
rjsun06 Apr 29, 2025
f62fb8a
readme
rjsun06 Apr 29, 2025
ccef5f6
Merge branches 's2025_EstCal' and 's2025_EstCal' of https://github.co…
rjsun06 Apr 29, 2025
bbfbcc3
Fix bugs and standardize inputs
michalj1 Apr 30, 2025
ca6b137
Corner camera extrinsic calibrations v2.1
michalj1 Apr 30, 2025
2f71995
WIP agent detection and tracking from gazebo model states
harishkumarbalaji Apr 30, 2025
5e87e70
Allow variable checkerboard sizes
michalj1 Apr 30, 2025
ec9ac29
Merge branch 'main' into s2025
krishauser Apr 30, 2025
18ff86e
Update README and fix bugs
michalj1 Apr 30, 2025
78caddc
mapping based localization using lidar scans
rjsun06 Apr 30, 2025
9b23c88
Merge branch 's2025_EstCal' of https://github.com/krishauser/GEMstack…
rjsun06 Apr 30, 2025
374f10d
cli argument clarified
rjsun06 Apr 30, 2025
66cb580
Move and update utility functions and README
michalj1 Apr 30, 2025
87ea902
Merge README changes
michalj1 Apr 30, 2025
e09e8a2
Rename intrinsic_calibration.py to get_intrinsic_by_chessboard.py
michalj1 Apr 30, 2025
ac2ce48
New oak extrinsics calibration
whizkid42 May 1, 2025
0e061b8
Merge branch 's2025_EstCal' of https://github.com/krishauser/GEMstack…
whizkid42 May 1, 2025
01f2427
Resolve merge conflicts in calibration scripts
whizkid42 May 1, 2025
0699c43
Updated oak extrinsic calibration
whizkid42 May 1, 2025
fa9ef66
Create cameras.yaml
Ren990420 May 1, 2025
0136e45
Update cone_detection.yaml
Ren990420 May 1, 2025
4e252c6
Update cone_detection.py
Ren990420 May 1, 2025
d993b06
cleaned. ready to merge
May 1, 2025
d404c3d
cleanup and move constants
KenC1014 May 1, 2025
28dc5a7
delete useless functions
leizhenyu-lzy May 1, 2025
6dc31d2
subscribes to combined gnss data
pravshot May 2, 2025
ac5f11a
updates self.last_reading.speed in gnss_callback and removed unused i…
pravshot May 2, 2025
ea7594b
Merge pull request #176 from krishauser/s2025
nvikramraj May 2, 2025
c7a0e25
Merge pull request #177 from krishauser/s2025_Simulation
nvikramraj May 2, 2025
c773ff2
PR fixes
nvikramraj May 3, 2025
d7f0f52
Reverted settings override changes
nvikramraj May 3, 2025
34eb951
WIP fix before transform
harishkumarbalaji May 4, 2025
810e027
fix agent state with transform
harishkumarbalaji May 4, 2025
153ce23
update docs
harishkumarbalaji May 5, 2025
86637c4
Merge pull request #178 from krishauser/s2025_Simulation_vikram
harishkumarbalaji May 5, 2025
cf75169
cleanup
harishkumarbalaji May 5, 2025
3893db2
Merge branch 's2025_Simulation' into gazebo_agent_detection
harishkumarbalaji May 5, 2025
661056c
add deps in setup scripts
harishkumarbalaji May 5, 2025
9812d36
Fix incorrect linear algebra
michalj1 May 5, 2025
b6a67d2
Delete unnecessary files
michalj1 May 5, 2025
9f41ecc
Remove unnecessary files
michalj1 May 5, 2025
e849ebb
Organize calibration file
michalj1 May 5, 2025
fa7bdbf
Update README
michalj1 May 5, 2025
b071e38
Update README
michalj1 May 5, 2025
8eeb5bf
PR changes
nvikramraj May 5, 2025
11c2536
Merge pull request #182 from krishauser/s2025_Simulation_vikram
nvikramraj May 5, 2025
496b018
Update README.md
harishkumarbalaji May 5, 2025
35fdbf5
Update main.py
harishkumarbalaji May 5, 2025
2d6c7f0
Revert yaml files
nvikramraj May 6, 2025
3f9a74e
Merge pull request #185 from krishauser/s2025_Simulation_vikram
nvikramraj May 6, 2025
45105e5
Merge branch 's2025_Simulation' into s2025_Simulation_gnss_sub
pravshot May 7, 2025
ec43ea2
Merge pull request #184 from krishauser/s2025_Simulation_gnss_sub
harishkumarbalaji May 7, 2025
6288dd0
integrating new perception changes
May 7, 2025
0fe0452
Merge branch 's2025_Simulation' into gazebo_agent_detection
harishkumarbalaji May 7, 2025
8c475fa
Removed yaml changes
nvikramraj May 7, 2025
4e24ae8
Merge pull request #186 from krishauser/s2025_Simulation_vikram
nvikramraj May 7, 2025
0953a35
Merge pull request #164 from krishauser/s2025_Simulation
krishauser May 7, 2025
4d004b0
Update parking_utils.py
leizhenyu-lzy May 7, 2025
ec0a5cf
Update cone_detection.py
Ren990420 May 7, 2025
4dd6e5c
Update agent.py
Ren990420 May 7, 2025
45168fd
Update obstacle.py
Ren990420 May 7, 2025
6782b7c
Update cone_detection.yaml
Ren990420 May 7, 2025
a23e3f4
all new updates from perception added and tested
May 7, 2025
96772ed
Merge branch 'parking_perception_integration_merge' of https://github…
May 7, 2025
25cdc43
fixing component naming + moving MissionPlan to mission.py
May 8, 2025
71ae7ef
1. read transform from yaml config 2. read vehcle geometry from confi…
KenC1014 May 8, 2025
c727057
Update cone_detection.py
Ren990420 May 8, 2025
696fc4e
Update cone_detection.yaml
Ren990420 May 8, 2025
d40dc35
Update cameras.yaml
Ren990420 May 8, 2025
f84c178
Update agent.py
Ren990420 May 8, 2025
7b50576
include newest changes from perception team
KenC1014 May 8, 2025
0964246
update variable name from agent to obstacle
KenC1014 May 9, 2025
d2c6d89
Update agent.py
Ren990420 May 9, 2025
b3713cd
Update obstacle.py
Ren990420 May 9, 2025
bd957e9
Update agent.py
Ren990420 May 9, 2025
9be95fb
Update agent.py
Ren990420 May 9, 2025
367e66a
Update cone_detection.py
Ren990420 May 9, 2025
7b7aeaa
Create perception_utils.py
Ren990420 May 9, 2025
4284265
Update agent.py
Ren990420 May 9, 2025
2ce4310
adding latest from perception
May 10, 2025
16f1ac4
Update cone_detection.py
Ren990420 May 10, 2025
311ba73
fixing bad import
May 10, 2025
6cd25e8
Consolidating changes for PR to s2025 branch
animeshsingh98 May 10, 2025
908adc6
Resolving comments
animeshsingh98 May 10, 2025
2f6a225
Resolving comments
animeshsingh98 May 10, 2025
e50ccb9
Merge remote-tracking branch 'origin/s2025_automated_inspection_PR' i…
animeshsingh98 May 10, 2025
1c38690
added obstacle detection pt1
sanjaypokkali May 11, 2025
3d54689
added obstacle detection pt2
shraddhaamohan May 11, 2025
8ed736c
Fix vehicle heading as it is handled in simulator side
harishkumarbalaji May 11, 2025
35a94fa
feat: working version
nmashchenko May 12, 2025
1e3a045
Add server README
injustli May 12, 2025
dc0c9f9
add support for gem e2 Inspva msg format
harishkumarbalaji May 12, 2025
3ac57be
Merge branch 'summoning_integration' into summoning_pr
udymd May 12, 2025
17fb8ca
update readme and link to correct setup docs
harishkumarbalaji May 12, 2025
0208757
add novatel gsp msgs deps in the setup scripts
harishkumarbalaji May 12, 2025
a2a1034
update gazebo doc
harishkumarbalaji May 12, 2025
0eb64c6
Merge pull request #194 from krishauser/gazebo_agent_obstacle_detection
harishkumarbalaji May 12, 2025
072ae7f
Merge remote-tracking branch 'origin/s2025_Simulation_yaw_fix' into g…
harishkumarbalaji May 12, 2025
9c7ee06
update debug lines
harishkumarbalaji May 12, 2025
1370429
refactor gem_gazebo
harishkumarbalaji May 12, 2025
8caa9fe
update docs
harishkumarbalaji May 12, 2025
1f3cfbb
fix for klampt sim bug
May 12, 2025
38252e7
Merge pull request #197 from krishauser/s2025_webapp
krishauser May 12, 2025
6022847
Merge pull request #198 from krishauser/s2025_Simulation_yaw_fix
krishauser May 12, 2025
5216b33
Merge pull request #199 from krishauser/summoning_pr
krishauser May 12, 2025
ce83e3f
Merge branch 's2025' into parking_perception_integration_merge
krishauser May 12, 2025
103ea9f
Merge branch 'main' into s2025
krishauser May 12, 2025
049cef3
Merge branch 's2025' into s2025_automated_inspection_PR
animeshsingh98 May 12, 2025
1cb9910
Additional changes for saving image
animeshsingh98 May 12, 2025
388f7fc
Merge remote-tracking branch 'origin/s2025_automated_inspection_PR' i…
animeshsingh98 May 12, 2025
077ec81
fixing obstacle
May 12, 2025
2323add
Merge branch 'parking_perception_integration_merge' of https://github…
May 12, 2025
ce4bba3
Update cone_detection.py
Ren990420 May 12, 2025
e73d5b4
Update __init__.py
Ren990420 May 12, 2025
67ce605
Update obstacle.py
Ren990420 May 12, 2025
958890d
Update obstacle.py
Ren990420 May 12, 2025
64a9dc8
making sure everything works
May 12, 2025
18ed1fd
Update cone_detection.py
Ren990420 May 12, 2025
defe862
Update __init__.py
Ren990420 May 12, 2025
f39e80a
Update __init__.py
Ren990420 May 12, 2025
4fbc624
Create cone_detection.yaml
Ren990420 May 12, 2025
dbdc37b
update naming to match perception
May 12, 2025
de9799a
Merge branch 'parking_perception_integration_merge' of https://github…
May 12, 2025
d0b1cf6
Update cone_detection.yaml
Ren990420 May 12, 2025
dd6a0cf
Update cone_detection.py
Ren990420 May 12, 2025
86f872b
Update python-app.yml
animeshsingh98 May 12, 2025
c50d67a
Small modification to geotag_from_rosbag.py to handle arg parser. Add…
Mhdfk May 12, 2025
65f60b4
Small modification to geotag_from_rosbag.py to handle arg parser. Add…
Mhdfk May 12, 2025
f659646
Merge pull request #172 from krishauser/s2025_perception_merge_prepar…
krishauser May 12, 2025
35b11f9
Merge branch 's2025' into parking_perception_integration_merge
krishauser May 12, 2025
acc06b7
Merge pull request #174 from krishauser/parking_perception_integratio…
krishauser May 12, 2025
2348177
Merge branch 's2025' into gazebo_agent_detection
harishkumarbalaji May 13, 2025
788c622
Resolved merge conflicts (sm148, pokkali2)
shraddhaamohan May 13, 2025
9925d57
Update server url
injustli May 13, 2025
e3e902b
Refactor import of ReedsSheppParking to avoid dependency error in Sum…
harishkumarbalaji May 13, 2025
ccb2eb3
Merge branch 's2025' into s2025_automated_inspection_PR
animeshsingh98 May 13, 2025
40a1816
Merge pull request #192 from krishauser/s2025_automated_inspection_PR
krishauser May 13, 2025
e3ad757
Merge pull request #200 from krishauser/gazebo_agent_detection
krishauser May 13, 2025
db73561
Merge branch 'main' into s2025
krishauser May 13, 2025
c46dbe1
Merge remote-tracking branch 'origin/s2025' into s2025_EstCal_Calibra…
michalj1 May 14, 2025
c07d042
Include updated lidar calibration from homework
michalj1 May 14, 2025
2292ef4
Change format to use text keys instead of lists
michalj1 May 14, 2025
7aaa606
Add helper script to create cameras.yaml for perception
michalj1 May 14, 2025
f3517e9
Merge branch 's2025_EstCal_Calibration_PR' of https://github.com/kris…
michalj1 May 14, 2025
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
62 changes: 62 additions & 0 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: Python application

on:
push:
branches:
- '**'


permissions:
contents: read

jobs:
PEP-Guidelines:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8 flake8-docstrings pep8-naming
- name: Lint with flake8
run: |
# stop the build if there are Python syntax errors or undefined names
flake8 ./GEMstack --count --select=E9,F63,F7,F82 --ignore=F824 --show-source --statistics --exclude=__init__.py || exit 1
# to enable more advanced checks on the repo, uncomment the lines below (There are around 3000 violations)
# flake8 ./GEMstack --ignore=D,C901,E402,E231 --count --max-complexity=10 --max-line-length=127 --statistics --exclude=__init__.py || exit 1
# if we want to enable documentation checks, uncomment the line below
# flake8 ./GEMstack --ignore=E128,E402,E501,F401 --docstring-convention pep257 --max-line-length=120 --exclude=__init__.py || exit 1
continue-on-error: false

Documentation:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx-rtd-theme
- name: Generate Documentation
run: |
# stop the build if there are Python syntax errors or undefined names
sphinx-build -b html docs docs/build
- name: Save Documentation as Artifact
uses: actions/upload-artifact@v4
with:
name: documentation
path: docs/build
22 changes: 20 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ downloads/
eggs/
.eggs/
lib/
!frontend/*
lib64/
parts/
sdist/
Expand All @@ -32,6 +33,7 @@ share/python-wheels/
.installed.cfg
*.egg
MANIFEST
.idea/

# PyInstaller
# Usually these files are written by a python script from a template
Expand Down Expand Up @@ -134,6 +136,7 @@ venv/
ENV/
env.bak/
venv.bak/
*.DS_Store

# Spyder project settings
.spyderproject
Expand Down Expand Up @@ -164,7 +167,22 @@ cython_debug/
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
#.idea/

.idea/

# ZED run files
**/*.run
.vscode/
setup/zed_sdk.run

#Ignore ROS bags
*.bag

cuda/
homework/yolov8n.pt
homework/yolo11n.pt
yolov8n.pt
yolo11n.pt

# Computation Graph of Launch File Outputs
launch_visualization/graph
launch_visualization/graph
106 changes: 106 additions & 0 deletions GEMstack/knowledge/calibration/calib_util.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
#%%
import yaml
from yaml import SafeDumper
import numpy as np
import cv2
def represent_flow_style_list(dumper, data):
return dumper.represent_sequence(yaml.resolver.BaseResolver.DEFAULT_SEQUENCE_TAG, data, flow_style=True)
SafeDumper.add_representer(list, represent_flow_style_list)
#%%
class FlowListDumper(yaml.Dumper):
def represent_list(self, data):
return self.represent_sequence('tag:yaml.org,2002:seq', data, flow_style=True)

def load_ex(path,mode,ref='rear_axle_center'):
with open(path) as stream:
y = yaml.safe_load(stream)
assert y['reference'] == ref
if mode == 'matrix':
ret = np.eye(4)
ret[0:3,0:3] = y['rotation']
ret[:-1,3] = y['position']
return ret
elif mode == 'tuple':
return np.array(y['rotation']),np.array(y['position'])


def save_ex(path,rotation=None,translation=None,matrix=None,ref='rear_axle_center'):
if matrix is not None:
rot = matrix[0:3,0:3]
trans = matrix[0:3,3]
save_ex(path,rot,trans,ref=ref)
return
ret = {}
ret['reference'] = ref
ret['rotation'] = rotation
ret['position'] = translation
for i in ret:
if type(ret[i]) == np.ndarray:
ret[i] = ret[i].tolist()
print(yaml.dump(ret,Dumper=SafeDumper,default_flow_style=False))
with open(path,'w') as stream:
yaml.dump(ret,stream,Dumper=SafeDumper,default_flow_style=False)

def load_in(path,mode='matrix',return_distort=False):
with open(path) as stream:
y = yaml.safe_load(stream)
if 'skew' not in y: y['skew'] = 0
if 'distort' not in y: y['distort'] = [0,0,0,0,0]
if mode == 'matrix':
ret = np.zeros((3,3))
ret[0,0],ret[1,1] = y['focal']
ret[2,2] = 1.
ret[0:2,2] = y['center']
ret[0,1] = y['skew']
if return_distort:
return ret,np.array(y['distort'])
else:
return ret
elif mode == 'tuple':
return {'focal':np.array(y['focal']),
'center':np.array(y['center']),
'skew':np.array(y['skew']),
'distort':np.array(y['distort'])}

from collections.abc import Iterable
def save_in(path,focal=None,center=None,skew=0,distort=[0.0]*5,matrix=None):
if matrix is not None:
focal = matrix.diagonal()[0:2]
skew = matrix[0,1]
center = matrix[0:2,2]
save_in(path,focal,center,skew,distort)
return
ret = {}
ret['focal'] = focal
ret['center'] = center
ret['skew'] = skew
assert len(distort) in [4,5]
ret['distort'] = distort
if len(ret['distort']) == 4:
ret['distort'] = list(ret['distort'])+[0.0]
for i in ret:
if type(ret[i]) == np.ndarray:
ret[i] = ret[i].tolist()
if isinstance(ret[i],Iterable):
ret[i] = [*map(float,ret[i])]
print(yaml.dump(ret,Dumper=SafeDumper,default_flow_style=False))
with open(path,'w') as stream:
yaml.dump(ret,stream,Dumper=SafeDumper,default_flow_style=False)

def undistort_image(image, camera_matrix, distortion_coefficients):
h, w = image.shape[:2]
newK, roi = cv2.getOptimalNewCameraMatrix(camera_matrix, distortion_coefficients, (w,h), 1, (w,h))
image = cv2.undistort(image, camera_matrix, distortion_coefficients, None, newK)
return image, newK


#%%
if __name__ == "__main__":
#%%
rot, trans = load_ex('/mnt/GEMstack/GEMstack/knowledge/calibration/gem_e4_ouster.yaml',mode='tuple')
save_ex('/tmp/test.yaml',rot,trans)
#%%
focal = [1,2,3]
center = [400,500]
save_in('/tmp/test.yaml',focal,center)
load_in('/tmp/test.yaml',mode='tuple')
35 changes: 35 additions & 0 deletions GEMstack/knowledge/calibration/cameras.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
cameras:
front:
K:
- [684.83331299, 0.0, 573.37109375]
- [0.0, 684.60968018, 363.70092773]
- [0.0, 0.0, 1.0]
D: [0.0, 0.0, 0.0, 0.0, 0.0]
T_l2c:
- [ 0.0289748006, -0.999580136, 0.0000368439, -0.0307300513]
- [-0.0094993062, -0.0003122155, -0.999954834, -0.386689354 ]
- [ 0.999534999, 0.0289731321, -0.0095043721, -0.671425124 ]
- [ 0.0, 0.0, 0.0, 1.0 ]
T_l2v:
- [ 0.99939639, 0.02547917, 0.023615, 1.1 ]
- [ -0.02530848, 0.99965156, -0.00749882, 0.03773583 ]
- [ -0.02379784, 0.00689664, 0.999693, 1.95320223 ]
- [ 0.0, 0.0, 0.0, 1.0 ]

front_right:
K:
- [1176.25545, 0.0, 966.432645]
- [0.0, 1175.14569, 608.580326]
- [0.0, 0.0, 1.0 ]
D: [-0.270136325, 0.164393255, -0.00160720782, -0.0000741246708, -0.0619939758]
T_l2c:
- [-0.71836368, -0.69527204, -0.02346088, 0.05718003]
- [-0.09720448, 0.13371206, -0.98624154, -0.15983010]
- [ 0.68884317, -0.70619960, -0.16363744, -1.04767285]
- [ 0.0, 0.0, 0.0, 1.0 ]
T_l2v:
- [0.99939639, 0.02547917, 0.023615, 1.1]
- [-0.02530848, 0.99965156, -0.00749882, 0.03773583]
- [-0.02379784, 0.00689664, 0.999693, 1.95320223]
- [0.0, 0.0, 0.0, 1.0 ]

16 changes: 15 additions & 1 deletion GEMstack/knowledge/calibration/gem_e4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,18 @@ rear_axle_height: 0.33 # height of rear axle center above flat ground
gnss_location: [1.10,0,1.62] # meters, taken from https://github.com/hangcui1201/POLARIS_GEM_e2_Real/blob/main/vehicle_drivers/gem_gnss_control/scripts/gem_gnss_tracker_stanley_rtk.py. Note conflict with pure pursuit location?
gnss_yaw: 0.0 # radians
top_lidar: !include "gem_e4_ouster.yaml"
front_camera: !include "gem_e4_oak.yaml"
front_camera:
extrinsics: !include "gem_e4_oak.yaml"
intrinsics: !include "gem_e4_oak_in.yaml"
front_right_camera:
extrinsics: !include "gem_e4_fr.yaml"
intrinsics: !include "gem_e4_fr_in.yaml"
front_left_camera:
extrinsics: !include "gem_e4_fl.yaml"
intrinsics: !include "gem_e4_fl_in.yaml"
rear_right_camera:
extrinsics: !include "gem_e4_rr.yaml"
intrinsics: !include "gem_e4_rr_in.yaml"
rear_left_camera:
extrinsics: !include "gem_e4_rl.yaml"
intrinsics: !include "gem_e4_rl_in.yaml"
5 changes: 5 additions & 0 deletions GEMstack/knowledge/calibration/gem_e4_fl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
position: [2.008491967178938, 0.9574436688609637, 1.7222845229507735]
reference: rear_axle_center
rotation: [[0.7229102844527417, -0.13938889438297952, 0.6767358840457229], [-0.6904150547378912,
-0.18396833469067211, 0.6996304053015531], [0.026977264941612008, -0.9729986577348562,
-0.22922879230680995]]
5 changes: 5 additions & 0 deletions GEMstack/knowledge/calibration/gem_e4_fl_in.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
center: [971.5122150421694, 601.7847095069886]
distort: [-0.2625420437513607, 0.1425651774165483, -0.0004946279626072071, -0.00033457504102070386,
-0.042732740327368145]
focal: [1183.2337731693713, 1182.3831532373445]
skew: 0
5 changes: 5 additions & 0 deletions GEMstack/knowledge/calibration/gem_e4_fr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
position: [1.8861563355156226, -0.7733611068168774, 1.6793040225335112]
reference: rear_axle_center
rotation: [[-0.7168464770690616, -0.10046018208578958, 0.6899557088168523], [-0.6970911725372957,
0.12308618950445319, -0.7063382243117325], [-0.01396515249660048, -0.9872981017750231,
-0.15826380744561577]]
5 changes: 5 additions & 0 deletions GEMstack/knowledge/calibration/gem_e4_fr_in.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
center: [966.4326452411585, 608.5803255934914]
distort: [-0.2701363254469883, 0.16439325523243875, -0.001607207824773341, -7.412467081891699e-05,
-0.06199397580030171]
focal: [1176.2554468073797, 1175.1456876174707]
skew: 0
8 changes: 5 additions & 3 deletions GEMstack/knowledge/calibration/gem_e4_oak.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
reference: rear_axle_center # rear axle center
rotation: [[0,0,1],[-1,0,0],[0,-1,0]] # rotation matrix mapping z to forward, x to left, y to down, guesstimated
center_position: [1.78,0,1.58] # meters, center camera, guesstimated
position: [1.8680678362969751, 0.03483728869549903, 1.6545932338230158]
reference: rear_axle_center
rotation: [[0.020064651878799838, -0.013111205776054045, 0.99971271174677], [-0.9997929081548379,
0.0031358785499412617, 0.020107388418472497], [-0.003398609756043868, -0.9999091271454714,
-0.013045570240818732]]
2 changes: 2 additions & 0 deletions GEMstack/knowledge/calibration/gem_e4_oak_in.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
center: [573.37109375, 363.700927734375]
focal: [684.8333129882812, 684.6096801757812]
6 changes: 4 additions & 2 deletions GEMstack/knowledge/calibration/gem_e4_ouster.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
reference: rear_axle_center # rear axle center
position: [1.10,0,2.03] # meters, calibrated by Hang's watchful eye
rotation: [[1,0,0],[0,1,0],[0,0,1]] #rotation matrix mapping lidar frame to vehicle frame
position: [1.10, 0.03773583, 1.95320223] # meters, calibrated by Hang's watchful eye
rotation: [[0.99939639, 0.02547917, 0.023615],
[-0.02530848, 0.99965156, -0.00749882],
[-0.02379784, 0.00689664, 0.999693]] #rotation matrix mapping lidar frame to vehicle frame
5 changes: 5 additions & 0 deletions GEMstack/knowledge/calibration/gem_e4_rl.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
position: [0.0898392124024201, 0.71876803481624, 1.71024199833245]
reference: rear_axle_center
rotation: [[0.6847850928670124, 0.19803293816635642, -0.7013218462220591], [0.728026894383745,
-0.14318896257364072, 0.6704280439025839], [0.03234528777238433, -0.9696802959730001,
-0.2422269719924619]]
5 changes: 5 additions & 0 deletions GEMstack/knowledge/calibration/gem_e4_rl_in.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
center: [953.302889408274, 608.1966398872765]
distort: [-0.2522996862206216, 0.12482113115174773, -0.0005993692936397102, -0.00017949453391219192,
-0.03499498178003368]
focal: [1181.6177321982138, 1180.0783789769903]
skew: 0
5 changes: 5 additions & 0 deletions GEMstack/knowledge/calibration/gem_e4_rr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
position: [0.11419591502518789, -0.6896311735924415, 1.711181163333824]
reference: rear_axle_center
rotation: [[-0.7359657309159472, 0.15986191414426415, -0.6578743127098735], [0.6768157805459531,
0.14993386619459964, -0.7207220233709469], [-0.016578363047300385, -0.9756864271752846,
-0.21854325362408236]]
5 changes: 5 additions & 0 deletions GEMstack/knowledge/calibration/gem_e4_rr_in.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
center: [956.2663906909728, 569.2039945552984]
distort: [-0.25040910859151444, 0.1109210921906881, -0.00041247665414900384, 0.0008205455176671751,
-0.026395952816984845]
focal: [1162.3787554048329, 1162.855381183851]
skew: 0
48 changes: 48 additions & 0 deletions GEMstack/knowledge/calibration/make_camera_lidar_yaml.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import yaml
import numpy as np
from calib_util import load_ex, load_in

#
# THIS FILE SHOULD BE RUN FROM ITS LOCAL DIRECTORY FOR THE PATHS TO WORK
#

# Destination files name
output_file = 'new_cameras.yaml'

# Collect names of all sensors and associated extrinsic/intrinsic files
camera_files = {'front': ['gem_e4_oak.yaml', 'gem_e4_oak_in.yaml'],
'front_right': ['gem_e4_fr.yaml', 'gem_e4_oak_in.yaml'],
'front_left': ['gem_e4_fl.yaml', 'gem_e4_fl_in.yaml'],
'back_right': ['gem_e4_rr.yaml', 'gem_e4_rr_in.yaml'],
'back_left': ['gem_e4_rl.yaml', 'gem_e4_rl_in.yaml']}
lidar_file = 'gem_e4_ouster.yaml'

# Initialize variables
output_dict = {'cameras': {}}
T_lidar_to_vehicle = load_ex(lidar_file, 'matrix')

# Collect data for all cameras
for camera in camera_files:
# Load from files
ex_file = camera_files[camera][0]
in_file = camera_files[camera][1]
T_camera_to_vehicle = load_ex(ex_file, 'matrix')
K, D = load_in(in_file, 'matrix', return_distort=True)

# Calculate necessary values
T_lidar_to_camera = np.linalg.inv(T_camera_to_vehicle) @ T_lidar_to_vehicle

# Store in the proper format
camera_dict = {}
camera_dict['K'] = K
camera_dict['D'] = D
camera_dict['T_l2c'] = T_lidar_to_camera
camera_dict['T_l2v'] = T_lidar_to_vehicle
for key in camera_dict:
if type(camera_dict[key]) == np.ndarray:
camera_dict[key] = camera_dict[key].tolist()
output_dict['cameras'][camera] = camera_dict

# Write to file
with open(output_file,'w') as stream:
yaml.safe_dump(output_dict, stream)
Loading