24 #ifndef _PLUGINS_REALSENSETHREAD_H_ 25 #define _PLUGINS_REALSENSETHREAD_H_ 27 #include <aspect/blackboard.h> 28 #include <aspect/blocked_timing.h> 29 #include <aspect/clock.h> 30 #include <aspect/configurable.h> 31 #include <aspect/logging.h> 32 #include <aspect/pointcloud.h> 33 #include <core/threading/thread.h> 34 #include <pcl/point_cloud.h> 35 #include <pcl/point_types.h> 37 #ifdef HAVE_REALSENSE1 38 # include <librealsense1/rs.hpp> 40 # include <librealsense/rs.hpp> 46 class SwitchInterface;
65 bool connect_and_start_camera();
66 rs_device *get_camera();
67 void enable_depth_stream();
69 void log_depths(
const uint16_t *image);
70 void fill_pointcloud();
88 typedef pcl::PointXYZ PointType;
91 typedef Cloud::Ptr CloudPtr;
92 typedef Cloud::ConstPtr CloudConstPtr;
95 CloudPtr realsense_depth_;
97 rs_error * rs_error_ = 0;
98 rs_context * rs_context_;
99 rs_device * rs_device_;
100 rs_intrinsics z_intrinsic_;
101 rs_stream rs_stream_type_;
104 std::string frame_id_;
106 bool camera_started_ =
false;
Thread aspect to access to BlackBoard.
Thread aspect that allows to obtain the current time from the clock.
Fawkes library namespace.
Thread aspect to provide and access point clouds.
virtual void init()
Initialize the thread.
Thread class encapsulation of pthreads.
Thread aspect to use blocked timing.
SwitchInterface Fawkes BlackBoard Interface.
Driver for the Intel RealSense Camera providing Depth Data as Pointcloud Inspired by IntelĀ® RealSense...
Thread aspect to log output.
virtual void run()
Stub to see name in backtrace for easier debugging.
bool read_switch()
Read the switch interface and start/stop the camera if necessary.
Thread aspect to access configuration data.
RefPtr<> is a reference-counting shared smartpointer.
virtual void finalize()
Finalize the thread.
virtual void loop()
Code to execute in the thread.