-
Notifications
You must be signed in to change notification settings - Fork 0
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
base: main
Are you sure you want to change the base?
Conversation
…still missing. Working on compiling.
{ | ||
public: | ||
txn_t(); | ||
~txn_t() { ; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I believe you can just omit the destructor.
constexpr uint32_t c_rule_wait_millis = 100; | ||
using std::this_thread::sleep_for; | ||
|
||
static constexpr uint32_t c_rule_wait_millis = 50; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm guessing this is not used anymore?
|
||
/** | ||
* Wait for simulation to complete. | ||
*/ | ||
void main_loop() | ||
{ | ||
int32_t ctr = 0; | ||
int32_t reached_destinations = 0; | ||
g_running = true; | ||
// When the simulation completes it will set g_quit to 1. Then we can | ||
// exit. In the meantime, the simulation is being handled by rules. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lies! (from what you've said...)
What you've created here is a SLAM implementation to "beat"! This a good learning experience for Gaia in terms of establishing a baseline that we can use to compare a rules implementation to a "native" one without using rules. I see lots of areas for exploration here should we have the time/inclination to delve into this further. |
Mega-PR here. This is an update to the slam simulator. It incorporates changes made to the side branch 'trislam' and extends those to include path finding and autonomous navigation.
The paradigm here is largely stream processing. It makes use of the database (direct access) but not of rules. Previous versions did use rules, but they added complexity w/o providing additional functionality. This is a simple SLAM example, particularly as it doesn't address the L(ocalization) part of the algorithm. It's possible rules could help w/ that, but it's also possible that the heavy computations necessary for localization wouldn't be a good fit w/in rules.
The world map the bot uses to navigate is a json file in data/, and the name of the file is supplied to the app on the command line. The easiest way to run the app is to cd to src/ and then 'make run', modifying the Makefile as necessary to determine which map to use (other options are commented out in the 'run' target). Images of the bot's view of the world are written to src/, and the ffmpeg command to generate a movie from those images is in a comment at the top of main.cpp.
This example uses make instead of cmake. At some point cmake broke and it was easier to switch back to make to proceed, esp. as make provided more easily controlled functionality, such as compiling individual files and adding utility make targets, like run, drun, clean_images, etc.
The largest chunk of code is in occupancy.cpp and the supporting file path_map.cpp. This represents the occupancy grid and implements a path-finding algorithm in the grid. The path-finding element (path_map.cpp) is leveraged from an open source project I have, and 'imported' to Gaia with open-source constraints being removed.