SCENE C++ API  2.0.27
Classes | Public Types | Public Member Functions | List of all members
LSSensor Class Reference

The general interface to connect and communicate with a FARO sensor devices. More...

#include <lssensor.h>

+ Inheritance diagram for LSSensor:

Classes

struct  ButtonInfo
 Button info containing hardware button and event. More...
 

Public Types

enum  Button { LEFT, MIDDLE, RIGHT }
 Hardware buttons. More...
 
enum  ButtonEvent {
  CLICK, DOUBLECLICK, PRESS,
  RELEASE
}
 Events for hardware buttons. More...
 
typedef Eigen::Matrix< Eigen::Vector3uc, Eigen::Dynamic, Eigen::Dynamic > VideoData
 Event that is triggered when new video data is available. More...
 

Public Member Functions

 LSSensor ()
 
 ~LSSensor ()
 
ref_ptr< LSErrorconnect (LSString id, float timeout=30.f)
 Connects to a sensor. More...
 
LSPod< std::vector< std::pair< LSString, LSString > > > detectSensors () const
 Fetches a list of available sensors. More...
 
 SENSOR_SIGNAL (void) &onSensorDisconnected()
 Event that is triggered when a sensor device has been removed. More...
 
 SENSOR_SIGNAL (void) &onScanStartTriggered()
 Event that is triggered when the user intends to start scanning. More...
 
 SENSOR_SIGNAL (void) &onScanStarted()
 Event that is triggered when scanning has started. More...
 
 SENSOR_SIGNAL (void) &onScanTrackingLost()
 Event that is triggered when tracking has been lost. More...
 
 SENSOR_SIGNAL (void) &onScanTrackingFound()
 Event that is triggered when tracking has been found. More...
 
 SENSOR_SIGNAL (void) &onScanStopTriggered()
 Event that is triggered when the user intends to stop scanning. More...
 
 SENSOR_SIGNAL (void) &onScanCompleted()
 Event that is triggered when scanning has stopped and the scan is completed. More...
 
 FRAME_SIGNAL (LSPod< std::vector< LSPointXYZRGB >>) &onPointData()
 Event that is triggered when new point data is available. More...
 
 FRAME_SIGNAL (Eigen::Matrix4d) &onUpdateFramePose()
 Event that is triggered each time a frame's pose is updated. More...
 
 SENSOR_SIGNAL (ButtonInfo) &onButtonEvent()
 Event that is triggered when a hardware button event occurs. More...
 
LSResult::Result start ()
 Starts the scanning process. More...
 
LSResult::Result stop ()
 Stops the scanning process. More...
 

Additional Inherited Members

- Protected Member Functions inherited from LSRefType
void ref () const
 Increments the internal reference counter. More...
 
void unref () const
 Decrements the internal reference counter. More...
 

Detailed Description

The general interface to connect and communicate with a FARO sensor devices.

Version
SCENE API Version 2.0.14.

Member Typedef Documentation

◆ VideoData

typedef Eigen::Matrix<Eigen::Vector3uc, Eigen::Dynamic, Eigen::Dynamic> VideoData

Event that is triggered when new video data is available.

Version
SCENE API Version 2.0.14.

Member Enumeration Documentation

◆ Button

enum Button
strong

Hardware buttons.

Version
SCENE API Version 2.0.17.
Enumerator
LEFT 

Left button.

MIDDLE 

Middle button.

RIGHT 

Right button.

◆ ButtonEvent

enum ButtonEvent
strong

Events for hardware buttons.

Version
SCENE API Version 2.0.17.
Enumerator
CLICK 

Normal click (press and release).

DOUBLECLICK 

Double click (two fast normal clicks).

PRESS 

Button down.

RELEASE 

Button up.

Constructor & Destructor Documentation

◆ LSSensor()

LSSensor ( )
Version
SCENE API Version 2.0.14.

◆ ~LSSensor()

~LSSensor ( )
Version
SCENE API Version 2.0.14.

Member Function Documentation

◆ connect()

ref_ptr<LSError> connect ( LSString  id,
float  timeout = 30.f 
)

Connects to a sensor.

Precondition
An open workspace (see LSSceneContext::openSceneWorkspace() or LSStandaloneContext::setCurrentWorkspace())
Parameters
idThe id of the sensor to connect to.
timeoutThe timeout for the connection attempt.
Returns
An LSResult code.
Version
SCENE API Version 2.0.14.

◆ detectSensors()

LSPod<std::vector<std::pair<LSString, LSString> > > detectSensors ( ) const

Fetches a list of available sensors.

Returns
A list of detected sensors, each pair contains the serial number and the id.
Version
SCENE API Version 2.0.14.

◆ SENSOR_SIGNAL() [1/8]

SENSOR_SIGNAL ( void  ) &

Event that is triggered when a sensor device has been removed.

Version
SCENE API Version 2.0.14.

◆ SENSOR_SIGNAL() [2/8]

SENSOR_SIGNAL ( void  ) &

Event that is triggered when the user intends to start scanning.

Version
SCENE API Version 2.0.14.

◆ SENSOR_SIGNAL() [3/8]

SENSOR_SIGNAL ( void  ) &

Event that is triggered when scanning has started.

Version
SCENE API Version 2.0.14.

◆ SENSOR_SIGNAL() [4/8]

SENSOR_SIGNAL ( void  ) &

Event that is triggered when tracking has been lost.

Version
SCENE API Version 2.0.14.

◆ SENSOR_SIGNAL() [5/8]

SENSOR_SIGNAL ( void  ) &

Event that is triggered when tracking has been found.

Version
SCENE API Version 2.0.14.

◆ SENSOR_SIGNAL() [6/8]

SENSOR_SIGNAL ( void  ) &

Event that is triggered when the user intends to stop scanning.

Version
SCENE API Version 2.0.14.

◆ SENSOR_SIGNAL() [7/8]

SENSOR_SIGNAL ( void  ) &

Event that is triggered when scanning has stopped and the scan is completed.

Version
SCENE API Version 2.0.14.

◆ FRAME_SIGNAL() [1/2]

FRAME_SIGNAL ( LSPod< std::vector< LSPointXYZRGB >>  ) &

Event that is triggered when new point data is available.

Version
SCENE API Version 2.0.14.

◆ FRAME_SIGNAL() [2/2]

FRAME_SIGNAL ( Eigen::Matrix4d  ) &

Event that is triggered each time a frame's pose is updated.

Use the pose to convert a frame's points to world coordinates.

Version
SCENE API Version 2.0.14.

◆ SENSOR_SIGNAL() [8/8]

SENSOR_SIGNAL ( ButtonInfo  ) &

Event that is triggered when a hardware button event occurs.

Version
SCENE API Version 2.0.17.

◆ start()

LSResult::Result start ( )

Starts the scanning process.

Version
SCENE API Version 2.0.17.

◆ stop()

LSResult::Result stop ( )

Stops the scanning process.

Version
SCENE API Version 2.0.17.