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

Slam tri #49

Open
wants to merge 38 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
49e6b69
Draft of face following capability
Feb 6, 2022
da8bdf2
Merge branch 'main' into behaviors
Feb 17, 2022
5c15f5c
Minor cleanup
Feb 17, 2022
8c91260
Merge branch 'main' of github.com:gaia-platform/examples-internal int…
dr-soong Mar 10, 2022
9d9f653
Merge branch 'main' of github.com:gaia-platform/examples-internal int…
dr-soong Mar 10, 2022
cc6b503
Merge branch 'main' of github.com:gaia-platform/examples-internal int…
dr-soong Mar 14, 2022
d5ee693
Merge branch 'main' of github.com:gaia-platform/examples-internal int…
dr-soong Mar 24, 2022
d949d0a
Merge branch 'main' of github.com:gaia-platform/examples-internal int…
dr-soong Mar 30, 2022
9a4dace
Merge branch 'main' of github.com:gaia-platform/examples-internal int…
dr-soong Mar 30, 2022
4b73213
Outline of rearchitected ddl and rules
dr-soong Mar 31, 2022
96edd7a
Draft of rules/ddl/API
dr-soong Mar 31, 2022
fe0b888
Migrating trislam changes to slam_sim
dr-soong Mar 31, 2022
d0b27dd
Minor tweak to ddl for maps
dr-soong Apr 1, 2022
72d651e
Snapshot save during dev. Revert to 'make' for better incremental bui…
dr-soong Apr 4, 2022
fd3fc8f
Compiling again
dr-soong Apr 4, 2022
057433b
Porting route planning code for SLAM
dr-soong Apr 5, 2022
4dd1e3f
Initial rework of path finding code complete. Some support functions …
dr-soong Apr 6, 2022
7c58c4f
Compiles after incorporating path finding. Now to link.
dr-soong Apr 6, 2022
96a2c52
Snapshot save. Switching to other sub-repo
dr-soong Apr 6, 2022
3e2539d
Snapshot save. Integrating blobs w/ maps.
dr-soong Apr 13, 2022
f986492
Compiling and linking. 4 API calls to be filled out still
dr-soong Apr 13, 2022
6e8178e
Compiles & links. Filling in parts for bot motion and record creation.
dr-soong Apr 13, 2022
fc1505e
feature complete, untested
dr-soong Apr 19, 2022
e210d2b
fixed deadlock error in blob cache
dr-soong Apr 20, 2022
2cb5a90
misc fixes
dr-soong Apr 21, 2022
b1c4c01
bot moving and exporting buggy map
dr-soong Apr 27, 2022
e7c71b3
update unit tests
dr-soong Apr 28, 2022
35715fb
comment out debug statements
dr-soong Apr 28, 2022
cbe1431
revised blob cache to avoid segfault, updated unit test
dr-soong Apr 29, 2022
58351c4
Merge branch 'slam_tri' of github.com:gaia-platform/examples-internal…
dr-soong Apr 29, 2022
da1a748
basic maze following behaviors working
dr-soong Apr 30, 2022
ffb8db4
Testing on mazes
dr-soong Apr 30, 2022
11b9781
Commit before moving out of rules
dr-soong Apr 30, 2022
c07ad0b
successful nav
dr-soong May 1, 2022
9db8480
first demo
dr-soong May 1, 2022
949732c
pre-PR cleanup
dr-soong May 3, 2022
11fe41c
Remove ruleset file
dr-soong May 3, 2022
b20d900
More code cleanup
dr-soong May 3, 2022
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
7 changes: 7 additions & 0 deletions slam_sim/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,10 @@ out2
slam_sim
*.o
logs
*.pgm
*.pnm
test_analyze
test_blob_cache
test_line_segment
z*
*mp4
12 changes: 6 additions & 6 deletions slam_sim/Makefile
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@

all:
mkdir -p build && cd build && cmake .. && make -j 4
cd gaia && make
cd src && make

run:
cd src && make run

# At present there's no method to delete the contents of the database
# from w/in the program, so add a way to do so outside.
refresh_db:
gaiac gaia/slam.ddl --db-name slam -g -o /tmp/slam
drun:
cd src && make drun

refresh: clean all

clean:
rm -Rf build
cd gaia && make clean
cd src && make clean

10 changes: 6 additions & 4 deletions slam_sim/Makefile.inc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,12 @@ ROOT := $(dir $(lastword $(MAKEFILE_LIST)))

WFLAGS = -Wall -Werror
DEBUG_FLAG = -g
#OPTIMIZATION_FLAG = -O3

# Disable optimization for now -- using it generates a segfault at
# gaia/slam/gaia_slam.cpp:734
#OPTIMIZATION_FLAG = -O1

MISC_FLAGS = --std=c++17
INC = -I/opt/gaia/include/ -I$(ROOT)gaia/ -I$(ROOT)gaia/slam/ -I$(ROOT)include/

LIB_SLAM_UTILS = $(ROOT)src/utils/slam_utils.a

CPPFLAGS = $(WFLAGS) $(DEBUG_FLAG) $(OPTIMIZATION_FLAG) $(MISC_FLAGS) $(INC)
CPPFLAGS = $(WFLAGS) $(DEBUG_FLAG) $(MISC_FLAGS) $(INC)
9 changes: 3 additions & 6 deletions slam_sim/data/map.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,8 @@
]
}
],
"landmarks": [
{ "x": -3.5, "y": 4.9, "id": 1, "name": "mark-1" },
{ "x": 3.5, "y": 4.9, "id": 2, "name": "mark-2" },
{ "x": -3.5, "y": -4.9, "id": 2, "name": "mark-3" },
{ "x": 3.5, "y": -4.9, "id": 2, "name": "mark-4" },
{ "x": 6.0, "y": -0.0, "id": 2, "name": "mark-5" }
"destinations": [
{ "x": 5.0, "y": 0.5 },
{ "x": -5.7, "y": 4.1 }
]
}
47 changes: 47 additions & 0 deletions slam_sim/data/maze.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"description": "Simple maze",
"width": 18.0,
"height": 10.0,
"world": [
{
"name": "Walls",
"vertices": [
{ "x": -8.9, "y": 4.9 },
{ "x": -6.1, "y": 4.9 },
{ "x": -6.1, "y": -0.1 },
{ "x": -2.9, "y": -0.1 },
{ "x": -2.9, "y": 0.1 },
{ "x": -5.9, "y": 0.1 },
{ "x": -5.9, "y": 4.9 },
{ "x": 2.9, "y": 4.9 },
{ "x": 2.9, "y": 0.1 },
{ "x": -0.1, "y": 0.1 },
{ "x": -0.1, "y": -0.1 },
{ "x": 3.1, "y": -0.1 },
{ "x": 3.1, "y": 4.9 },
{ "x": 5.9, "y": 4.9 },
{ "x": 5.9, "y": -2.6 },
{ "x": 6.1, "y": -2.6 },
{ "x": 6.1, "y": 4.9 },
{ "x": 8.9, "y": 4.9 },
{ "x": 8.9, "y": -4.9 },
{ "x": -8.9, "y": -4.9 },
{ "x": -8.9, "y": 4.9 }
]
},
{
"name": "Island",
"vertices": [
{ "x": -3.1, "y": 2.6 },
{ "x": 0.1, "y": 2.6 },
{ "x": 0.1, "y": 2.4 },
{ "x": -3.1, "y": 2.4 },
{ "x": -3.1, "y": 2.6 }
]
}
],
"destinations": [
{ "x": 7.5, "y": 4.0 },
{ "x": -4.5, "y": 4.0 }
]
}
30 changes: 30 additions & 0 deletions slam_sim/data/maze2.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"description": "Simple maze",
"width": 10.0,
"height": 8.0,
"world": [
{
"name": "Walls",
"vertices": [
{ "x": -4.9, "y": 3.9 },
{ "x": -2.1, "y": 3.9 },
{ "x": -2.1, "y": -2.1 },
{ "x": -1.9, "y": -2.1 },
{ "x": -1.9, "y": 3.9 },
{ "x": 1.9, "y": 3.9 },
{ "x": 1.9, "y": -2.1 },
{ "x": 2.1, "y": -2.1 },

{ "x": 2.1, "y": 3.9 },
{ "x": 4.9, "y": 3.9 },
{ "x": 4.9, "y": -3.9 },
{ "x": -4.9, "y": -3.9 },
{ "x": -4.9, "y": 3.9 }
]
}
],
"destinations": [
{ "x": 3.5, "y": 3.0 },
{ "x": 0.0, "y": 3.0 }
]
}
57 changes: 57 additions & 0 deletions slam_sim/data/maze3.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
{
"description": "Square maze",
"width": 15.0,
"height": 15.0,
"world": [
{
"name": "Walls",
"vertices": [
{ "x": 0.1, "y": 0.1},
{ "x": 14.9, "y": 0.1},
{ "x": 14.9, "y": 2.9},
{ "x": 11.9, "y": 2.9},
{ "x": 11.9, "y": 11.9},
{ "x": 9.1, "y": 11.9},
{ "x": 9.1, "y": 2.9},
{ "x": 8.9, "y": 2.9},
{ "x": 8.9, "y": 11.9},
{ "x": 2.9, "y": 11.9},
{ "x": 2.9, "y": 12.1},
{ "x": 12.1, "y": 12.1},
{ "x": 12.1, "y": 3.1},
{ "x": 14.9, "y": 3.1},
{ "x": 14.9, "y": 14.9},
{ "x": 0.1, "y": 14.9},
{ "x": 0.1, "y": 0.1}
]
},
{
"name": "Island",
"vertices": [
{ "x": 2.9, "y": 2.9},
{ "x": 6.1, "y": 2.9},
{ "x": 6.1, "y": 3.1},
{ "x": 2.9, "y": 3.1},
{ "x": 2.9, "y": 2.9}
]
},
{
"name": "Cup",
"vertices": [
{ "x": 2.9, "y": 5.9},
{ "x": 3.1, "y": 5.9},
{ "x": 3.1, "y": 8.9},
{ "x": 5.9, "y": 8.9},
{ "x": 5.9, "y": 5.9},
{ "x": 6.1, "y": 5.9},
{ "x": 6.1, "y": 9.1},
{ "x": 2.9, "y": 9.1},
{ "x": 2.9, "y": 5.9}
]
}
],
"destinations": [
{ "x": 13.5, "y": 4.5 },
{ "x": 4.5, "y": 7.5 }
]
}
15 changes: 8 additions & 7 deletions slam_sim/gaia/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,18 @@ include ../Makefile.inc
RULES_CPP = slam_rules.cpp
DB_NAME = slam

OBJS = slam_rules.o slam/gaia_slam.o
OBJS = slam/gaia_slam.o
#OBJS = slam_rules.o slam/gaia_slam.o

all: rules all_procedure_subshell

gaiac:
gaiac slam.ddl -g --db-name $(DB_NAME) -o $(DB_NAME)
all: all_gaia all_procedure_subshell

rules: gaiac
gaiat slam.ruleset -output $(RULES_CPP) -- -I/usr/lib/clang/10/include $(INC)
all_gaia:
gaiac slam.ddl -g --db-name $(DB_NAME) -o $(DB_NAME)
#gaiat slam.ruleset -output $(RULES_CPP) -- -I/usr/lib/clang/10/include $(INC)


# when freshly making, rules.cpp may not exist (e.g., if 'make clean'
# when freshly making, slam_rules.cpp may not exist (e.g., if 'make clean'
# was just run). drop into subshell for making local procedural files
# as that will induce a scan of local files
all_procedure_subshell:
Expand Down
Loading