Changes have been pushed for the repository "fawkesrobotics/fawkes".

Clone:  https://github.com/fawkesrobotics/fawkes.git
Gitweb: https://github.com/fawkesrobotics/fawkes

The branch, neltester/realsense2_save_image has been updated
        to  585aaec5872cfb622a05bdb2d4333e056332cfcb (commit)
       via  8d025bf64114d9c4ec992dae45caac47300cdaa5 (commit)
       via  871f463fc0abe8ea27cc1b700bea8c155c4bf120 (commit)
      from  f4c673996af5d5a8c86c93249b015e02c52cefea (commit)

https://github.com/fawkesrobotics/fawkes/tree/neltester/realsense2_save_image

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- *Log* ---------------------------------------------------------------
commit 871f463fc0abe8ea27cc1b700bea8c155c4bf120
Author:     Niklas Sebastian Eltester <eltes...@fh-aachen.de>
AuthorDate: Thu Oct 8 16:27:08 2020 +0200
Commit:     Niklas Sebastian Eltester <eltes...@fh-aachen.de>
CommitDate: Thu Oct 8 16:27:08 2020 +0200

    cfg: Improve comment on SaveImage in CamCtrlIf

https://github.com/fawkesrobotics/fawkes/commit/871f463fc

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 8d025bf64114d9c4ec992dae45caac47300cdaa5
Author:     Niklas Sebastian Eltester <eltes...@fh-aachen.de>
AuthorDate: Thu Oct 8 16:27:49 2020 +0200
Commit:     Niklas Sebastian Eltester <eltes...@fh-aachen.de>
CommitDate: Thu Oct 8 16:27:49 2020 +0200

    realsense2: temporarily disable Werror

https://github.com/fawkesrobotics/fawkes/commit/8d025bf64

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 585aaec5872cfb622a05bdb2d4333e056332cfcb
Author:     Niklas Sebastian Eltester <eltes...@fh-aachen.de>
AuthorDate: Thu Oct 8 16:28:44 2020 +0200
Commit:     Niklas Sebastian Eltester <eltes...@fh-aachen.de>
CommitDate: Thu Oct 8 16:32:11 2020 +0200

    realsense2: Create separate pipeline for color_sensor
    
    This creates a second pipeline for the same realsense device

https://github.com/fawkesrobotics/fawkes/commit/585aaec58

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


- *Summary* -----------------------------------------------------------
 src/libs/interfaces/CameraControlInterface.xml |  2 +-
 src/plugins/realsense2/Makefile                |  2 +-
 src/plugins/realsense2/realsense2_thread.cpp   | 21 ++++++++++++++++-----
 src/plugins/realsense2/realsense2_thread.h     |  2 ++
 4 files changed, 20 insertions(+), 7 deletions(-)


- *Diffs* -------------------------------------------------------------

- *commit* 871f463fc0abe8ea27cc1b700bea8c155c4bf120 - - - - - - - - - -
Author:  Niklas Sebastian Eltester <eltes...@fh-aachen.de>
Date:    Thu Oct 8 16:27:08 2020 +0200
Subject: cfg: Improve comment on SaveImage in CamCtrlIf

 src/libs/interfaces/CameraControlInterface.xml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

_Diff for modified files_:
diff --git a/src/libs/interfaces/CameraControlInterface.xml 
b/src/libs/interfaces/CameraControlInterface.xml
index aa00eafc2..31d328092 100644
--- a/src/libs/interfaces/CameraControlInterface.xml
+++ b/src/libs/interfaces/CameraControlInterface.xml
@@ -45,7 +45,7 @@
   </message>
   
   <message name="SaveImage">
-    <comment>Take a frame as an image</comment>
+    <comment>Save a frame as an image.</comment>
     <ref>image_name</ref>
   </message>
 </interface>

- *commit* 8d025bf64114d9c4ec992dae45caac47300cdaa5 - - - - - - - - - -
Author:  Niklas Sebastian Eltester <eltes...@fh-aachen.de>
Date:    Thu Oct 8 16:27:49 2020 +0200
Subject: realsense2: temporarily disable Werror

 src/plugins/realsense2/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

_Diff for modified files_:
diff --git a/src/plugins/realsense2/Makefile b/src/plugins/realsense2/Makefile
index ee3c342b2..6158b11c2 100644
--- a/src/plugins/realsense2/Makefile
+++ b/src/plugins/realsense2/Makefile
@@ -26,7 +26,7 @@ LDFLAGS +=  $(LDFLAGS_TF) $(LDFLAGS_PCL)
 
 LIBS_realsense2 = m fawkescore fawkesutils fawkesaspects fawkesbaseapp \
                       fawkesblackboard fawkesinterface \
-                      fawkespcl_utils SwitchInterface
+                      fawkespcl_utils SwitchInterface CameraControlInterface
 
 OBJS_realsense2 = realsense2_plugin.o realsense2_thread.o 
 

- *commit* 585aaec5872cfb622a05bdb2d4333e056332cfcb - - - - - - - - - -
Author:  Niklas Sebastian Eltester <eltes...@fh-aachen.de>
Date:    Thu Oct 8 16:28:44 2020 +0200
Subject: realsense2: Create separate pipeline for color_sensor

 src/plugins/realsense2/realsense2_thread.cpp | 21 ++++++++++++++++-----
 src/plugins/realsense2/realsense2_thread.h   |  2 ++
 2 files changed, 18 insertions(+), 5 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/realsense2/realsense2_thread.cpp 
b/src/plugins/realsense2/realsense2_thread.cpp
index bd44df252..1c86e5eeb 100644
--- a/src/plugins/realsense2/realsense2_thread.cpp
+++ b/src/plugins/realsense2/realsense2_thread.cpp
@@ -90,8 +90,9 @@ Realsense2Thread::init()
        realsense_depth_->resize(0);
        pcl_manager->add_pointcloud(pcl_id_.c_str(), realsense_depth_refptr_);
 
-       rs_pipe_    = new rs2::pipeline();
-       rs_context_ = new rs2::context();
+       rs_pipe_     = new rs2::pipeline();
+       rs_context_  = new rs2::context();
+       rs_rgb_pipe_ = new rs2::pipeline();
 }
 
 void
@@ -103,9 +104,9 @@ Realsense2Thread::loop()
        }
        // take picture
        if (enable_camera_ && read_camera_control() != "") {
-               if (rs_pipe_->poll_for_frames(&rs_data_)) {
+               if (rs_rgb_pipe_->poll_for_frames(&rs_rgb_data_)) {
                        error_counter_               = 0;
-                       rs2::video_frame color_frame = 
rs_data_.first(RS2_STREAM_COLOR, RS2_FORMAT_YUYV);
+                       rs2::video_frame color_frame = 
rs_rgb_data_.first(RS2_STREAM_COLOR, RS2_FORMAT_YUYV);
                        image_name_ =
                          rgb_path_ + read_camera_control() + 
color_frame.get_profile().stream_name() + ".png";
                        stbi_write_png(image_name_.c_str(),
@@ -177,9 +178,11 @@ Realsense2Thread::finalize()
        stop_camera();
        delete rs_pipe_;
        delete rs_context_;
+       delete rs_rgb_pipe_;
        realsense_depth_refptr_.reset();
        pcl_manager->remove_pointcloud(pcl_id_.c_str());
        blackboard->close(switch_if_);
+       blackboard->close(camera_if_);
 }
 
 /* Create RS context and start the depth stream
@@ -192,6 +195,10 @@ Realsense2Thread::start_camera()
                rs_pipe_->stop();
        } catch (const std::exception &e) {
        }
+       try {
+               rs_rgb_pipe_->stop();
+       } catch (const std::exception &e) {
+       }
 
        try {
                if (!get_camera(rs_device_)) {
@@ -219,7 +226,7 @@ Realsense2Thread::start_camera()
                //rgb config
                rs2::config rgb_config;
                rgb_config.enable_stream(RS2_STREAM_COLOR, 1920, 1080, 
RS2_FORMAT_YUYV, frame_rate_);
-               rs2::pipeline_profile rs_pipeline_profile_rgb_ = 
rs_pipe_->start(rgb_config);
+               rs2::pipeline_profile rs_pipeline_profile_rgb_ = 
rs_rgb_pipe_->start(rgb_config);
                auto                  rgb_stream =
                  
rs_pipeline_profile_rgb_.get_stream(RS2_STREAM_COLOR).as<rs2::video_stream_profile>();
                rgb_intrinsics_              = rgb_stream.get_intrinsics();
@@ -379,6 +386,10 @@ Realsense2Thread::stop_camera()
                rs_pipe_->stop();
        } catch (const std::exception &e) {
        }
+       try {
+               rs_rgb_pipe_->stop();
+       } catch (const std::exception &e) {
+       }
 }
 
 /**
diff --git a/src/plugins/realsense2/realsense2_thread.h 
b/src/plugins/realsense2/realsense2_thread.h
index ee8c3bbaa..aaf271693 100644
--- a/src/plugins/realsense2/realsense2_thread.h
+++ b/src/plugins/realsense2/realsense2_thread.h
@@ -97,6 +97,8 @@ private:
        rs2::context * rs_context_;
        rs2::device    rs_device_;
        rs2::frameset  rs_data_;
+       rs2::pipeline *rs_rgb_pipe_;
+       rs2::frameset  rs_rgb_data_;
        rs2_intrinsics intrinsics_;
        rs2_intrinsics rgb_intrinsics_;
 



_______________________________________________
fawkes-commits mailing list
fawkes-commits@lists.kbsg.rwth-aachen.de
https://lists.kbsg.rwth-aachen.de/listinfo/fawkes-commits

Reply via email to