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

Fix docs #319

Merged
merged 4 commits into from
Feb 20, 2022
Merged

Fix docs #319

merged 4 commits into from
Feb 20, 2022

Conversation

charmoniumQ
Copy link
Member

No description provided.

@wsherman64
Copy link
Contributor

The version of the most basic plugin in the online IlliXR documentation has a bug in that the start() method of a threadloop style plugin should not be overridden.

Here is a replacement that I'm now using, which includes a couple additional comments, plus some output to demonstrate that the plugin works:

// A minimal/no-op IlliXR plugin

#include "common/phonebook.hpp"
#include "common/plugin.hpp"
#include "common/threadloop.hpp"

using namespace ILLIXR;

/// Inherit from plugin if you don't need the threadloop
/// Inherit from threadloop to provide a new thread to perform the task
class basic_plugin : public threadloop {
public:
basic_plugin(std::string name_, phonebook* pb_)
: threadloop{name_, pb_}
{
printf("Starting Plugin basic_plugin\n");
RAC_ERRNO_MSG("basic_plugin in constructor");
}
virtual ~basic_plugin() override {
printf("Ending Plugin basic_plugin\n");
RAC_ERRNO_MSG("basic_plugin in destructor");
}

// Do not override the start() method (for `threadloop` style plugins)       
                                                                             
// _p_one_iteration() is called from with the threadloop start() method      
void _p_one_iteration() override {                                           
    printf("Iteration of basic_plugin\n");                                   
    RAC_ERRNO_MSG("basic_plugin at end of _p_one_iteration");                
}                                                                            

};

// This line makes the plugin importable by Spindle
PLUGIN_MAIN(basic_plugin); ```

@charmoniumQ
Copy link
Member Author

@wsherman64, I removed the RAC_*, since we are moving away from that. But otherwise, I've incorporated those changes.

docs/writing_your_plugin.md Outdated Show resolved Hide resolved
docs/writing_your_plugin.md Outdated Show resolved Hide resolved
docs/writing_your_plugin.md Outdated Show resolved Hide resolved
docs/writing_your_plugin.md Outdated Show resolved Hide resolved
Comment on lines 122 to 123
std::cout << "This goes to the log" << std::endl;
std::cout << "This goes to the console" << std::endl;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't understand the distinction between log and console here given that both prints are to cout.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about now?

@mhuzai mhuzai merged commit a0200c2 into master Feb 20, 2022
@mhuzai mhuzai deleted the issue-181-docs branch April 8, 2022 06:36
JeffreyZh4ng added a commit that referenced this pull request May 3, 2022
Semi working offloading. VIO doesnt work ATM

test commit

Add offloading server and device code

Fixing common and adding extra prints for debugging

Add prints and offloading config

Server fix for zed pt1

Offloading device cleanup

Add offload client config

Revert boost install script (#323)

* Revert "Enabled boost in 'deps.sh' (#308) (#309)"

This reverts commit 8590c74.
We do not need to build boost ourselves, we can install it from apt.

* Do not prompt user for boost installation

Fix docs (#319)

* Fix writing_your_plugin.md docs

* Added Bill's suggestions

* Fix typos

* Fix typos

Fixed `pose_lookup` and `dynamic_lib` (#304)

* Fixing pose_lookup and dynamic_lib (#303)

- Fixed 'pose_lookup' initialization in 'pose_lookup/plugin.cpp'
- Added debugging prints to 'common/dynamic_lib.hpp'
- New 'path_basename' for debugging in 'common/dynamic_lib.hpp'
- Failed calls to 'dlclose' non-fatal with 'dbg' in 'common/dynamic_lib.hpp'

* Updated literal types in 'commmon/dynamic_lib.hpp' (#303)

* Addressing reviewer comments (#303)

- Merged 'opt' and 'dbg' paths in 'common/dynamic_lib.hpp'

* Miscellaneous changes (#303)

- Committing to mitigate CI initialization bug (gtsam preintegration)
- Refactored spacing in 'common/dynamic_lib.hpp'

* Updating 'dynamic_lib' (#303)

- Changed '_m_lib_name' -> '_m_lib_path' in 'common/dynamic_lib.hpp'
- Added comments in 'common/dynamic_lib.hpp'

* Using string constructor copy in 'common/dynamic_lib.hpp' (#303)

* Removed debug guard when failing to open a dynamic library (#303

Added documentation for using Switchboard and Phonebook externally (#320)

* Added documentation for using Switchboard and Phonebook externally

* fix typo and spacing

* Fix typos

Co-authored-by: Qinjun Jiang <90299267+qinjunj@users.noreply.github.com>

Renamed files and merge master

Cleaned up code ready for PR

Fix readme

Revert hotfix and address comments

Revert rt_slam config

Minor fix and verify all combinations of ZED/dataset with OV/Kimera work
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

4 participants