1 #ifndef _ASTRA_ROS_DEVICE_HPP_
2 #define _ASTRA_ROS_DEVICE_HPP_
8 #include <boost/optional.hpp>
10 #include "Parameter.hpp"
12 #include <astra/capi/astra.h>
24 typedef std::shared_ptr<Device> Ptr;
25 typedef std::shared_ptr<const Device> ConstPtr;
36 boost::optional<std::uint32_t>
width;
41 boost::optional<std::uint32_t>
height;
51 boost::optional<std::uint8_t>
fps;
58 std::uint32_t data_length;
64 astra_image_metadata_t metadata;
72 std::uint32_t data_length;
78 astra_image_metadata_t metadata;
88 std::uint32_t data_length;
94 astra_image_metadata_t metadata;
99 astra_floor_info_t *floor_info;
100 astra_bodymask_t body_mask;
101 astra_body_list_t body_list;
106 std::uint32_t data_length;
110 astra_rgba_pixel_t *data;
112 astra_image_metadata_t metadata;
122 std::uint32_t data_length;
126 astra_rgba_pixel_t *data;
128 astra_image_metadata_t metadata;
133 std::uint32_t data_length;
134 astra_vector3f_t *data;
145 boost::optional<Ir>
ir;
180 typedef std::function<void (
const Frame &frame)> OnFrame;
224 boost::optional<Gain> gain;
225 boost::optional<Exposure> exposure;
257 boost::optional<D2CMode> d2c_mode;
276 boost::optional<BodyOrientation> body_orientation;
277 boost::optional<SkeletonOptimization> skeleton_optimization;
278 boost::optional<SkeletonProfile> skeleton_profile;
279 boost::optional<BodyFeatures> default_body_features;
310 boost::optional<std::string> uri;
380 return configuration_;
388 return configuration_;
445 bool onStreamStartedChange(astra_streamconnection_t stream,
const bool &started,
const bool &started_prev);
446 bool onDepthRegistrationChange(astra_depthstream_t stream,
const bool ®istration,
const bool &prev_registration);
447 bool onDepthD2CModeChange(astra_depthstream_t stream,
const int &d2c_mode,
const bool &prev_d2c_mode);
448 bool onBodyOrientationChange(astra_bodystream_t body_stream,
const astra_body_orientation_t &orientation,
const astra_skeleton_optimization_t &prev_orientation);
449 bool onBodySkeletonOptimizationChange(astra_bodystream_t body_stream,
const astra_skeleton_optimization_t &optimization,
const astra_skeleton_optimization_t &prev_optimization);
450 bool onBodySkeletonProfileChange(astra_bodystream_t body_stream,
const astra_skeleton_profile_t &profile,
const astra_skeleton_profile_t &prev_profile);
452 bool onMirroredChange(astra_streamconnection_t stream,
const bool &mirrored,
const bool &prev_mirrored);
454 std::vector<ImageStreamMode> getImageStreamModes(astra_streamconnection_t stream)
const;
458 astra_streamsetconnection_t stream_set_;
459 astra_reader_t reader_;
461 boost::optional<astra_colorstream_t> color_stream_;
462 boost::optional<astra_infraredstream_t> ir_stream_;
463 boost::optional<astra_depthstream_t> depth_stream_;
464 boost::optional<astra_bodystream_t> body_stream_;
465 boost::optional<astra_colorizedbodystream_t> colorized_body_stream_;
466 boost::optional<astra_handstream_t> hand_stream_;
467 boost::optional<astra_maskedcolorstream_t> masked_color_stream_;
468 boost::optional<astra_pointstream_t> point_stream_;