Classes | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
astra_ros::Device Class Reference

An agnostic C++ wrapper for the C Astra SDK. This object is wrapped by RosDevice. More...

#include <Device.hpp>

Classes

struct  Configuration
 
struct  Frame
 
struct  ImageStreamMode
 Represents a potential stream configuration. More...
 

Public Types

typedef std::shared_ptr< const DeviceConstPtr
 
typedef std::shared_ptr< DevicePtr
 

Public Member Functions

orbbec_camera_params getCameraParameters () const
 
boost::optional< std::uint32_t > getChipId () const
 
boost::optional< std::vector< ImageStreamMode > > getColorImageStreamModes () const
 
boost::optional< astra_usb_info_t > getColorUsbInfo () const
 
const ConfigurationgetConfiguration () const noexcept
 
ConfigurationgetConfiguration () noexcept
 
boost::optional< std::vector< ImageStreamMode > > getDepthImageStreamModes () const
 
boost::optional< astra_usb_info_t > getDepthUsbInfo () const
 
boost::optional< std::vector< ImageStreamMode > > getIrImageStreamModes () const
 
boost::optional< astra_usb_info_t > getIrUsbInfo () const
 
boost::optional< std::string > getSerialNumber () const
 
void update ()
 

Static Public Member Functions

static Ptr open (const Configuration &configuration)
 

Private Member Functions

 Device (const Configuration &configuration)
 
std::vector< ImageStreamModegetImageStreamModes (astra_streamconnection_t stream) const
 
bool onBodyOrientationChange (astra_bodystream_t body_stream, const astra_body_orientation_t &orientation, const astra_skeleton_optimization_t &prev_orientation)
 
bool onBodySkeletonOptimizationChange (astra_bodystream_t body_stream, const astra_skeleton_optimization_t &optimization, const astra_skeleton_optimization_t &prev_optimization)
 
bool onBodySkeletonProfileChange (astra_bodystream_t body_stream, const astra_skeleton_profile_t &profile, const astra_skeleton_profile_t &prev_profile)
 
bool onDepthD2CModeChange (astra_depthstream_t stream, const int &d2c_mode, const bool &prev_d2c_mode)
 
bool onDepthRegistrationChange (astra_depthstream_t stream, const bool &registration, const bool &prev_registration)
 
bool onMirroredChange (astra_streamconnection_t stream, const bool &mirrored, const bool &prev_mirrored)
 
bool onModeChange (astra_streamconnection_t stream, const ImageStreamMode &mode, const ImageStreamMode &prev_mode)
 
bool onStreamStartedChange (astra_streamconnection_t stream, const bool &started, const bool &started_prev)
 

Private Attributes

boost::optional< astra_bodystream_t > body_stream_
 
boost::optional< astra_colorstream_t > color_stream_
 
boost::optional< astra_colorizedbodystream_t > colorized_body_stream_
 
Configuration configuration_
 
boost::optional< astra_depthstream_t > depth_stream_
 
boost::optional< astra_handstream_t > hand_stream_
 
boost::optional< astra_infraredstream_t > ir_stream_
 
boost::optional< astra_maskedcolorstream_t > masked_color_stream_
 
boost::optional< astra_pointstream_t > point_stream_
 
astra_reader_t reader_
 
astra_streamsetconnection_t stream_set_
 

Detailed Description

An agnostic C++ wrapper for the C Astra SDK. This object is wrapped by RosDevice.

Definition at line 21 of file Device.hpp.

Member Typedef Documentation

◆ ConstPtr

typedef std::shared_ptr<const Device> astra_ros::Device::ConstPtr

Definition at line 25 of file Device.hpp.

◆ Ptr

typedef std::shared_ptr<Device> astra_ros::Device::Ptr

Definition at line 24 of file Device.hpp.

Constructor & Destructor Documentation

◆ Device()

Device::Device ( const Configuration configuration)
private

Definition at line 217 of file Device.cpp.

Member Function Documentation

◆ getCameraParameters()

orbbec_camera_params Device::getCameraParameters ( ) const
Returns
The color and depth camera intrinsics

Definition at line 612 of file Device.cpp.

◆ getChipId()

boost::optional< std::uint32_t > Device::getChipId ( ) const
Returns
The Orbbec device's Chip ID, or boost::none if the Device has no depth stream.

Definition at line 633 of file Device.cpp.

◆ getColorImageStreamModes()

boost::optional< std::vector< Device::ImageStreamMode > > Device::getColorImageStreamModes ( ) const

Definition at line 674 of file Device.cpp.

◆ getColorUsbInfo()

boost::optional< astra_usb_info_t > Device::getColorUsbInfo ( ) const
Returns
The USB information for the depth camera, or boost::none if the Device has no color stream.

Definition at line 644 of file Device.cpp.

◆ getConfiguration() [1/2]

astra_ros::Device::getConfiguration ( ) const
inlinenoexcept
Returns
A constant reference to the configuration.
A mutable reference to the configuration. Can be used to update parameters.

Definition at line 401 of file Device.hpp.

◆ getConfiguration() [2/2]

Configuration& astra_ros::Device::getConfiguration ( )
inlinenoexcept

Definition at line 410 of file Device.hpp.

◆ getDepthImageStreamModes()

boost::optional< std::vector< Device::ImageStreamMode > > Device::getDepthImageStreamModes ( ) const

Get the image modes supported by the depth stream.

Returns
boost::none if the device wasn't configured with a depth stream, a list of image modes otherwise.

Definition at line 680 of file Device.cpp.

◆ getDepthUsbInfo()

boost::optional< astra_usb_info_t > Device::getDepthUsbInfo ( ) const
Returns
The USB information for the depth camera, or boost::none if the Device has no depth stream.

Definition at line 654 of file Device.cpp.

◆ getImageStreamModes()

std::vector< Device::ImageStreamMode > Device::getImageStreamModes ( astra_streamconnection_t  stream) const
private

Definition at line 692 of file Device.cpp.

◆ getIrImageStreamModes()

boost::optional< std::vector< Device::ImageStreamMode > > Device::getIrImageStreamModes ( ) const

Get the image modes supported by the IR stream.

Returns
boost::none if the device isn't configured with a IR stream, a list of image modes otherwise.

Definition at line 686 of file Device.cpp.

◆ getIrUsbInfo()

boost::optional< astra_usb_info_t > Device::getIrUsbInfo ( ) const
Returns
The USB information for the IR camera, or boost::none if the Device has no IR stream.

Definition at line 664 of file Device.cpp.

◆ getSerialNumber()

boost::optional< std::string > Device::getSerialNumber ( ) const
Returns
The Orbbec device's serial number, or boost::none if the Device has no depth stream.

Definition at line 621 of file Device.cpp.

◆ onBodyOrientationChange()

bool Device::onBodyOrientationChange ( astra_bodystream_t  body_stream,
const astra_body_orientation_t &  orientation,
const astra_skeleton_optimization_t &  prev_orientation 
)
private

Definition at line 529 of file Device.cpp.

◆ onBodySkeletonOptimizationChange()

bool Device::onBodySkeletonOptimizationChange ( astra_bodystream_t  body_stream,
const astra_skeleton_optimization_t &  optimization,
const astra_skeleton_optimization_t &  prev_optimization 
)
private

Definition at line 518 of file Device.cpp.

◆ onBodySkeletonProfileChange()

bool Device::onBodySkeletonProfileChange ( astra_bodystream_t  body_stream,
const astra_skeleton_profile_t &  profile,
const astra_skeleton_profile_t &  prev_profile 
)
private

Definition at line 540 of file Device.cpp.

◆ onDepthD2CModeChange()

bool Device::onDepthD2CModeChange ( astra_depthstream_t  stream,
const int &  d2c_mode,
const bool &  prev_d2c_mode 
)
private

Definition at line 506 of file Device.cpp.

◆ onDepthRegistrationChange()

bool Device::onDepthRegistrationChange ( astra_depthstream_t  stream,
const bool &  registration,
const bool &  prev_registration 
)
private

Definition at line 495 of file Device.cpp.

◆ onMirroredChange()

bool Device::onMirroredChange ( astra_streamconnection_t  stream,
const bool &  mirrored,
const bool &  prev_mirrored 
)
private

Definition at line 551 of file Device.cpp.

◆ onModeChange()

bool Device::onModeChange ( astra_streamconnection_t  stream,
const ImageStreamMode mode,
const ImageStreamMode prev_mode 
)
private

Definition at line 563 of file Device.cpp.

◆ onStreamStartedChange()

bool Device::onStreamStartedChange ( astra_streamconnection_t  stream,
const bool &  started,
const bool &  started_prev 
)
private

Definition at line 465 of file Device.cpp.

◆ open()

Device::Ptr Device::open ( const Configuration configuration)
static

Open an Orbbec device

Parameters
configurationThe Configuration to use for this device.

Definition at line 35 of file Device.cpp.

◆ update()

void Device::update ( )

If a new frame is available, process it and call the OnFrame handler as specified in the Configuration.

Definition at line 40 of file Device.cpp.

Member Data Documentation

◆ body_stream_

boost::optional<astra_bodystream_t> astra_ros::Device::body_stream_
private

Definition at line 495 of file Device.hpp.

◆ color_stream_

boost::optional<astra_colorstream_t> astra_ros::Device::color_stream_
private

Definition at line 492 of file Device.hpp.

◆ colorized_body_stream_

boost::optional<astra_colorizedbodystream_t> astra_ros::Device::colorized_body_stream_
private

Definition at line 496 of file Device.hpp.

◆ configuration_

Configuration astra_ros::Device::configuration_
private

Definition at line 487 of file Device.hpp.

◆ depth_stream_

boost::optional<astra_depthstream_t> astra_ros::Device::depth_stream_
private

Definition at line 494 of file Device.hpp.

◆ hand_stream_

boost::optional<astra_handstream_t> astra_ros::Device::hand_stream_
private

Definition at line 497 of file Device.hpp.

◆ ir_stream_

boost::optional<astra_infraredstream_t> astra_ros::Device::ir_stream_
private

Definition at line 493 of file Device.hpp.

◆ masked_color_stream_

boost::optional<astra_maskedcolorstream_t> astra_ros::Device::masked_color_stream_
private

Definition at line 498 of file Device.hpp.

◆ point_stream_

boost::optional<astra_pointstream_t> astra_ros::Device::point_stream_
private

Definition at line 499 of file Device.hpp.

◆ reader_

astra_reader_t astra_ros::Device::reader_
private

Definition at line 490 of file Device.hpp.

◆ stream_set_

astra_streamsetconnection_t astra_ros::Device::stream_set_
private

Definition at line 489 of file Device.hpp.


The documentation for this class was generated from the following files:


astra_ros
Author(s): Braden McDorman
autogenerated on Wed Mar 2 2022 00:53:06