25 virtual bool start() = 0;
29 virtual bool stop() = 0;
53 virtual const std::vector<Calibration>&
calibration();
56 virtual bool setResolution(
int resolution );
57 virtual bool setFramerate(
float framerate );
66 virtual bool setExposure(
int aecMode = 0,
int exposureGain = 0,
float exposureTimeMs = 0.0 );
148 virtual bool get(
Orientation& pose,
double prediction = 0.) = 0;
184 virtual const std::vector<Calibration>&
calibration() = 0;
189 virtual bool open() = 0;
194 virtual bool close() = 0;
218 virtual bool setResolution(
const Resolution &resolution ) = 0;
228 enum class StreamMode { DepthOnly = 0, CloudOnly, DepthAndCloud, None, CloudOnLeftHandSlam};
229 enum class DistanceMode { Short = 0, Middle, Long };
230 enum class SonyTofLibMode { IQMIX_DF ,IQMIX_SF, LABELIZE_DF ,LABELIZE_SF ,M2MIX_DF ,M2MIX_SF };
231 enum class Framerate{ FPS_5 ,FPS_10 ,FPS_15 ,FPS_20 ,FPS_25 ,FPS_30 };
232 enum class Resolution{ Unknown = -1,VGA = 0 ,QVGA ,HQVGA};
233 enum class Manufacturer {Unknown = -1, Pmd = 0, Sony};
239 virtual bool unregisterColorDepthImageCallback(
int callbackId) = 0;
292 virtual bool setMode(
int mode) = 0;
297 virtual bool setSonyTofSetting(SonyTofLibMode mode, Resolution resolution, Framerate frameRate) = 0;
315 enum class Mode { Edge = 0, Mixed, EdgeFusionOnHost };
321 virtual Mode
mode()
const = 0;
326 virtual bool start()
override = 0;
339 virtual bool reset() = 0;
351 virtual bool getPose(
Pose& pose,
double prediction = 0.) = 0;
370 virtual bool unregisterVisualPoseCallback(
int callbackId) = 0;
371 #define XVSDK_HAS_SLAM_VISUAL_POSE_CALLBACK
378 virtual bool unregisterLostCallback(
int callbackId) = 0;
388 virtual bool unregisterStereoPlanesCallback(
int callbackId) = 0;
389 virtual bool clearStereoPlanes() = 0;
398 virtual int registerTofPlanesCallback(std::function<
void (std::shared_ptr<
const std::vector<Plane>>)> planeCallback) = 0;
399 virtual bool unregisterTofPlanesCallback(
int callbackId) = 0;
400 virtual bool clearTofPlanes() = 0;
407 virtual int registerMapCallback(std::function<
void (std::shared_ptr<const xv::SlamMap>)> mapCallback) = 0;
408 virtual bool unregisterMapCallback(
int callbackId) = 0;
420 virtual bool loadMapAndSwitchToCslam(std::streambuf& mapStream, std::function<
void(
int )> done_callback, std::function<
void(
float)> localized_on_reference_map={}) = 0;
431 virtual bool saveMapAndSwitchToCslam(std::streambuf& mapStream, std::function<
void(
int ,
int )> done_callback, std::function<
void(
float)> localized_on_reference_map={}) = 0;
441 enum class Source { LEFT = 0, RIGHT, RGB, TOF };
443 virtual bool setDescriptor(
const std::string &filepath ) = 0;
444 virtual bool setModel(
const std::string &filepath ) = 0;
445 virtual bool setSource(
const Source &source ) = 0;
446 virtual xv::ObjectDetector::Source getSource()
const = 0;
449 virtual int registerCnnRawCallback(std::function<
void (std::shared_ptr<CnnRawWrapper>
const&)> poseCallback) = 0;
450 virtual bool unregisterCnnRawCallback(
int callbackId) = 0;
461 enum class Mode { Hardware = 0, Software };
465 virtual Mode
mode()
const = 0;
467 virtual bool start(
const std::string &sgbmConfig) = 0;
469 virtual bool setConfig(
const std::string &sgbmConfig) = 0;
489 enum class Mode { TEMPERATURE = 0, TEMPERTURE = 0, GREY };
490 virtual bool setMode( Mode mode ) = 0;
508 virtual bool setExposure(
int leftGain,
float leftTimeMs,
int rightGain,
float rightTimeMs ) = 0;
543 virtual bool UnregisterDynamicGestureCallback(
int callbackID) = 0;
553 virtual bool unregisterKeypointsCallback(
int callbackId) = 0;
563 virtual bool unregisterSlamKeypointsCallback(
int callbackId) = 0;
588 virtual bool start(
void* jvm) = 0;
597 virtual int registerPosCallback(std::function<
void (std::shared_ptr<
const std::vector<xv::Pose>>)> callback) = 0;
598 virtual bool unregisterPosCallback(
int callbackId) = 0;
640 virtual bool enable() = 0;
641 virtual bool disable() = 0;
645 virtual int send(
const std::uint8_t *data,
int len) = 0;
650 virtual bool play(
const std::string &path) = 0;
654 virtual bool play(
const std::uint8_t *data,
int len) = 0;
663 virtual bool unregisterPlayEndCallback(
int callbackId ) = 0;
1027 virtual std::map<std::string, std::string>
info() = 0;
1032 virtual std::shared_ptr<Slam>
slam() = 0;
1037 virtual std::shared_ptr<ImuSensor>
imuSensor() = 0;
1042 virtual std::shared_ptr<EventStream>
eventStream() = 0;
1057 virtual std::shared_ptr<ColorCamera>
colorCamera() = 0;
1062 virtual std::shared_ptr<TofCamera>
tofCamera() = 0;
1067 virtual std::shared_ptr<SgbmCamera>
sgbmCamera() = 0;
1077 virtual std::shared_ptr<EyetrackingCamera>
eyetracking() = 0;
1082 virtual std::shared_ptr<GazeStream>
gaze() = 0;
1087 virtual std::shared_ptr<GestureStream>
gesture() = 0;
1089 virtual std::shared_ptr<GestureStreamEX> gestureEX() = 0;
1094 virtual std::shared_ptr<MicStream>
mic() = 0;
1099 virtual std::shared_ptr<Speaker>
speaker() = 0;
1104 virtual std::shared_ptr<Display>
display() = 0;
1114 virtual std::shared_ptr<DeviceStatusStream>
deviceStatus() = 0;
1119 virtual bool sleep(
int level = 0) = 0;
1123 virtual bool wakeup() = 0;
1349 virtual bool hidWriteAndRead(
const std::vector<unsigned char> &command, std::vector<unsigned char> &result) = 0;
1353 virtual bool uvcWriteAndRead(
const std::vector<unsigned char> &command, std::vector<unsigned char> &result) = 0;
1357 virtual bool vscWriteAndRead(
const std::vector<unsigned char> &command, std::vector<unsigned char> &result) = 0;
1367 virtual std::string
id()
const = 0;
1392 std::map<std::string,std::shared_ptr<Device>>
getDevices(
double timeOut = 0.,
const std::string& desc =
"",
bool* stopWaiting =
nullptr);
1403 int registerPlugEventCallback(
const std::function<
void (std::shared_ptr<Device> device, PlugEventType type)> &Callback,
const std::string& desc =
"");
1423 std::shared_ptr<Device>
getDevice(
int fd);
1430 std::shared_ptr<Device>
getDevice(
int fd, std::string
const& desc);
virtual std::shared_ptr< ObjectDetector > objectDetector()=0
Get the object detection component.
virtual Manufacturer getManufacturer()=0
Get tof Manufacturer.
virtual bool uvcWriteAndRead(const std::vector< unsigned char > &command, std::vector< unsigned char > &result)=0
Write UVC control command and read result.
virtual int registerPosCallback(std::function< void(std::shared_ptr< const std::vector< xv::Pose >>)> callback)=0
Callback to get the gesture keypoints pose information based on slam position.
virtual bool hidWriteAndRead(const std::vector< unsigned char > &command, std::vector< unsigned char > &result)=0
Write HID control command and read result. HID command list:
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.
The class to represent the component doing the 6dof tracking with SLAM algorithm on host...
Definition: xv-sdk.h:312
virtual bool getPose(Pose &pose, double prediction=0.)=0
Get the current 6dof pose of the device.
SGBM CONFIG STRUCT.
Definition: xv-types.h:1017
A class to handle device status event stream.
Definition: xv-sdk.h:994
A class to handle MIC. Adjust volumn through source.
Definition: xv-sdk.h:628
virtual int registerColorDepthImageCallback(std::function< void(const DepthColorImage &)>)=0
Gives access to composed image with RBG color on depth images.
void getUTCTIme(DateTime *utc)
Get UTC time.
virtual bool setLibWorkMode(SonyTofLibMode mode)=0
Set lib mode.
A class to handle callbacks of the object detector (CNN)
Definition: xv-sdk.h:439
virtual std::shared_ptr< ColorCamera > colorCamera()=0
Get the color camera component of the device.
virtual bool setBrightness(int brightness)
Set output image brightness. Only valid in auto exposure mode.
A class to handle extern gusture data. Only support on Android now.
Definition: xv-sdk.h:578
Class to get tracking results and raw outputs with a connected device.
Definition: xv-sdk.h:1018
virtual std::shared_ptr< PointCloud > depthImageToPointCloud(SgbmImage const &sgbmImage) const =0
convert DepthImage to pointCloud .
virtual int registerMapCallback(std::function< void(std::shared_ptr< const xv::SlamMap >)> mapCallback)=0
Callback to get the SLAM map updates.
virtual int registerLostCallback(std::function< void()> lostCallback)=0
Register a callback called when SLAM is lost.
The class to give access to data provided by the IMU sensor.
Definition: xv-sdk.h:80
A class to handle callbacks of the thermal camera.
Definition: xv-sdk.h:486
A class to handle callbacks of the gaze data.
Definition: xv-sdk.h:525
virtual std::shared_ptr< TofCamera > tofCamera()=0
Get the ToF component of the device.
A class to handle gusture.
Definition: xv-sdk.h:534
Definition: xv-types.h:1076
A class to handle speaker. Adjust the sound source(PCM) volume to adjust the volume.
Definition: xv-sdk.h:637
virtual const std::vector< Calibration > & calibration()=0
Get calibrations.
virtual bool open()=0
Turn on the display.
void setLogLevel(LogLevel l)
Change the log level.
virtual std::shared_ptr< MicStream > mic()=0
Get the MIC component of the device.
virtual const std::vector< Calibration > & calibration()
Get the camera calibration.
A class to handle callbacks of the SGBM.
Definition: xv-sdk.h:458
virtual bool wakeup()=0
Wake up device.
std::map< std::string, std::shared_ptr< Device > > getDevices(double timeOut=0., const std::string &desc="", bool *stopWaiting=nullptr)
Retrieve all the detected XVisio devices. If no device is found after the timeout is reached...
virtual std::map< std::string, std::string > info()=0
Get informations (Serial Number, version ...) about the device.
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.
RGB QVGA (not supported now)
virtual int registerKeypointsCallback(std::function< void(std::shared_ptr< const std::vector< keypoint >>)> callback)=0
Callback to get the keypoints 21Dof information.
An image provided by a TOF camera.
Definition: xv-types.h:1060
virtual bool stop()=0
stop streaming.
RGB 5m (not supported now)
virtual bool reset()=0
Reset the 6dof tracker (SLAM)
virtual bool setMode(int mode)=0
Set work mode.
A class to handle callbacks of the eyetracking camera.
Definition: xv-sdk.h:497
virtual Resolution getResolution()=0
Get current resolution.
virtual bool getAt(Orientation &pose, double timestamp)=0
Get the orientation of the device at a given timestamp.
virtual bool isPlaying()=0
If async playing.
The class to handle informations about the display (if device can display like a HMD) ...
Definition: xv-sdk.h:176
virtual GestureData getGesture(xv::Pose pose, double timestamp)=0
Manually get the gesture informatio at specific timestamp.
virtual bool setExposure(int aecMode=0, int exposureGain=0, float exposureTimeMs=0.0)
Exposure setting.
virtual std::shared_ptr< GestureStream > gesture()=0
Get the gesture component.
virtual bool close()=0
Turn off the display.
std::shared_ptr< Device > getDevice(int fd, std::string const &desc)
Retrieve #Device by given descriptor. Only for Android.
virtual std::shared_ptr< OrientationStream > orientationStream()=0
Get the 3dof component.
virtual std::shared_ptr< ThermalCamera > thermalCamera()=0
Get the thermal component of the device.
Definition: xv-types.h:1123
virtual int registerCallback(std::function< void(T)>)=0
Register callback to receive data.
bool detachDevice(int fd)
Tell sdk device has disconnected. Only for Android.
virtual bool setSonyTofSetting(SonyTofLibMode mode, Resolution resolution, Framerate frameRate)=0
SonyTof Settings.
Camera interface.
Definition: xv-sdk.h:45
virtual bool setBrightnessLevel(int level)=0
Set brightness level.
virtual std::vector< xv::Pose > GetGesturePose(xv::Pose pose, double timestamp)=0
Manually get the gesture keypoints pose informatio at specific timestamp.
A class to handle callbacks of events.
Definition: xv-sdk.h:127
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.
Class representing a 6dof pose at a timestamp with a linear model for prediction. ...
Definition: xv-types.h:763
virtual bool unregisterCallback(int callbackId)=0
Unregister callback.
A class to handle callbacks of the color image.
Definition: xv-sdk.h:207
Stream interface.
Definition: xv-sdk.h:17
virtual bool setDistanceMode(DistanceMode mode)=0
Set distance mode.
virtual void setFilterFile(std::string filePath)=0
set SonyTof filter file
bool unregisterHotplugCallback(int callbackID)
Unregister a plug callback.
virtual bool vscWriteAndRead(const std::vector< unsigned char > &command, std::vector< unsigned char > &result)=0
Write VSC control command and read result.
virtual std::shared_ptr< Slam > slam()=0
Get the SLAM component.
virtual std::string id() const =0
Return the serial number of the device.
Definition: xv-types.h:1342
virtual std::shared_ptr< Speaker > speaker()=0
Get the speaker component of the device.
virtual std::shared_ptr< PointCloud > depthImageToPointCloud(DepthImage const &) const =0
Convert a depth image to point cloud for sony TOF.
virtual void setConfigPath(std::string config)=0
Set MNN configuration file path.
virtual Mode mode() const =0
Get #Mode.
virtual std::shared_ptr< FisheyeCameras > fisheyeCameras()=0
Get the stereo cameras component of the device.
The Version struct.
Definition: xv-types.h:93
virtual bool getPoseAt(Pose &pose, double timestamp)=0
Get the 6dof pose of the device at a given timestamp.
virtual int registerVisualPoseCallback(std::function< void(const Pose &)> lostCallback)=0
Register a callback called when visual SLAM compute a new unfiltered pose.
virtual bool control(const DeviceSetting &setting)=0
Control device.
virtual bool setLedBrighness(int eye, int led, int brightness)=0
Set eyetracking led brightness (in s)
virtual std::shared_ptr< SgbmCamera > sgbmCamera()=0
Get the SGBM component of the device.
Resolution
Definition: xv-sdk.h:209
virtual bool enableSync(bool isEnable)=0
set enable camera synchronize.
virtual bool start()=0
start streaming.
SGBM data.
Definition: xv-types.h:1138
std::string getDefaultDescription()
Retrieve default device description.
virtual std::shared_ptr< Display > display()=0
Get the display component.
int registerPlugEventCallback(const std::function< void(std::shared_ptr< Device > device, PlugEventType type)> &Callback, const std::string &desc="")
Register the callback for hotplug.
virtual bool sleep(int level=0)=0
Let device sleep.
A class to handle callbacks of the ToF camera.
Definition: xv-sdk.h:226
virtual std::shared_ptr< DeviceStatusStream > deviceStatus()=0
Get the device status component.
virtual bool setStreamMode(StreamMode mode)=0
Set which stream will be reported. Not work with sony TOF.
virtual bool play(const std::string &path)=0
Async play sound file in new thread.
virtual bool setExposure(int leftGain, float leftTimeMs, int rightGain, float rightTimeMs)=0
Set eyetracking exposure.
virtual int registerPlayEndCallback(std::function< void()>)=0
Rigster a callback for async play end.
virtual bool start() override=0
Start slam of current mode.
Gesture data.
Definition: xv-types.h:1201
The class to handle callbacks of the multi cameras for the visual SLAM.
Definition: xv-sdk.h:168
The class to give access to 3dof data which converted from raw IMU data.
Definition: xv-sdk.h:136
virtual int registerSlamKeypointsCallback(std::function< void(std::shared_ptr< const std::vector< keypoint >>)> callback)=0
Callback to get the keypoints 21Dof information based on slam position.
Orientation only (3dof) of the pose.
Definition: xv-types.h:819
virtual std::shared_ptr< ImuSensor > imuSensor()=0
Get the IMU sensor of the device.
virtual std::shared_ptr< EventStream > eventStream()=0
Get the event component.
virtual Mode mode() const =0
Must be called befor start.
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.
Device setting.
Definition: xv-types.h:68
virtual std::shared_ptr< GazeStream > gaze()=0
Get the gaze data of the device.
virtual int registerDynamicGestureCallback(std::function< void(GestureData const &)>)=0
Callback to get the dynamic gesture information.
Version version()
Get xvsdk version.
virtual int send(const std::uint8_t *data, int len)=0
Send a small time slice of sound data.
virtual std::shared_ptr< EyetrackingCamera > eyetracking()=0
Get the eyetracking component of the device.