xvsdk
3.2.0
|
The class to represent the component doing the 6dof tracking with SLAM algorithm on host. More...
#include <xv-sdk.h>
Public Types | |
enum | Mode { Edge = 0, Mixed, EdgeFusionOnHost } |
using | Data = Pose const & |
Public Member Functions | |
virtual Mode | mode () const =0 |
Get #Mode. More... | |
virtual bool | start () override=0 |
Start slam of current mode. | |
virtual bool | start (Mode mode)=0 |
Start slam of specific mode. More... | |
virtual bool | reset ()=0 |
Reset the 6dof tracker (SLAM) More... | |
virtual bool | getPose (Pose &pose, double prediction=0.)=0 |
Get the current 6dof pose of the device. More... | |
virtual bool | getPoseAt (Pose &pose, double timestamp)=0 |
Get the 6dof pose of the device at a given timestamp. More... | |
virtual int | registerVisualPoseCallback (std::function< void(const Pose &)> lostCallback)=0 |
Register a callback called when visual SLAM compute a new unfiltered pose. More... | |
virtual bool | unregisterVisualPoseCallback (int callbackId)=0 |
virtual int | registerLostCallback (std::function< void()> lostCallback)=0 |
Register a callback called when SLAM is lost. More... | |
virtual bool | unregisterLostCallback (int callbackId)=0 |
virtual int | registerStereoPlanesCallback (std::function< void(std::shared_ptr< const std::vector< Plane >>)> planeCallback)=0 |
Callback to get the detected planes using stereo cameras and SLAM. More... | |
virtual bool | unregisterStereoPlanesCallback (int callbackId)=0 |
virtual bool | clearStereoPlanes ()=0 |
virtual int | registerTofPlanesCallback (std::function< void(std::shared_ptr< const std::vector< Plane >>)> planeCallback)=0 |
Callback to get the detected planes using ToF camera and SLAM. More... | |
virtual bool | unregisterTofPlanesCallback (int callbackId)=0 |
virtual bool | clearTofPlanes ()=0 |
virtual int | registerMapCallback (std::function< void(std::shared_ptr< const xv::SlamMap >)> mapCallback)=0 |
Callback to get the SLAM map updates. More... | |
virtual bool | unregisterMapCallback (int callbackId)=0 |
virtual bool | loadMapAndSwitchToCslam (std::streambuf &mapStream, std::function< void(int)> done_callback, std::function< void(float)> localized_on_reference_map={})=0 |
Load a SLAM map and use it as an immutable reference map. More... | |
virtual bool | saveMapAndSwitchToCslam (std::streambuf &mapStream, std::function< void(int, int)> done_callback, std::function< void(float)> localized_on_reference_map={})=0 |
Save a SLAM map and use it as an immutable reference map. More... | |
virtual bool | stop ()=0 |
stop streaming. | |
virtual int | registerCallback (std::function< void(Pose const &)>)=0 |
Register callback to receive data. | |
virtual bool | unregisterCallback (int callbackId)=0 |
Unregister callback. | |
The class to represent the component doing the 6dof tracking with SLAM algorithm on host.
For Mixed mode, callback will get the last computed SLAM pose. Callback is call on each IMU recieved because SLAM pose also use IMU for update.
|
pure virtual |
Get the current 6dof pose of the device.
The 6dof pose is the rotation and translation of the IMU frame coordinates based on the world frame coordinates. The world frame coordinates coorespond to the VLSAM map and the device coordinates is based on the IMU coordinates.
[out] | pose | corresponding to the timestamp "now" + "prediction" |
[in] | prediction | (in s) amount of prediction to use to get a pose corresponding to the future |
|
pure virtual |
Get the 6dof pose of the device at a given timestamp.
The 6dof pose is the rotation and translation of the IMU frame coordinates based on the world frame coordinates. The world frame coordinates coorespond to the VLSAM map and the device coordinates is based on the IMU coordinates.
[out] | pose | result pose corresponding to the timestamp, need to be not too in the pass or too in the future |
[in] | timestamp | of the wanted pose, in s based on the host clock std::chrono::steady_clock() |
|
pure virtual |
Load a SLAM map and use it as an immutable reference map.
mapStream | the input map stream for loading the map |
done_callback | When the switch is done the callback will be called. The input of the callback is the quality result (0-100) of the reference map. |
localized_on_reference_map | Call the callback if the SLAM uses a reference map and is localized on the reference map. The input parameter is the threshold for the percentage [0.f,1.f] of reference map usage according to whole map (reference map and dynamic map). If SLAM is not currently using enough the reference map and the usage is below this threshold, then the callback is called with the current percentage [0.f,1.f] of 3D points from the reference map. |
|
pure virtual |
Get #Mode.
|
pure virtual |
Register a callback called when SLAM is lost.
|
pure virtual |
Callback to get the SLAM map updates.
|
pure virtual |
Callback to get the detected planes using stereo cameras and SLAM.
The vector contains planes with current planes and each plane has an ID. Between mutiple calls new planes can be added, previous planes updated or merged. If a plane disappear from the vector, it means it was merged with other.
|
pure virtual |
Callback to get the detected planes using ToF camera and SLAM.
The vector contains planes with current planes and with plane ID as key. Between mutiple calls new planes can be added, previous planes updated or merged. If a plane disappear from the vector, it means it was merged with other.
|
pure virtual |
Register a callback called when visual SLAM compute a new unfiltered pose.
|
pure virtual |
Reset the 6dof tracker (SLAM)
|
pure virtual |
Save a SLAM map and use it as an immutable reference map.
mapStream | the output map stream to for writing the map |
done_callback | When the switch is done the callback will be called. The input of the callback is the quality result (0-100) of the reference map. |
localized_on_reference_map | Call the callback if the SLAM uses a reference map and is localized on the reference map. The input parameter is the threshold for the percentage [0.f,1.f] of reference map usage according to whole map (reference map and dynamic map). If SLAM is not currently using enough the reference map and the usage is below this threshold, then the callback is called with the current percentage [0.f,1.f] of 3D points from the reference map. |
|
pure virtual |
Start slam of specific mode.
Stop old mode slam(if running), switch to new mode, and then start slam of new mode.