Changes have been pushed for the repository "fawkes.git". (Fawkes Robotics Software Framework)
Clone: g...@git.fawkesrobotics.org:fawkes.git Gitweb: http://git.fawkesrobotics.org/fawkes.git Trac: http://trac.fawkesrobotics.org The branch, thofmann/realsense1 has been created at 3651ff6f707f13b3f992b1b2bb52caa18f38d621 (commit) http://git.fawkesrobotics.org/fawkes.git/thofmann/realsense1 - *Log* --------------------------------------------------------------- commit 3651ff6f707f13b3f992b1b2bb52caa18f38d621 Author: Till Hofmann <hofm...@kbsg.rwth-aachen.de> AuthorDate: Tue Feb 27 13:42:00 2018 +0100 Commit: Till Hofmann <hofm...@kbsg.rwth-aachen.de> CommitDate: Tue Feb 27 13:42:00 2018 +0100 realsense: update librealsense detection for librealsense1 Starting with Fedora 28, there are two realsense packages: librealsense and librealsense1. The package librealsense contains the incompatible librealsense2, but we need librealsense1. Before Fedora 28, the package librealsense still contained the compatible version librealsense1. Update the librealsense detection to work in both cases. http://git.fawkesrobotics.org/fawkes.git/commit/3651ff6 http://trac.fawkesrobotics.org/changeset/3651ff6 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - *Summary* ----------------------------------------------------------- - *Diffs* ------------------------------------------------------------- - *commit* 3651ff6f707f13b3f992b1b2bb52caa18f38d621 - - - - - - - - - - Author: Till Hofmann <hofm...@kbsg.rwth-aachen.de> Date: Tue Feb 27 13:42:00 2018 +0100 Subject: realsense: update librealsense detection for librealsense1 src/plugins/realsense/Makefile | 34 +++++++++++++++++++++++------ src/plugins/realsense/realsense_thread.h | 4 +++ 2 files changed, 31 insertions(+), 7 deletions(-) _Diff for modified files_: diff --git a/src/plugins/realsense/Makefile b/src/plugins/realsense/Makefile index fdac2ed..0975266 100644 --- a/src/plugins/realsense/Makefile +++ b/src/plugins/realsense/Makefile @@ -2,8 +2,8 @@ # Makefile Build System for Fawkes: realsense Plugin # ------------------- # Created on Mon Jun 13 17:09:44 2016 - # Copyright (C) 2016 by Johannes Rothe +# 2018 by Till Hofmann # #***************************************************************************** # @@ -24,17 +24,35 @@ CFLAGS += $(CFLAGS_TF) $(CFLAGS_PCL) $(CFFLAGS_conveyor_pose) LDFLAGS += $(LDFLAGS_TF) $(LDFLAGS_PCL) LIBS_realsense = m fawkescore fawkesutils fawkesaspects fawkesbaseapp \ - fawkesblackboard fawkesinterface realsense \ + fawkesblackboard fawkesinterface \ fawkespcl_utils SwitchInterface OBJS_realsense = realsense_plugin.o realsense_thread.o -__REALSENSE_LIB_PATHS = /usr/local/lib /usr/lib64 /usr/lib +__REALSENSE1_INCLUDE_PATHS = /usr/include/librealsense1 /usr/local/include/librealsense1 +__REALSENSE_INCLUDE_PATHS = /usr/include/librealsense /usr/local/include/librealsense -ifneq ($(wildcard $(addsuffix /librealsense.so,$(__REALSENSE_LIB_PATHS))),) - PLUGINS_all = $(PLUGINDIR)/realsense.$(SOEXT) +ifneq ($(wildcard $(addsuffix /rs.h,$(__REALSENSE1_INCLUDE_PATHS))),) + # The old librealsense has been moved to librealsense1, librealsense is now + # librealsense2. We need the old version because the newer version does not + # support our camera. + CFLAGS += -DHAVE_REALSENSE1 + LIBS_realsense += realsense1 + PLUGINS_all = $(PLUGINDIR)/realsense.$(SOEXT) +else ifneq ($(wildcard $(addsuffix /rs.h,$(__REALSENSE_INCLUDE_PATHS))),) + # No librealsense1 but there is a librealsense. + # Check its version by checking for RS_API_MAJOR_VERSION in the header. + REALSENSE_VERSION=$(shell awk \ + '/^\#define\s+RS_API_MAJOR_VERSION\s+\S+/{ print $$3; }' \ + $(firstword $(wildcard $(addsuffix /rs.h,$(__REALSENSE_INCLUDE_PATHS))))) + ifeq ($(REALSENSE_VERSION),1) + LIBS_realsense += realsense + PLUGINS_all = $(PLUGINDIR)/realsense.$(SOEXT) + else + WARN_TARGETS += warning_librealsense_version + endif else - WARN_TARGETS += warning_librealsense + WARN_TARGETS += warning_librealsense endif OBJS_all = $(OBJS_realsense) @@ -42,9 +60,11 @@ OBJS_all = $(OBJS_realsense) ifeq ($(OBJSSUBMAKE),1) all: $(WARN_TARGETS) -.PHONY: warning_nolibrealsense +.PHONY: warning_librealsense warning_librealsense_version warning_librealsense: $(SILENT)echo -e "$(INDENT_PRINT)--> $(TRED)Omitting Realsense Plugin$(TNORMAL) (librealsense not found)" +warning_librealsense_version: + $(SILENT)echo -e "$(INDENT_PRINT)--> $(TRED)Omitting Realsense Plugin$(TNORMAL) (incompatible librealsense version $(REALSENSE_VERSION))" endif include $(BUILDSYSDIR)/base.mk diff --git a/src/plugins/realsense/realsense_thread.h b/src/plugins/realsense/realsense_thread.h index f56f036..e1c1d4a 100644 --- a/src/plugins/realsense/realsense_thread.h +++ b/src/plugins/realsense/realsense_thread.h @@ -35,7 +35,11 @@ #include <aspect/pointcloud.h> #include <aspect/clock.h> +#ifdef HAVE_REALSENSE1 +#include <librealsense1/rs.hpp> +#else #include <librealsense/rs.hpp> +#endif #include <string> -- Fawkes Robotics Framework http://www.fawkesrobotics.org _______________________________________________ fawkes-commits mailing list fawkes-commits@lists.kbsg.rwth-aachen.de https://lists.kbsg.rwth-aachen.de/listinfo/fawkes-commits