Fawkes API
Fawkes Development Version
|
24 #ifndef _PLUGINS_REALSENSE2THREAD_H_
25 #define _PLUGINS_REALSENSE2THREAD_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 <librealsense2/rsutil.h>
35 #include <pcl/point_cloud.h>
36 #include <pcl/point_types.h>
38 #include <librealsense2/rs.hpp>
39 #include <librealsense2/rs_advanced_mode.hpp>
44 class SwitchInterface;
64 bool get_camera(rs2::device &dev);
65 void enable_depth_stream();
66 void disable_depth_stream();
84 typedef pcl::PointXYZ PointType;
87 typedef Cloud::Ptr CloudPtr;
88 typedef Cloud::ConstPtr CloudConstPtr;
91 CloudPtr realsense_depth_;
93 rs2::pipeline *rs_pipe_;
94 rs2::context * rs_context_;
95 rs2::device rs_device_;
96 rs2::frameset rs_data_;
97 rs2_intrinsics intrinsics_;
100 std::string frame_id_;
102 std::string switch_if_name_;
105 bool camera_running_ =
false;
106 bool enable_camera_ =
true;
107 bool depth_enabled_ =
false;
108 uint restart_after_num_errors_;
109 uint error_counter_ = 0;
virtual void init()
Initialize the thread.
SwitchInterface Fawkes BlackBoard Interface.
RefPtr<> is a reference-counting shared smartpointer.
virtual void run()
Stub to see name in backtrace for easier debugging.
Thread aspect to use blocked timing.
virtual void loop()
Code to execute in the thread.
Thread aspect to access to BlackBoard.
Thread aspect to provide and access point clouds.
Fawkes library namespace.
Thread aspect to log output.
Thread class encapsulation of pthreads.
virtual void finalize()
Finalize the thread.
Thread aspect to access configuration data.
Driver for the Intel RealSense Camera providing Depth Data as Pointcloud Inspired by realsense fawkes...
Thread aspect that allows to obtain the current time from the clock.
bool read_switch()
Read the switch interface and start/stop the camera if necessary.