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

Adding the "fauxpose" plugin (again) #389

Merged
merged 8 commits into from
Jul 29, 2023
Merged

Conversation

wsherman64
Copy link
Contributor

Updated plugin code and comments based on past pull request comments. Decided to resubmit as a new PR.

@charmoniumQ
Copy link
Member

lgtm

@jianxiapyh jianxiapyh self-requested a review July 13, 2023 20:06
@astro-friedel astro-friedel added this to the 3.2 milestone Jul 13, 2023
configs/faux.yaml Outdated Show resolved Hide resolved
fauxpose/common Outdated Show resolved Hide resolved
@Jebbly Jebbly mentioned this pull request Jul 26, 2023
configs/faux.yaml Show resolved Hide resolved
docs/README_fauxpose.md Show resolved Hide resolved
@Jebbly Jebbly merged commit 6d015a0 into ILLIXR:master Jul 29, 2023
3 checks passed
astro-friedel pushed a commit that referenced this pull request Jul 31, 2023
* Adding the "fauxpose" plugin (again)

* [pre-commit.ci] Run clang-format

* Adding documentation files for FauxPose plugin

* Update FauxPose code and documentation in preparation for PR

* Uncomment code from a quick test

* [pre-commit.ci] Run clang-format

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
astro-friedel added a commit that referenced this pull request Sep 20, 2023
* only a single file needs to be edited to add/remove plugins

* moved master plugin file

* added checks, moved some functions to HelperFunctions.cmake

* fixed parsing issue

* removed un-needed files

* added new zed plugin

* minor bug fixes

* [pre-commit.ci] Run clang-format

* Add more documentation and comments

* [pre-commit.ci] Run clang-format

* Ignore warnings on 3rd party lib

* [pre-commit.ci] Run clang-format

* Supress warnings

* Remove -Werror

* Switch to glslangValidator for easier installation setup

* Swap timewarp_vk to glslangValidator

* Fix descriptor pool sizing

* Change load up to clear in tw pass

* Sync operations on separete thread for glfw

* [pre-commit.ci] Run clang-format

* Enable debugview for native-vk

* Adding the "fauxpose" plugin (again) (#389)

* Adding the "fauxpose" plugin (again)

* [pre-commit.ci] Run clang-format

* Adding documentation files for FauxPose plugin

* Update FauxPose code and documentation in preparation for PR

* Uncomment code from a quick test

* [pre-commit.ci] Run clang-format

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* added skipping of comments in yaml processing

* added new documentation structure, added fauxpose docs

* added fauxpose plugin to cmake style

* include bug fixes

* updated base yaml for offload_server

* updated finding of glfw3 to be sure it is found

* added new monado package

* updated vulkan branch to new build system

* fix interdependency issue

* fixed initializer bug

* final merge of new Vulkan to Cmake

* [pre-commit.ci] Run clang-format

* Initial rebase (native-gl working) with updated macro defines

* restructured to a common structure and removed redundant files

* restructured to remove redundant or un-needed includes

* consolidated redundant versions of files

* more removal of redundant files

* plugin and main cpp files updated to remove redundant includes

* Disable OpenGL window for Monado and Vulkan

* Support monado with timewarp_gl

* [pre-commit.ci] Run clang-format

* reduced number of warnings by fixing the issues

* reduced extraneous warnings

* fixed warning

* streamlined struct instantiation

* removed OpenCV dependency from this modules which do not use it

* Added support for OpenNI

* [pre-commit.ci] Run clang-format

* Using steady_clock instead of sensor timestamp

* Add support for rgb_depth for debugview

* [pre-commit.ci] Run clang-format

* Fixed debugview where there are both stereo and RGBD images

* [pre-commit.ci] Run clang-format

* Add OpenNI Installation

* Add record rgb_depth

* [pre-commit.ci] Run clang-format

* Fixed installation script

* fixed library linking issue

* updated to newer versions of the packages

* new version of plugin

* [pre-commit.ci] Run clang-format

* Address comments + fix build issues

* Remove pose prediction

* renamed Monados to the different versions, fixed up dependency docs

* de-centralize the dependencies

* make sure to only create one instance of each external project

* fixed issues with dependency docs

* break exe code into exe and library for inclusion with monado

* [pre-commit.ci] Run clang-format

* added shortcuts for "external" plugins to the act like internal ones

* updated versions

* connected to proper external projects

* removed old include guard

* renamed profiles

* converted groups to profiles

* made the two monado versions more distinct name wise

* migrated profile stuff to the yaml file, and not in cmake

* moved kimera_vio and openvins to visualizers

since these are not really plugins they get treated a bit differently

* colorize cmake output, also print exec lines to screen

* [pre-commit.ci] Run clang-format

* Fix issues with common

* Add README for openni debugging

* Return rt_slam_plugin to original state

* Fix sleep time

* [pre-commit.ci] Run clang-format

* handle local data and remote data properly

* handle run and install_prefix inputs correctly

* updating documentation

* updated dependencies in docsumentation

* [pre-commit.ci] Run clang-format

* Add some comments for debugview

* [pre-commit.ci] Run clang-format

* fixed config error

* Fix order of model view matrix

* fixed missing include

* renamed _vuilkan profiles to _vk, in line with _gl naming convention.

* [pre-commit.ci] Run clang-format

* fixed cmake command line issue

* updated monado builds to make them more distinct and give better instructions for the command line.

* removed kimera_vio support

* fixed command line generation

* fixed library naming issue

* Add monado-gl config

* Define ILLIXR_MONADO for runtime_impl

* Remove libuvc from Monado build options

* Remove old comments

* Clean up newlines at EOF and unused structs

* Re-enable offload texture copy

* [pre-commit.ci] Run clang-format

* documentation now builds with 'make docs' command, list of plugins and profiles are now auto generated

* updates for orb_slam

* updated file structure to match current format

* removed un-needed files

* added openni documentation to main docs

* added openni and record_rgb_depth plugins to dependency listings

* [pre-commit.ci] Run clang-format

* new openvins git tag

* fixed typo in formatting

* fixed reading of yaml file

* added comments about what OS is supported

* Update config files

* Clarify OpenGL and Vulkan differences

* fixes for demo_data path and installing shaders for vkdemo and timewarp_vk

* removed erroneous openxr_app plugin from list

* fixed required cmake version

* fixed bug where the comparison was case sensitive

* monado instructions now create a shell script rather than duping to the screen

* updated flags for profiles

* fixed bug

* fixed bug

* updated tag for MonadoGL

* remove un needed files

* fixed issue with dependency pointing to wrong target

* fixed issue where monado was being built when not requested

* fixed order of plugins for illixr.yaml

* updated documentation for build

* [pre-commit.ci] Run clang-format

* Remove duplicate key in .clang-format

* Deleted file because unused macros will be superseded by spdlog.

* std::couts inside #ifndef NDEBUG changed to spdlog::debug()

* changed std::cerr to spdlog::error as part of RAC_ERRNO/RAC_ERRNO_MSG

It didn't make sense to change the bare cerr separately from the #ifndef
NDEBUG cerr since both are used in support of the RAC_ERRNO and
RAC_ERRNO_MSG macros which are wrappers around a reporting function.

* bare std::cout's replaced with spdlog::info()

* cout's using std::this_thread::get_id() changed to use spdlog %t pattern

std::this_thread::get_id() returns somethng fmt doesn't like, possibly
an ostream or ostringstream. The recommended way to print thread ids is
to change the default output pattern using the %t format.

* One cout replaced with spdlog::info, the rest ignored.

There is a hand-rolled progress bar in the writeDataToDisk() method.
spdlog doesn't support progress bars at this time. Philosophically, it
can be argued progress bars shouldn't be logged, anyway, so leaving
as-is.

* std::cerr's in #ifndef NDEBUG and not followed by abort to spdlog::debug

* std::cerr's in #ifndef NDEBUG and followed by abort to spdlog::error

* std::cerr's in #ifndef NDEBUG to spdlog::warn

- not spdlog::error because they don't call abort
- not spdlog::debug because they seem more urgent

* std::cerr's followed by abort to spdlog::error

* std::cerr followed by throw to spdlog::error

* std::cerr's to spdlog::info

These instances didn't seem to warrant spdlog::error, and they weren't inside
 #ifndef NDEBUG so didn't merit a spdlog::debug

* printf's to spdlog::info

* printf's in #ifnder NDEBUG to spdlog::debug

* Config for testing spdlog

* ILLIXR core write to common log file.

A basic, multi-threaded, file logger is created in runtime/main.cpp.
This is accessed via spdlog::get() in any file that wants to write
to it.

* plugins write to global logger

* changed log message formatting and patterns

* Changes to write to both a global log file and console

The key was to follow the example in the spdlog GitHub wiki under
Section 2. Creating loggers "Creating loggers with multiple sinks"
and NOT the multisink example in the main example app.

* Made plugin.spdlogger() method for concrete plugins to use.

This method needs to be called explicitly by concrete classes. It
creates a file sink, a console sink, and a multi-sink logger using
spdlog object factories. The logger is accessed via the spdlog::get()
method which does a look up on the global spdlog registry.

* Removed explict "[<PLUGINNAME>]" from log messsages for derived plugins.

plugin.name is used to register each plugin logger in the global spdlog
registry. This will appear in the default log format pattern, or can be
accessed by the %n format.

* Plugin logging toggled or set level via env vars

plugin.spdlogger() method rewritten to take a string describing the log
level. Default is "off" which turns off logging completely, so this is
an opt-in setup.

Per-plugin logging is activated by exporting <PLUGIN_NAME>_LOG_LEVEL as
one of the predefined spdlog level strings from spdlog/common.h, i.e.,
trace, debug, info, warning, error, critical, off.

* Changed to add function that mimics plugin.spdlogger method

The main difference between this function and plugin.spdlogger is that
since this is not part of an object with a name attribute, the name
is supplied as a function parameter. The logger which gets created and
registered in the global spdlog registry must be accessed by this
string, which is not ideal.

Perhaps this name should be declared as a global const std::string?

* Use "illixr_app" instead of "illixr_log" for spdlog registry lookup

* Added color markers around the [level] part of the manual patterns.

* Updated logging section.

Metrics section is updated in the redo_timing-2 PR.

* [pre-commit.ci] Run clang-format

* s/"illixr_app"/"illixr"/g

Improved readability and space savings in log messages.

* Add cleaning for separated imu/cam and offload_data

* Workaround for running with profile=opt

Jeffrey pointed out that this PR doesn't work with profile=opt. I'd been
testing only with profile=dbg since the vast majority of log messages
originate inside of #ifndef NDEBUG/#endif blocks.

For whatever reason, having these references to the global "illixr"
logger created in runtime/main.cpp cause ILLIXR to crash when using
profile=opt.

* [pre-commit.ci] Run clang-format

* Changed info() logs to debug()

per reviewer suggestion.

* Use global "illixr" spdlog since this is a service not a plugin.

* Added explicit "[pose_lookup]" to log message.

* setting default log_level to "warn"

* Updated based on discussion of 2023-08-31 ILLIXR dev meeting.

* Changed log_level from std::string to const char *

Changed the parameter type in order to use std::getenv instead of
ILLIXR::getenv_or which removed having to redundantly set the default
logging level.

* Uncommented unintentionally commented out logging.

* fixed typo

* Removed unused member

* fixed extraneous space

* fixed typo

* fixed typo

* Capitalized first word of thrid-level headings.

* clarified log message

* Fixed log message to be consistent with other usage.

* removed commented-out log messages that are already in switchboard.

* Changed log message from info level to warn

* changed log message from debug to warn

* condensed two log messages into one

* Default logging level "warn" unless debug build, then "debug".

* [pre-commit.ci] Run clang-format

* Swap default logging levels (warn for opt, debug for dbg)

* Undercase ZED -> zed

* Explicitly getting the global "illixr" log for consistency

* Use the same OpenVINs commit tag that redo_timing-2 branch does

* Put only spdlog call not inside #ifndef NDEBUG/#endif, inside.

There are 7 calls to spdlog::get() in common/switchboard.hpp. Six of
these were already inside of #ifndef NDEBUG/#endif blocks:
3 in topic_subscription::thread_on_start()
1 in the reader class constructor
2 in  switchboard::try_register_topic()

The remaning call, which was not inside of a preprocessor block was in
the topic_buffer class constructor.

This one particular call caused a crash when using either the open_vins and/or
debugview plugin's compiled with the opt profile.

This seems like a reasonable fix, considering that the other calls in
switchboard.hpp are inside preprocessing blocks.

* Removing test configuration not intended for public use.

* Making lowercase to be consistent with other usage.

* [pre-commit.ci] Run clang-format

* documentation updates

* final merge of 361 changes

* removed redundant file

* making sure that pthread is properly linked to

* updated documentation

added pthread parent package to requirements list, added strong recommendation to install deepstream when using offload_vio plugins

* added logging to plugins

* [pre-commit.ci] Run clang-format

* updated tags to use for monado repos

* updated monado_gl tag

* cmake now writes out two scripts for running monado

* Fix for older versions of cmake to find all parts of Vulkan

* removed ORB_slam as it is not part of this release

* updated repo versions for spdlog

* added cmake code to make sure pthread was explicitly linked against

* added logging to more plugins

* updated tag for monado_gl

* [pre-commit.ci] Run clang-format

* added required spdlog dependency in docs

* fixed typo

* documentation updates

* made builds not dependent on make

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: shg8 <me@shg.life>
Co-authored-by: Steven <38004233+shg8@users.noreply.github.com>
Co-authored-by: Jeffrey Liu <jeffliu604@gmail.com>
Co-authored-by: Bill Sherman <7430215+wsherman64@users.noreply.github.com>
Co-authored-by: Henry Che <daihung.che@gmail.com>
Co-authored-by: Mark Van Moer <mvanmoer@illinois.edu>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants