JeVoisBase
1.22
JeVois Smart Embedded Machine Vision Toolkit Base Modules
|
|
Plot raw IMU readings on top of video. More...
Public Member Functions | |
DemoIMU (std::string const &instance) | |
Constructor. | |
virtual | ~DemoIMU () |
Virtual destructor for safe inheritance. | |
virtual void | process (jevois::InputFrame &&inframe, jevois::OutputFrame &&outframe) override |
Processing function. | |
virtual void | process (jevois::InputFrame &&inframe, jevois::GUIhelper &helper) override |
Processing function with GUI output. | |
Public Member Functions inherited from jevois::Module | |
Module (std::string const &instance) | |
virtual | ~Module () |
virtual void | process (InputFrame &&inframe) |
virtual void | sendSerial (std::string const &str) |
virtual void | parseSerial (std::string const &str, std::shared_ptr< UserInterface > s) |
virtual void | supportedCommands (std::ostream &os) |
Public Member Functions inherited from jevois::Component | |
Component (std::string const &instance) | |
virtual | ~Component () |
std::shared_ptr< Comp > | addSubComponent (std::string const &instance, Args &&...args) |
void | removeSubComponent (std::shared_ptr< Comp > &component) |
void | removeSubComponent (std::string const &instance, bool warnIfNotFound=true) |
std::shared_ptr< Comp > | getSubComponent (std::string const &instance) const |
bool | isTopLevel () const |
bool | initialized () const |
std::string const & | className () const |
std::string const & | instanceName () const |
std::vector< std::string > | setParamVal (std::string const ¶mdescriptor, T const &val) |
void | setParamValUnique (std::string const ¶mdescriptor, T const &val) |
std::vector< std::pair< std::string, T > > | getParamVal (std::string const ¶mdescriptor) const |
T | getParamValUnique (std::string const ¶mdescriptor) const |
std::vector< std::string > | setParamString (std::string const ¶mdescriptor, std::string const &val) |
void | setParamStringUnique (std::string const ¶mdescriptor, std::string const &val) |
std::vector< std::pair< std::string, std::string > > | getParamString (std::string const ¶mdescriptor) const |
std::string | getParamStringUnique (std::string const ¶mdescriptor) const |
void | freezeParam (std::string const ¶mdescriptor, bool doit) |
void | freezeAllParams (bool doit) |
std::string | descriptor () const |
void | setParamsFromFile (std::string const &filename) |
std::istream & | setParamsFromStream (std::istream &is, std::string const &absfile) |
virtual void | paramInfo (std::shared_ptr< UserInterface > s, std::map< std::string, std::string > &categs, bool skipFrozen, std::string const &cname="", std::string const &pfx="") |
void | foreachParam (std::function< void(std::string const &compname, ParameterBase *p)> func, std::string const &cname="") |
std::shared_ptr< DynamicParameter< T > > | addDynamicParameter (std::string const &name, std::string const &description, T const &defaultValue, ParameterCategory const &category) |
std::shared_ptr< DynamicParameter< T > > | addDynamicParameter (std::string const &name, std::string const &description, T const &defaultValue, ValidValuesSpec< T > const &validValuesSpec, ParameterCategory const &category) |
void | setDynamicParameterCallback (std::string const &name, std::function< void(T const &)> cb, bool callnow=true) |
void | removeDynamicParameter (std::string const &name, bool throw_if_not_found=true) |
void | setPath (std::string const &path) |
std::filesystem::path | absolutePath (std::filesystem::path const &path="") |
std::shared_ptr< Comp > | addSubComponent (std::string const &instance, Args &&...args) |
void | removeSubComponent (std::shared_ptr< Comp > &component) |
void | removeSubComponent (std::string const &instance, bool warnIfNotFound=true) |
std::shared_ptr< Comp > | getSubComponent (std::string const &instance) const |
bool | isTopLevel () const |
bool | initialized () const |
std::string const & | className () const |
std::string const & | instanceName () const |
std::vector< std::string > | setParamVal (std::string const ¶mdescriptor, T const &val) |
void | setParamValUnique (std::string const ¶mdescriptor, T const &val) |
std::vector< std::pair< std::string, T > > | getParamVal (std::string const ¶mdescriptor) const |
T | getParamValUnique (std::string const ¶mdescriptor) const |
std::vector< std::string > | setParamString (std::string const ¶mdescriptor, std::string const &val) |
void | setParamStringUnique (std::string const ¶mdescriptor, std::string const &val) |
std::vector< std::pair< std::string, std::string > > | getParamString (std::string const ¶mdescriptor) const |
std::string | getParamStringUnique (std::string const ¶mdescriptor) const |
void | freezeParam (std::string const ¶mdescriptor, bool doit) |
void | freezeAllParams (bool doit) |
std::string | descriptor () const |
void | setParamsFromFile (std::string const &filename) |
std::istream & | setParamsFromStream (std::istream &is, std::string const &absfile) |
virtual void | paramInfo (std::shared_ptr< UserInterface > s, std::map< std::string, std::string > &categs, bool skipFrozen, std::string const &cname="", std::string const &pfx="") |
void | foreachParam (std::function< void(std::string const &compname, ParameterBase *p)> func, std::string const &cname="") |
std::shared_ptr< DynamicParameter< T > > | addDynamicParameter (std::string const &name, std::string const &description, T const &defaultValue, ParameterCategory const &category) |
std::shared_ptr< DynamicParameter< T > > | addDynamicParameter (std::string const &name, std::string const &description, T const &defaultValue, ValidValuesSpec< T > const &validValuesSpec, ParameterCategory const &category) |
void | setDynamicParameterCallback (std::string const &name, std::function< void(T const &)> cb, bool callnow=true) |
void | removeDynamicParameter (std::string const &name, bool throw_if_not_found=true) |
void | setPath (std::string const &path) |
std::filesystem::path | absolutePath (std::filesystem::path const &path="") |
Public Member Functions inherited from jevois::ParameterRegistry | |
virtual | ~ParameterRegistry () |
Related Symbols | |
(Note that these are not member symbols.) | |
JEVOIS_DECLARE_PARAMETER (afac, float, "Factor applied to acceleration values for display, or 0 to not display", 100.0F, ParamCateg) | |
Parameter. | |
JEVOIS_DECLARE_PARAMETER (gfac, float, "Factor applied to gyroscope values for display, or 0 to not display", 0.5F, ParamCateg) | |
Parameter. | |
JEVOIS_DECLARE_PARAMETER (mfac, float, "Factor applied to magnetometer values for display, or 0 to not display", 3.0F, ParamCateg) | |
Parameter. | |
Additional Inherited Members | |
Protected Member Functions inherited from jevois::Component | |
virtual void | preInit () |
virtual void | postInit () |
virtual void | preUninit () |
virtual void | postUninit () |
virtual void | preInit () |
virtual void | postInit () |
virtual void | preUninit () |
virtual void | postUninit () |
Protected Member Functions inherited from jevois::ParameterRegistry | |
void | addParameter (ParameterBase *const param) |
void | removeParameter (ParameterBase *const param) |
void | callbackInitCall () |
Plot raw IMU readings on top of video.
As an optional hardware upgrade, one can install a global shutter sensor into JeVois (an OnSemi AR0135 1.2MP), which also includes on its custom circuit board for JeVois an inertial measurement unit (IMU). The IMU is a 9-degrees-of-freedom (9DOF) TDK InvenSense ICM-20948 (with 3-axis accelerometer, 3-axis gyroscope, and 3-axis magnetometer). This IMU also includes a digital motion processing unit (small programmable processor inside the IMU chip), which allows it to compute and filter Euler angles or quaternions directly inside the IMU chip.
This module only works with optional JeVois sensors that include an IMU! The base JeVois-A33 smart camera does not have an onboard IMU.
This module demonstrates the RAW and FIFO modes of the IMU.
The specifications of this chip are quite impressive:
With quaternions computed on-chip, with an algorithm that gets sensor data at a highly accurate, fixed rate, and applies various calibrations, drift corrections, and compensations on the fly, one gets highly accurate real-time estimate of the sensor's pose in the 3D world and of how it is moving.
Note that communication with the IMU is over a 400kHz I2C bus, which may limit data readout rate depending on which data is requested from the IMU.
This IMU has 3 basic modes of operation (parameter mode, which can only be set in params.cfg):
|
inline |
|
inlinevirtual |
|
inlineoverridevirtual |
Processing function with GUI output.
Reimplemented from jevois::Module.
Definition at line 204 of file DemoIMU.C.
References jevois::IMUdata::ax(), jevois::IMUdata::ay(), jevois::IMUdata::az(), jevois::GUIhelper::drawInputFrame(), jevois::GUIhelper::endFrame(), jevois::IMUdata::gx(), jevois::IMUdata::gy(), jevois::IMUdata::gz(), jevois::GUIhelper::iinfo(), jevois::GUIhelper::itext(), jevois::IMUdata::magovf, jevois::IMUdata::mx(), jevois::IMUdata::my(), jevois::IMUdata::mz(), jevois::sformat(), jevois::Timer::start(), jevois::GUIhelper::startFrame(), jevois::Timer::stop(), and jevois::IMUdata::temp().
|
inlineoverridevirtual |
Processing function.
Reimplemented from jevois::Module.
Definition at line 123 of file DemoIMU.C.
References jevois::IMUdata::ax(), jevois::IMUdata::ay(), jevois::IMUdata::az(), jevois::yuyv::Black, jevois::RawImage::buf, jevois::yuyv::DarkGreen, jevois::yuyv::DarkPink, jevois::yuyv::DarkTeal, jevois::rawimage::drawFilledRect(), jevois::rawimage::drawLine(), jevois::RawImage::fmt, jevois::IMUdata::gx(), jevois::IMUdata::gy(), jevois::IMUdata::gz(), h, jevois::RawImage::height, jevois::yuyv::LightGreen, jevois::yuyv::LightPink, jevois::yuyv::LightTeal, jevois::IMUdata::magovf, jevois::yuyv::MedGreen, jevois::yuyv::MedPink, jevois::yuyv::MedTeal, jevois::IMUdata::mx(), jevois::IMUdata::my(), jevois::IMUdata::mz(), jevois::RawImage::pixels(), jevois::RawImage::pixelsw(), jevois::RawImage::require(), jevois::sformat(), jevois::IMUdata::temp(), jevois::yuyv::White, jevois::RawImage::width, and jevois::rawimage::writeText().
|
related |
Parameter.
|
related |
Parameter.
|
related |
Parameter.