From 493bb061760b79e2eed03c0280d23cbad05fce01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9verin=20Lemaignan?= <severin.lemaignan@pal-robotics.com> Date: Thu, 18 Nov 2021 11:20:03 +0100 Subject: [PATCH] [ros mockup] better mock-up nodes, based on classes --- .../src/activityreco/CMakeLists.txt | 1 - spring-mock-ws/src/activityreco/src/main.cpp | 53 ++++-- spring-mock-ws/src/asr/CMakeLists.txt | 1 - spring-mock-ws/src/asr/src/main.cpp | 40 +++-- spring-mock-ws/src/body2dpose/CMakeLists.txt | 4 +- spring-mock-ws/src/body2dpose/package.xml | 3 +- spring-mock-ws/src/body2dpose/src/main.cpp | 54 ++++-- .../src/demographics/CMakeLists.txt | 3 +- spring-mock-ws/src/demographics/package.xml | 2 +- spring-mock-ws/src/demographics/src/main.cpp | 41 +++-- .../src/dialoguemanager/CMakeLists.txt | 1 - .../src/dialoguemanager/src/main.cpp | 58 ++++--- .../src/facedetection/CMakeLists.txt | 4 +- spring-mock-ws/src/facedetection/package.xml | 3 +- spring-mock-ws/src/facedetection/src/main.cpp | 41 +++-- .../src/facerecognition/CMakeLists.txt | 2 +- .../src/facerecognition/package.xml | 1 + .../src/facerecognition/src/main.cpp | 40 +++-- spring-mock-ws/src/fformation/CMakeLists.txt | 3 +- spring-mock-ws/src/fformation/package.xml | 2 +- spring-mock-ws/src/fformation/src/main.cpp | 25 ++- .../src/fisheyestereorgbhead/CMakeLists.txt | 3 +- .../src/fisheyestereorgbhead/package.xml | 2 +- .../src/fisheyestereorgbhead/src/main.cpp | 28 ++- .../src/highlevelplanner/CMakeLists.txt | 1 - .../src/highlevelplanner/src/main.cpp | 89 ++++++---- .../src/interactionmanager/CMakeLists.txt | 1 - .../src/interactionmanager/src/main.cpp | 127 ++++++++------ .../src/maskdetection/CMakeLists.txt | 2 +- spring-mock-ws/src/maskdetection/package.xml | 1 + spring-mock-ws/src/maskdetection/src/main.cpp | 41 +++-- .../src/multipeopletracker/CMakeLists.txt | 4 +- .../src/multipeopletracker/package.xml | 3 +- .../src/multipeopletracker/src/main.cpp | 41 +++-- .../src/nonverbalbehaviours/CMakeLists.txt | 1 - .../src/nonverbalbehaviours/src/main.cpp | 66 +++++--- .../CMakeLists.txt | 2 +- .../package.xml | 1 + .../src/main.cpp | 40 +++-- .../src/occupancymap/CMakeLists.txt | 2 +- spring-mock-ws/src/occupancymap/package.xml | 1 + spring-mock-ws/src/occupancymap/src/main.cpp | 53 ++++-- spring-mock-ws/src/orbslam/CMakeLists.txt | 4 +- spring-mock-ws/src/orbslam/package.xml | 3 +- spring-mock-ws/src/orbslam/src/main.cpp | 39 +++-- .../src/people3dtracker/CMakeLists.txt | 1 - .../src/people3dtracker/src/main.cpp | 61 ++++--- .../src/personmanager/CMakeLists.txt | 1 - spring-mock-ws/src/personmanager/src/main.cpp | 79 +++++---- .../src/rgbdcamera_info/CMakeLists.txt | 3 +- .../src/rgbdcamera_info/package.xml | 2 +- .../src/rgbdcamera_info/src/main.cpp | 28 ++- .../src/robotfunctionallayer/CMakeLists.txt | 1 - .../src/robotfunctionallayer/src/main.cpp | 35 +++- spring-mock-ws/src/robotgui/CMakeLists.txt | 1 - spring-mock-ws/src/robotgui/src/main.cpp | 74 +++++--- .../robotnonverbalbehaviours/CMakeLists.txt | 1 - .../src/robotnonverbalbehaviours/src/main.cpp | 97 +++++++---- .../src/robotutterances/CMakeLists.txt | 1 - .../src/robotutterances/src/main.cpp | 40 +++-- spring-mock-ws/src/rosopenpose/CMakeLists.txt | 1 - spring-mock-ws/src/rosopenpose/src/main.cpp | 40 +++-- .../src/sceneunderstanding/CMakeLists.txt | 1 - .../src/sceneunderstanding/src/main.cpp | 40 +++-- .../src/semanticmapping/CMakeLists.txt | 1 - .../src/semanticmapping/src/main.cpp | 53 ++++-- .../src/soundlocalisation/CMakeLists.txt | 1 - .../src/soundlocalisation/package.xml | 2 +- .../src/soundlocalisation/src/main.cpp | 35 +++- .../src/speakerrecognition/CMakeLists.txt | 1 - .../src/speakerrecognition/src/main.cpp | 40 +++-- .../src/speechdiarization/CMakeLists.txt | 1 - .../src/speechdiarization/src/main.cpp | 40 +++-- .../src/speechsynthesis/CMakeLists.txt | 1 - .../src/speechsynthesis/src/main.cpp | 40 +++-- .../src/springarchitecture/CMakeLists.txt | 52 +++--- .../launch/start_all.launch | 160 ++++++++++-------- .../launch/start_all_but_BIU.launch | 136 ++++++++------- .../launch/start_all_but_CVUT.launch | 140 ++++++++------- .../launch/start_all_but_ERM.launch | 156 +++++++++-------- .../launch/start_all_but_HWU.launch | 136 ++++++++------- .../launch/start_all_but_INRIA.launch | 134 ++++++++------- .../launch/start_all_but_Other.launch | 160 ++++++++++-------- .../launch/start_all_but_PAL.launch | 134 ++++++++------- .../launch/start_all_but_UNITN.launch | 108 ++++++------ .../src/springarchitecture/package.xml | 52 +++--- .../src/userattention/CMakeLists.txt | 1 - spring-mock-ws/src/userattention/src/main.cpp | 97 +++++++---- spring-mock-ws/src/usergaze/CMakeLists.txt | 1 - spring-mock-ws/src/usergaze/src/main.cpp | 53 ++++-- .../src/visualslam3dmap/CMakeLists.txt | 2 +- .../src/visualslam3dmap/package.xml | 1 + .../src/visualslam3dmap/src/main.cpp | 59 +++++-- 93 files changed, 2016 insertions(+), 1225 deletions(-) diff --git a/spring-mock-ws/src/activityreco/CMakeLists.txt b/spring-mock-ws/src/activityreco/CMakeLists.txt index 6ee05ee..a23b15a 100644 --- a/spring-mock-ws/src/activityreco/CMakeLists.txt +++ b/spring-mock-ws/src/activityreco/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/activityreco/src/main.cpp b/spring-mock-ws/src/activityreco/src/main.cpp index 095c233..a6ea591 100644 --- a/spring-mock-ws/src/activityreco/src/main.cpp +++ b/spring-mock-ws/src/activityreco/src/main.cpp @@ -25,28 +25,47 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void tfbodiesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("activityreco: received message: " << msg); -} -void gazedirectionCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("activityreco: received message: " << msg); -} +class ActivityReco { + public: + ActivityReco(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "activityreco"); + // ATTENTION: this topic is not defined in the architecture design + tfbodies_sub_ = nh->subscribe("tfbodies", 1, &ActivityReco::tfbodiesCallback, this); + // ATTENTION: this topic is not defined in the architecture design + gazedirection_sub_ = nh->subscribe("gazedirection", 1, &ActivityReco::gazedirectionCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + output_pub_ = nh->advertise<std_msgs::Empty>("output", 1); + } + + ~ActivityReco() {} - ros::NodeHandle n; + private: + void tfbodiesCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("activityreco: received message: " << msg); + } + void gazedirectionCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("activityreco: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber tfbodies_sub = n.subscribe("tfbodies", 1, tfbodiesCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber gazedirection_sub = n.subscribe("gazedirection", 1, gazedirectionCallback); + ros::Subscriber tfbodies_sub_; + ros::Subscriber gazedirection_sub_; + + ros::Publisher output_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "activityreco"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher output_pub = n.advertise<std_msgs::Empty>("output", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto activityreco = ActivityReco(&private_node_handle_); ROS_INFO("Node activityreco launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/asr/CMakeLists.txt b/spring-mock-ws/src/asr/CMakeLists.txt index e40a4bd..ba82bc6 100644 --- a/spring-mock-ws/src/asr/CMakeLists.txt +++ b/spring-mock-ws/src/asr/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/asr/src/main.cpp b/spring-mock-ws/src/asr/src/main.cpp index c9e9c90..5c6db06 100644 --- a/spring-mock-ws/src/asr/src/main.cpp +++ b/spring-mock-ws/src/asr/src/main.cpp @@ -25,22 +25,40 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void inputCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("asr: received message: " << msg); -} +class Asr { + public: + Asr(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "asr"); + // ATTENTION: this topic is not defined in the architecture design + input_sub_ = nh->subscribe("input", 1, &Asr::inputCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + hvvoiceidspeech_pub_ = nh->advertise<std_msgs::Empty>("hvvoiceidspeech", 1); + } + + ~Asr() {} - ros::NodeHandle n; + private: + void inputCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("asr: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber input_sub = n.subscribe("input", 1, inputCallback); + ros::Subscriber input_sub_; + + ros::Publisher hvvoiceidspeech_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "asr"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher hvvoiceidspeech_pub = n.advertise<std_msgs::Empty>("hvvoiceidspeech", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto asr = Asr(&private_node_handle_); ROS_INFO("Node asr launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/body2dpose/CMakeLists.txt b/spring-mock-ws/src/body2dpose/CMakeLists.txt index 4c34e3d..5efe0a5 100644 --- a/spring-mock-ws/src/body2dpose/CMakeLists.txt +++ b/spring-mock-ws/src/body2dpose/CMakeLists.txt @@ -9,8 +9,8 @@ add_compile_options(-std=c++11) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS roscpp - std_msgs - std_msgs + hri_msgs + sensor_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/body2dpose/package.xml b/spring-mock-ws/src/body2dpose/package.xml index ea09a52..c44a856 100644 --- a/spring-mock-ws/src/body2dpose/package.xml +++ b/spring-mock-ws/src/body2dpose/package.xml @@ -50,7 +50,8 @@ <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> <exec_depend>roscpp</exec_depend> - <depend>std_msgs</depend> + <depend>hri_msgs</depend> + <depend>sensor_msgs</depend> <export> diff --git a/spring-mock-ws/src/body2dpose/src/main.cpp b/spring-mock-ws/src/body2dpose/src/main.cpp index 83230de..91cb381 100644 --- a/spring-mock-ws/src/body2dpose/src/main.cpp +++ b/spring-mock-ws/src/body2dpose/src/main.cpp @@ -23,30 +23,48 @@ #include "ros/ros.h" #include "std_msgs/String.h" -#include "std_msgs/Empty.h" +#include "sensor_msgs/Image.h" +#include "hri_msgs/RegionOfInterestStamped.h" +#include "hri_msgs/Skeleton2D.h" -void imagesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("body2dpose: received message: " << msg); -} -void bodyroisCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("body2dpose: received message: " << msg); -} +class Body2dPose { + public: + Body2dPose(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "body2dpose"); + image_raw_sub_ = nh->subscribe("image_raw", 1, &Body2dPose::image_rawCallback, this); + body_roi_sub_ = nh->subscribe("body_roi", 1, &Body2dPose::body_roiCallback, this); + + body_skeleton2d_pub_ = nh->advertise<hri_msgs::Skeleton2D>("body_skeleton2d", 1); + } + + ~Body2dPose() {} - ros::NodeHandle n; + private: + void image_rawCallback(const sensor_msgs::Image::ConstPtr& msg) + { + ROS_INFO_STREAM("body2dpose: received message: " << msg); + } + void body_roiCallback(const hri_msgs::RegionOfInterestStamped::ConstPtr& msg) + { + ROS_INFO_STREAM("body2dpose: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber images_sub = n.subscribe("images", 1, imagesCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber bodyrois_sub = n.subscribe("bodyrois", 1, bodyroisCallback); + ros::Subscriber image_raw_sub_; + ros::Subscriber body_roi_sub_; + + ros::Publisher body_skeleton2d_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "body2dpose"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher hbbodyidskel2d_pub = n.advertise<std_msgs::Empty>("hbbodyidskel2d", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto body2dpose = Body2dPose(&private_node_handle_); ROS_INFO("Node body2dpose launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/demographics/CMakeLists.txt b/spring-mock-ws/src/demographics/CMakeLists.txt index 0e44c6d..7b1bcdc 100644 --- a/spring-mock-ws/src/demographics/CMakeLists.txt +++ b/spring-mock-ws/src/demographics/CMakeLists.txt @@ -9,8 +9,7 @@ add_compile_options(-std=c++11) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS roscpp - std_msgs - std_msgs + hri_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/demographics/package.xml b/spring-mock-ws/src/demographics/package.xml index 2ed4b32..2f9e3b0 100644 --- a/spring-mock-ws/src/demographics/package.xml +++ b/spring-mock-ws/src/demographics/package.xml @@ -50,7 +50,7 @@ <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> <exec_depend>roscpp</exec_depend> - <depend>std_msgs</depend> + <depend>hri_msgs</depend> <export> diff --git a/spring-mock-ws/src/demographics/src/main.cpp b/spring-mock-ws/src/demographics/src/main.cpp index 3494027..0bce1b8 100644 --- a/spring-mock-ws/src/demographics/src/main.cpp +++ b/spring-mock-ws/src/demographics/src/main.cpp @@ -23,24 +23,41 @@ #include "ros/ros.h" #include "std_msgs/String.h" -#include "std_msgs/Empty.h" +#include "hri_msgs/AgeAndGender.h" +#include "hri_msgs/RegionOfInterestStamped.h" -void facesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("demographics: received message: " << msg); -} +class Demographics { + public: + Demographics(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "demographics"); + face_roi_sub_ = nh->subscribe("face_roi", 1, &Demographics::face_roiCallback, this); + + face_demographics_pub_ = nh->advertise<hri_msgs::AgeAndGender>("face_demographics", 1); + } + + ~Demographics() {} - ros::NodeHandle n; + private: + void face_roiCallback(const hri_msgs::RegionOfInterestStamped::ConstPtr& msg) + { + ROS_INFO_STREAM("demographics: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber faces_sub = n.subscribe("faces", 1, facesCallback); + ros::Subscriber face_roi_sub_; + + ros::Publisher face_demographics_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "demographics"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher hffaceiddemographics_pub = n.advertise<std_msgs::Empty>("hffaceiddemographics", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto demographics = Demographics(&private_node_handle_); ROS_INFO("Node demographics launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/dialoguemanager/CMakeLists.txt b/spring-mock-ws/src/dialoguemanager/CMakeLists.txt index e39948e..404f1ed 100644 --- a/spring-mock-ws/src/dialoguemanager/CMakeLists.txt +++ b/spring-mock-ws/src/dialoguemanager/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/dialoguemanager/src/main.cpp b/spring-mock-ws/src/dialoguemanager/src/main.cpp index 7a9de56..8dcfaae 100644 --- a/spring-mock-ws/src/dialoguemanager/src/main.cpp +++ b/spring-mock-ws/src/dialoguemanager/src/main.cpp @@ -25,30 +25,50 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void interactionmessagesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("dialoguemanager: received message: " << msg); -} -void speechCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("dialoguemanager: received message: " << msg); -} +class DialogueManager { + public: + DialogueManager(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "dialoguemanager"); + // ATTENTION: this topic is not defined in the architecture design + interactionmessages_sub_ = nh->subscribe("interactionmessages", 1, &DialogueManager::interactionmessagesCallback, this); + // ATTENTION: this topic is not defined in the architecture design + speech_sub_ = nh->subscribe("speech", 1, &DialogueManager::speechCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + dialoguestate_pub_ = nh->advertise<std_msgs::Empty>("dialoguestate", 1); + // ATTENTION: this topic is not defined in the architecture design + nextutterance_pub_ = nh->advertise<std_msgs::Empty>("nextutterance", 1); + } + + ~DialogueManager() {} - ros::NodeHandle n; + private: + void interactionmessagesCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("dialoguemanager: received message: " << msg); + } + void speechCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("dialoguemanager: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber interactionmessages_sub = n.subscribe("interactionmessages", 1, interactionmessagesCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber speech_sub = n.subscribe("speech", 1, speechCallback); + ros::Subscriber interactionmessages_sub_; + ros::Subscriber speech_sub_; + + ros::Publisher dialoguestate_pub_; + ros::Publisher nextutterance_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "dialoguemanager"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher dialoguestate_pub = n.advertise<std_msgs::Empty>("dialoguestate", 1); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher nextutterance_pub = n.advertise<std_msgs::Empty>("nextutterance", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto dialoguemanager = DialogueManager(&private_node_handle_); ROS_INFO("Node dialoguemanager launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/facedetection/CMakeLists.txt b/spring-mock-ws/src/facedetection/CMakeLists.txt index 487d64c..5630430 100644 --- a/spring-mock-ws/src/facedetection/CMakeLists.txt +++ b/spring-mock-ws/src/facedetection/CMakeLists.txt @@ -9,8 +9,8 @@ add_compile_options(-std=c++11) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS roscpp - std_msgs - std_msgs + hri_msgs + sensor_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/facedetection/package.xml b/spring-mock-ws/src/facedetection/package.xml index 3ecd5da..099c9cb 100644 --- a/spring-mock-ws/src/facedetection/package.xml +++ b/spring-mock-ws/src/facedetection/package.xml @@ -50,7 +50,8 @@ <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> <exec_depend>roscpp</exec_depend> - <depend>std_msgs</depend> + <depend>hri_msgs</depend> + <depend>sensor_msgs</depend> <export> diff --git a/spring-mock-ws/src/facedetection/src/main.cpp b/spring-mock-ws/src/facedetection/src/main.cpp index b911b8b..60f8bd3 100644 --- a/spring-mock-ws/src/facedetection/src/main.cpp +++ b/spring-mock-ws/src/facedetection/src/main.cpp @@ -23,24 +23,41 @@ #include "ros/ros.h" #include "std_msgs/String.h" -#include "std_msgs/Empty.h" +#include "sensor_msgs/Image.h" +#include "hri_msgs/RegionOfInterestStamped.h" -void imagesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("facedetection: received message: " << msg); -} +class FaceDetection { + public: + FaceDetection(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "facedetection"); + image_raw_sub_ = nh->subscribe("image_raw", 1, &FaceDetection::image_rawCallback, this); + + face_roi_pub_ = nh->advertise<hri_msgs::RegionOfInterestStamped>("face_roi", 1); + } + + ~FaceDetection() {} - ros::NodeHandle n; + private: + void image_rawCallback(const sensor_msgs::Image::ConstPtr& msg) + { + ROS_INFO_STREAM("facedetection: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber images_sub = n.subscribe("images", 1, imagesCallback); + ros::Subscriber image_raw_sub_; + + ros::Publisher face_roi_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "facedetection"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher hffaceidroi_pub = n.advertise<std_msgs::Empty>("hffaceidroi", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto facedetection = FaceDetection(&private_node_handle_); ROS_INFO("Node facedetection launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/facerecognition/CMakeLists.txt b/spring-mock-ws/src/facerecognition/CMakeLists.txt index 72206f7..653c624 100644 --- a/spring-mock-ws/src/facerecognition/CMakeLists.txt +++ b/spring-mock-ws/src/facerecognition/CMakeLists.txt @@ -9,7 +9,7 @@ add_compile_options(-std=c++11) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS roscpp - std_msgs + hri_msgs std_msgs ) diff --git a/spring-mock-ws/src/facerecognition/package.xml b/spring-mock-ws/src/facerecognition/package.xml index 6ac3355..8ed74f7 100644 --- a/spring-mock-ws/src/facerecognition/package.xml +++ b/spring-mock-ws/src/facerecognition/package.xml @@ -50,6 +50,7 @@ <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> <exec_depend>roscpp</exec_depend> + <depend>hri_msgs</depend> <depend>std_msgs</depend> <export> diff --git a/spring-mock-ws/src/facerecognition/src/main.cpp b/spring-mock-ws/src/facerecognition/src/main.cpp index bb1301a..54d0d85 100644 --- a/spring-mock-ws/src/facerecognition/src/main.cpp +++ b/spring-mock-ws/src/facerecognition/src/main.cpp @@ -23,24 +23,42 @@ #include "ros/ros.h" #include "std_msgs/String.h" +#include "hri_msgs/RegionOfInterestStamped.h" #include "std_msgs/Empty.h" -void facesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("facerecognition: received message: " << msg); -} +class FaceRecognition { + public: + FaceRecognition(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "facerecognition"); + face_roi_sub_ = nh->subscribe("face_roi", 1, &FaceRecognition::face_roiCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + personid_pub_ = nh->advertise<std_msgs::Empty>("personid", 1); + } + + ~FaceRecognition() {} - ros::NodeHandle n; + private: + void face_roiCallback(const hri_msgs::RegionOfInterestStamped::ConstPtr& msg) + { + ROS_INFO_STREAM("facerecognition: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber faces_sub = n.subscribe("faces", 1, facesCallback); + ros::Subscriber face_roi_sub_; + + ros::Publisher personid_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "facerecognition"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher personid_pub = n.advertise<std_msgs::Empty>("personid", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto facerecognition = FaceRecognition(&private_node_handle_); ROS_INFO("Node facerecognition launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/fformation/CMakeLists.txt b/spring-mock-ws/src/fformation/CMakeLists.txt index a18b716..3a85f87 100644 --- a/spring-mock-ws/src/fformation/CMakeLists.txt +++ b/spring-mock-ws/src/fformation/CMakeLists.txt @@ -9,9 +9,8 @@ add_compile_options(-std=c++11) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS roscpp - std_msgs - tf hri_msgs + tf ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/fformation/package.xml b/spring-mock-ws/src/fformation/package.xml index bac7ba0..7d87b4c 100644 --- a/spring-mock-ws/src/fformation/package.xml +++ b/spring-mock-ws/src/fformation/package.xml @@ -50,8 +50,8 @@ <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> <exec_depend>roscpp</exec_depend> - <depend>tf</depend> <depend>hri_msgs</depend> + <depend>tf</depend> <export> diff --git a/spring-mock-ws/src/fformation/src/main.cpp b/spring-mock-ws/src/fformation/src/main.cpp index 44c366e..0f61ff9 100644 --- a/spring-mock-ws/src/fformation/src/main.cpp +++ b/spring-mock-ws/src/fformation/src/main.cpp @@ -26,15 +26,32 @@ #include "tf/transform_listener.h" #include "hri_msgs/GroupsStamped.h" +class Fformation { + public: + Fformation(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "fformation"); - ros::NodeHandle n; + groups_pub_ = nh->advertise<hri_msgs::GroupsStamped>("groups", 1); + } + + ~Fformation() {} + + private: + + ros::Publisher groups_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "fformation"); - ros::Publisher groups_pub = n.advertise<hri_msgs::GroupsStamped>("groups", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto fformation = Fformation(&private_node_handle_); ROS_INFO("Node fformation launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/fisheyestereorgbhead/CMakeLists.txt b/spring-mock-ws/src/fisheyestereorgbhead/CMakeLists.txt index 4ee9c6c..7567a0f 100644 --- a/spring-mock-ws/src/fisheyestereorgbhead/CMakeLists.txt +++ b/spring-mock-ws/src/fisheyestereorgbhead/CMakeLists.txt @@ -9,8 +9,7 @@ add_compile_options(-std=c++11) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS roscpp - std_msgs - std_msgs + sensor_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/fisheyestereorgbhead/package.xml b/spring-mock-ws/src/fisheyestereorgbhead/package.xml index f508130..8649710 100644 --- a/spring-mock-ws/src/fisheyestereorgbhead/package.xml +++ b/spring-mock-ws/src/fisheyestereorgbhead/package.xml @@ -50,7 +50,7 @@ <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> <exec_depend>roscpp</exec_depend> - <depend>std_msgs</depend> + <depend>sensor_msgs</depend> <export> diff --git a/spring-mock-ws/src/fisheyestereorgbhead/src/main.cpp b/spring-mock-ws/src/fisheyestereorgbhead/src/main.cpp index a1a1bfa..b87ca44 100644 --- a/spring-mock-ws/src/fisheyestereorgbhead/src/main.cpp +++ b/spring-mock-ws/src/fisheyestereorgbhead/src/main.cpp @@ -23,18 +23,34 @@ #include "ros/ros.h" #include "std_msgs/String.h" -#include "std_msgs/Empty.h" +#include "sensor_msgs/Image.h" +class FisheyeStereoRgbHead { + public: + FisheyeStereoRgbHead(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "fisheyestereorgbhead"); - ros::NodeHandle n; + image_raw_pub_ = nh->advertise<sensor_msgs::Image>("image_raw", 1); + } + + ~FisheyeStereoRgbHead() {} + + private: + + ros::Publisher image_raw_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "fisheyestereorgbhead"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher images_pub = n.advertise<std_msgs::Empty>("images", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto fisheyestereorgbhead = FisheyeStereoRgbHead(&private_node_handle_); ROS_INFO("Node fisheyestereorgbhead launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/highlevelplanner/CMakeLists.txt b/spring-mock-ws/src/highlevelplanner/CMakeLists.txt index 2d8426c..b69b7b3 100644 --- a/spring-mock-ws/src/highlevelplanner/CMakeLists.txt +++ b/spring-mock-ws/src/highlevelplanner/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/highlevelplanner/src/main.cpp b/spring-mock-ws/src/highlevelplanner/src/main.cpp index 6923cd1..bc526aa 100644 --- a/spring-mock-ws/src/highlevelplanner/src/main.cpp +++ b/spring-mock-ws/src/highlevelplanner/src/main.cpp @@ -25,44 +25,67 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void dialoguestateCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("highlevelplanner: received message: " << msg); -} -void tfpersonsCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("highlevelplanner: received message: " << msg); -} -void demographicsCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("highlevelplanner: received message: " << msg); -} -void semanticscenedescriptionCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("highlevelplanner: received message: " << msg); -} +class HighlevelPlanner { + public: + HighlevelPlanner(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "highlevelplanner"); + // ATTENTION: this topic is not defined in the architecture design + demographics_sub_ = nh->subscribe("demographics", 1, &HighlevelPlanner::demographicsCallback, this); + // ATTENTION: this topic is not defined in the architecture design + semanticscenedescription_sub_ = nh->subscribe("semanticscenedescription", 1, &HighlevelPlanner::semanticscenedescriptionCallback, this); + // ATTENTION: this topic is not defined in the architecture design + dialoguestate_sub_ = nh->subscribe("dialoguestate", 1, &HighlevelPlanner::dialoguestateCallback, this); + // ATTENTION: this topic is not defined in the architecture design + tfpersons_sub_ = nh->subscribe("tfpersons", 1, &HighlevelPlanner::tfpersonsCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + interactionstate_pub_ = nh->advertise<std_msgs::Empty>("interactionstate", 1); + // ATTENTION: this topic is not defined in the architecture design + output_pub_ = nh->advertise<std_msgs::Empty>("output", 1); + // ATTENTION: this topic is not defined in the architecture design + navgoals_pub_ = nh->advertise<std_msgs::Empty>("navgoals", 1); + } - ros::NodeHandle n; + ~HighlevelPlanner() {} - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber dialoguestate_sub = n.subscribe("dialoguestate", 1, dialoguestateCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber tfpersons_sub = n.subscribe("tfpersons", 1, tfpersonsCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber demographics_sub = n.subscribe("demographics", 1, demographicsCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber semanticscenedescription_sub = n.subscribe("semanticscenedescription", 1, semanticscenedescriptionCallback); + private: + void demographicsCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("highlevelplanner: received message: " << msg); + } + void semanticscenedescriptionCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("highlevelplanner: received message: " << msg); + } + void dialoguestateCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("highlevelplanner: received message: " << msg); + } + void tfpersonsCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("highlevelplanner: received message: " << msg); + } + + ros::Subscriber demographics_sub_; + ros::Subscriber semanticscenedescription_sub_; + ros::Subscriber dialoguestate_sub_; + ros::Subscriber tfpersons_sub_; + + ros::Publisher interactionstate_pub_; + ros::Publisher output_pub_; + ros::Publisher navgoals_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "highlevelplanner"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher interactionstate_pub = n.advertise<std_msgs::Empty>("interactionstate", 1); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher output_pub = n.advertise<std_msgs::Empty>("output", 1); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher navgoals_pub = n.advertise<std_msgs::Empty>("navgoals", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto highlevelplanner = HighlevelPlanner(&private_node_handle_); ROS_INFO("Node highlevelplanner launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/interactionmanager/CMakeLists.txt b/spring-mock-ws/src/interactionmanager/CMakeLists.txt index 3e12074..3697c50 100644 --- a/spring-mock-ws/src/interactionmanager/CMakeLists.txt +++ b/spring-mock-ws/src/interactionmanager/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/interactionmanager/src/main.cpp b/spring-mock-ws/src/interactionmanager/src/main.cpp index 23d7999..9fb430a 100644 --- a/spring-mock-ws/src/interactionmanager/src/main.cpp +++ b/spring-mock-ws/src/interactionmanager/src/main.cpp @@ -25,60 +25,87 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void inputCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("interactionmanager: received message: " << msg); -} -void hppersonidCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("interactionmanager: received message: " << msg); -} -void tfCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("interactionmanager: received message: " << msg); -} -void semanticscenedescriptionCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("interactionmanager: received message: " << msg); -} -void dialoguestateCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("interactionmanager: received message: " << msg); -} -void robotstateCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("interactionmanager: received message: " << msg); -} +class InteractionManager { + public: + InteractionManager(ros::NodeHandle* nh) { + + // ATTENTION: this topic is not defined in the architecture design + input_sub_ = nh->subscribe("input", 1, &InteractionManager::inputCallback, this); + // ATTENTION: this topic is not defined in the architecture design + hppersonid_sub_ = nh->subscribe("hppersonid", 1, &InteractionManager::hppersonidCallback, this); + // ATTENTION: this topic is not defined in the architecture design + tf_sub_ = nh->subscribe("tf", 1, &InteractionManager::tfCallback, this); + // ATTENTION: this topic is not defined in the architecture design + semanticscenedescription_sub_ = nh->subscribe("semanticscenedescription", 1, &InteractionManager::semanticscenedescriptionCallback, this); + // ATTENTION: this topic is not defined in the architecture design + dialoguestate_sub_ = nh->subscribe("dialoguestate", 1, &InteractionManager::dialoguestateCallback, this); + // ATTENTION: this topic is not defined in the architecture design + robotstate_sub_ = nh->subscribe("robotstate", 1, &InteractionManager::robotstateCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + navgoals_pub_ = nh->advertise<std_msgs::Empty>("navgoals", 1); + // ATTENTION: this topic is not defined in the architecture design + activepersonid_pub_ = nh->advertise<std_msgs::Empty>("activepersonid", 1); + // ATTENTION: this topic is not defined in the architecture design + verbalcommand_pub_ = nh->advertise<std_msgs::Empty>("verbalcommand", 1); + // ATTENTION: this topic is not defined in the architecture design + gestures_pub_ = nh->advertise<std_msgs::Empty>("gestures", 1); + // ATTENTION: this topic is not defined in the architecture design + whotolookat_pub_ = nh->advertise<std_msgs::Empty>("whotolookat", 1); + } + + ~InteractionManager() {} + + private: + void inputCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("interactionmanager: received message: " << msg); + } + void hppersonidCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("interactionmanager: received message: " << msg); + } + void tfCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("interactionmanager: received message: " << msg); + } + void semanticscenedescriptionCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("interactionmanager: received message: " << msg); + } + void dialoguestateCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("interactionmanager: received message: " << msg); + } + void robotstateCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("interactionmanager: received message: " << msg); + } + + ros::Subscriber input_sub_; + ros::Subscriber hppersonid_sub_; + ros::Subscriber tf_sub_; + ros::Subscriber semanticscenedescription_sub_; + ros::Subscriber dialoguestate_sub_; + ros::Subscriber robotstate_sub_; + + ros::Publisher navgoals_pub_; + ros::Publisher activepersonid_pub_; + ros::Publisher verbalcommand_pub_; + ros::Publisher gestures_pub_; + ros::Publisher whotolookat_pub_; + +}; -int main(int argc, char **argv) { +int main(int argc, char** argv) { ros::init(argc, argv, "interactionmanager"); - ros::NodeHandle n; - - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber input_sub = n.subscribe("input", 1, inputCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber hppersonid_sub = n.subscribe("hppersonid", 1, hppersonidCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber tf_sub = n.subscribe("tf", 1, tfCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber semanticscenedescription_sub = n.subscribe("semanticscenedescription", 1, semanticscenedescriptionCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber dialoguestate_sub = n.subscribe("dialoguestate", 1, dialoguestateCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber robotstate_sub = n.subscribe("robotstate", 1, robotstateCallback); - - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher activepersonid_pub = n.advertise<std_msgs::Empty>("activepersonid", 1); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher verbalcommand_pub = n.advertise<std_msgs::Empty>("verbalcommand", 1); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher gestures_pub = n.advertise<std_msgs::Empty>("gestures", 1); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher whotolookat_pub = n.advertise<std_msgs::Empty>("whotolookat", 1); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher navgoals_pub = n.advertise<std_msgs::Empty>("navgoals", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto interactionmanager = InteractionManager(&private_node_handle_); ROS_INFO("Node interactionmanager launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/maskdetection/CMakeLists.txt b/spring-mock-ws/src/maskdetection/CMakeLists.txt index c8a41da..6db3b6d 100644 --- a/spring-mock-ws/src/maskdetection/CMakeLists.txt +++ b/spring-mock-ws/src/maskdetection/CMakeLists.txt @@ -9,7 +9,7 @@ add_compile_options(-std=c++11) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS roscpp - std_msgs + hri_msgs std_msgs ) diff --git a/spring-mock-ws/src/maskdetection/package.xml b/spring-mock-ws/src/maskdetection/package.xml index 69d0dd8..2081072 100644 --- a/spring-mock-ws/src/maskdetection/package.xml +++ b/spring-mock-ws/src/maskdetection/package.xml @@ -50,6 +50,7 @@ <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> <exec_depend>roscpp</exec_depend> + <depend>hri_msgs</depend> <depend>std_msgs</depend> <export> diff --git a/spring-mock-ws/src/maskdetection/src/main.cpp b/spring-mock-ws/src/maskdetection/src/main.cpp index e7d813d..9d22397 100644 --- a/spring-mock-ws/src/maskdetection/src/main.cpp +++ b/spring-mock-ws/src/maskdetection/src/main.cpp @@ -23,24 +23,41 @@ #include "ros/ros.h" #include "std_msgs/String.h" -#include "std_msgs/Empty.h" +#include "hri_msgs/RegionOfInterestStamped.h" +#include "std_msgs/Bool.h" -void facesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("maskdetection: received message: " << msg); -} +class MaskDetection { + public: + MaskDetection(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "maskdetection"); + roi_sub_ = nh->subscribe("roi", 1, &MaskDetection::roiCallback, this); + + face_mask_pub_ = nh->advertise<std_msgs::Bool>("face_mask", 1); + } + + ~MaskDetection() {} - ros::NodeHandle n; + private: + void roiCallback(const hri_msgs::RegionOfInterestStamped::ConstPtr& msg) + { + ROS_INFO_STREAM("maskdetection: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber faces_sub = n.subscribe("faces", 1, facesCallback); + ros::Subscriber roi_sub_; + + ros::Publisher face_mask_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "maskdetection"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher hffaceidmask_pub = n.advertise<std_msgs::Empty>("hffaceidmask", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto maskdetection = MaskDetection(&private_node_handle_); ROS_INFO("Node maskdetection launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/multipeopletracker/CMakeLists.txt b/spring-mock-ws/src/multipeopletracker/CMakeLists.txt index 5c92026..bdee971 100644 --- a/spring-mock-ws/src/multipeopletracker/CMakeLists.txt +++ b/spring-mock-ws/src/multipeopletracker/CMakeLists.txt @@ -9,8 +9,8 @@ add_compile_options(-std=c++11) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS roscpp - std_msgs - std_msgs + hri_msgs + sensor_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/multipeopletracker/package.xml b/spring-mock-ws/src/multipeopletracker/package.xml index 80249ab..4a01e70 100644 --- a/spring-mock-ws/src/multipeopletracker/package.xml +++ b/spring-mock-ws/src/multipeopletracker/package.xml @@ -50,7 +50,8 @@ <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> <exec_depend>roscpp</exec_depend> - <depend>std_msgs</depend> + <depend>hri_msgs</depend> + <depend>sensor_msgs</depend> <export> diff --git a/spring-mock-ws/src/multipeopletracker/src/main.cpp b/spring-mock-ws/src/multipeopletracker/src/main.cpp index 1c20142..4f4f4ab 100644 --- a/spring-mock-ws/src/multipeopletracker/src/main.cpp +++ b/spring-mock-ws/src/multipeopletracker/src/main.cpp @@ -23,24 +23,41 @@ #include "ros/ros.h" #include "std_msgs/String.h" -#include "std_msgs/Empty.h" +#include "sensor_msgs/Image.h" +#include "hri_msgs/RegionOfInterestStamped.h" -void imagesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("multipeopletracker: received message: " << msg); -} +class MultipeopleTracker { + public: + MultipeopleTracker(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "multipeopletracker"); + image_raw_sub_ = nh->subscribe("image_raw", 1, &MultipeopleTracker::image_rawCallback, this); + + body_roi_pub_ = nh->advertise<hri_msgs::RegionOfInterestStamped>("body_roi", 1); + } + + ~MultipeopleTracker() {} - ros::NodeHandle n; + private: + void image_rawCallback(const sensor_msgs::Image::ConstPtr& msg) + { + ROS_INFO_STREAM("multipeopletracker: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber images_sub = n.subscribe("images", 1, imagesCallback); + ros::Subscriber image_raw_sub_; + + ros::Publisher body_roi_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "multipeopletracker"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher hbbodyidroi_pub = n.advertise<std_msgs::Empty>("hbbodyidroi", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto multipeopletracker = MultipeopleTracker(&private_node_handle_); ROS_INFO("Node multipeopletracker launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/nonverbalbehaviours/CMakeLists.txt b/spring-mock-ws/src/nonverbalbehaviours/CMakeLists.txt index d9c90ed..dcb3091 100644 --- a/spring-mock-ws/src/nonverbalbehaviours/CMakeLists.txt +++ b/spring-mock-ws/src/nonverbalbehaviours/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/nonverbalbehaviours/src/main.cpp b/spring-mock-ws/src/nonverbalbehaviours/src/main.cpp index e530e4b..97f6f1c 100644 --- a/spring-mock-ws/src/nonverbalbehaviours/src/main.cpp +++ b/spring-mock-ws/src/nonverbalbehaviours/src/main.cpp @@ -25,34 +25,54 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void facesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("nonverbalbehaviours: received message: " << msg); -} -void facevoicemappingCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("nonverbalbehaviours: received message: " << msg); -} -void voicesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("nonverbalbehaviours: received message: " << msg); -} +class NonverbalBehaviours { + public: + NonverbalBehaviours(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "nonverbalbehaviours"); + // ATTENTION: this topic is not defined in the architecture design + voices_sub_ = nh->subscribe("voices", 1, &NonverbalBehaviours::voicesCallback, this); + // ATTENTION: this topic is not defined in the architecture design + facevoicemapping_sub_ = nh->subscribe("facevoicemapping", 1, &NonverbalBehaviours::facevoicemappingCallback, this); + // ATTENTION: this topic is not defined in the architecture design + faces_sub_ = nh->subscribe("faces", 1, &NonverbalBehaviours::facesCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + hppersonidexpression_pub_ = nh->advertise<std_msgs::Empty>("hppersonidexpression", 1); + } - ros::NodeHandle n; + ~NonverbalBehaviours() {} - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber faces_sub = n.subscribe("faces", 1, facesCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber facevoicemapping_sub = n.subscribe("facevoicemapping", 1, facevoicemappingCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber voices_sub = n.subscribe("voices", 1, voicesCallback); + private: + void voicesCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("nonverbalbehaviours: received message: " << msg); + } + void facevoicemappingCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("nonverbalbehaviours: received message: " << msg); + } + void facesCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("nonverbalbehaviours: received message: " << msg); + } + + ros::Subscriber voices_sub_; + ros::Subscriber facevoicemapping_sub_; + ros::Subscriber faces_sub_; + + ros::Publisher hppersonidexpression_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "nonverbalbehaviours"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher hppersonidexpression_pub = n.advertise<std_msgs::Empty>("hppersonidexpression", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto nonverbalbehaviours = NonverbalBehaviours(&private_node_handle_); ROS_INFO("Node nonverbalbehaviours launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/objectdetectionidentificationlocalisation/CMakeLists.txt b/spring-mock-ws/src/objectdetectionidentificationlocalisation/CMakeLists.txt index 78447bb..2af654d 100644 --- a/spring-mock-ws/src/objectdetectionidentificationlocalisation/CMakeLists.txt +++ b/spring-mock-ws/src/objectdetectionidentificationlocalisation/CMakeLists.txt @@ -9,7 +9,7 @@ add_compile_options(-std=c++11) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS roscpp - std_msgs + sensor_msgs std_msgs ) diff --git a/spring-mock-ws/src/objectdetectionidentificationlocalisation/package.xml b/spring-mock-ws/src/objectdetectionidentificationlocalisation/package.xml index 178faae..3967d70 100644 --- a/spring-mock-ws/src/objectdetectionidentificationlocalisation/package.xml +++ b/spring-mock-ws/src/objectdetectionidentificationlocalisation/package.xml @@ -50,6 +50,7 @@ <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> <exec_depend>roscpp</exec_depend> + <depend>sensor_msgs</depend> <depend>std_msgs</depend> <export> diff --git a/spring-mock-ws/src/objectdetectionidentificationlocalisation/src/main.cpp b/spring-mock-ws/src/objectdetectionidentificationlocalisation/src/main.cpp index 56af823..942e770 100644 --- a/spring-mock-ws/src/objectdetectionidentificationlocalisation/src/main.cpp +++ b/spring-mock-ws/src/objectdetectionidentificationlocalisation/src/main.cpp @@ -24,23 +24,41 @@ #include "ros/ros.h" #include "std_msgs/String.h" #include "std_msgs/Empty.h" +#include "sensor_msgs/Image.h" -void videoCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("objectdetectionidentificationlocalisation: received message: " << msg); -} +class ObjectDetectionidentificationlocalisation { + public: + ObjectDetectionidentificationlocalisation(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "objectdetectionidentificationlocalisation"); + image_raw_sub_ = nh->subscribe("image_raw", 1, &ObjectDetectionidentificationlocalisation::image_rawCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + tbddetected_objectsspring_msgsobjects_pub_ = nh->advertise<std_msgs::Empty>("tbddetected_objectsspring_msgsobjects", 1); + } + + ~ObjectDetectionidentificationlocalisation() {} - ros::NodeHandle n; + private: + void image_rawCallback(const sensor_msgs::Image::ConstPtr& msg) + { + ROS_INFO_STREAM("objectdetectionidentificationlocalisation: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber video_sub = n.subscribe("video", 1, videoCallback); + ros::Subscriber image_raw_sub_; + + ros::Publisher tbddetected_objectsspring_msgsobjects_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "objectdetectionidentificationlocalisation"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher detected_objectslabel6dpos_pub = n.advertise<std_msgs::Empty>("detected_objectslabel6dpos", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto objectdetectionidentificationlocalisation = ObjectDetectionidentificationlocalisation(&private_node_handle_); ROS_INFO("Node objectdetectionidentificationlocalisation launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/occupancymap/CMakeLists.txt b/spring-mock-ws/src/occupancymap/CMakeLists.txt index b06e4ce..c0d9e2f 100644 --- a/spring-mock-ws/src/occupancymap/CMakeLists.txt +++ b/spring-mock-ws/src/occupancymap/CMakeLists.txt @@ -9,7 +9,7 @@ add_compile_options(-std=c++11) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS roscpp - std_msgs + nav_msgs std_msgs ) diff --git a/spring-mock-ws/src/occupancymap/package.xml b/spring-mock-ws/src/occupancymap/package.xml index 98ce876..4cd5099 100644 --- a/spring-mock-ws/src/occupancymap/package.xml +++ b/spring-mock-ws/src/occupancymap/package.xml @@ -50,6 +50,7 @@ <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> <exec_depend>roscpp</exec_depend> + <depend>nav_msgs</depend> <depend>std_msgs</depend> <export> diff --git a/spring-mock-ws/src/occupancymap/src/main.cpp b/spring-mock-ws/src/occupancymap/src/main.cpp index 63dd3ba..28588ae 100644 --- a/spring-mock-ws/src/occupancymap/src/main.cpp +++ b/spring-mock-ws/src/occupancymap/src/main.cpp @@ -24,29 +24,48 @@ #include "ros/ros.h" #include "std_msgs/String.h" #include "std_msgs/Empty.h" +#include "nav_msgs/OccupancyGrid.h" -void tfbodiesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("occupancymap: received message: " << msg); -} -void dense3dmapCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("occupancymap: received message: " << msg); -} +class OccupancyMap { + public: + OccupancyMap(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "occupancymap"); + // ATTENTION: this topic is not defined in the architecture design + tfbodies_sub_ = nh->subscribe("tfbodies", 1, &OccupancyMap::tfbodiesCallback, this); + // ATTENTION: this topic is not defined in the architecture design + dense3dmap_sub_ = nh->subscribe("dense3dmap", 1, &OccupancyMap::dense3dmapCallback, this); + + map_refined_pub_ = nh->advertise<nav_msgs::OccupancyGrid>("map_refined", 1); + } + + ~OccupancyMap() {} - ros::NodeHandle n; + private: + void tfbodiesCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("occupancymap: received message: " << msg); + } + void dense3dmapCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("occupancymap: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber tfbodies_sub = n.subscribe("tfbodies", 1, tfbodiesCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber dense3dmap_sub = n.subscribe("dense3dmap", 1, dense3dmapCallback); + ros::Subscriber tfbodies_sub_; + ros::Subscriber dense3dmap_sub_; + + ros::Publisher map_refined_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "occupancymap"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher nav_msgsoccupancygrid_pub = n.advertise<std_msgs::Empty>("nav_msgsoccupancygrid", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto occupancymap = OccupancyMap(&private_node_handle_); ROS_INFO("Node occupancymap launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/orbslam/CMakeLists.txt b/spring-mock-ws/src/orbslam/CMakeLists.txt index 8337cf3..c2d5f4c 100644 --- a/spring-mock-ws/src/orbslam/CMakeLists.txt +++ b/spring-mock-ws/src/orbslam/CMakeLists.txt @@ -9,8 +9,8 @@ add_compile_options(-std=c++11) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS roscpp - std_msgs - std_msgs + nav_msgs + sensor_msgs tf ) diff --git a/spring-mock-ws/src/orbslam/package.xml b/spring-mock-ws/src/orbslam/package.xml index ab959bc..cb5eb7c 100644 --- a/spring-mock-ws/src/orbslam/package.xml +++ b/spring-mock-ws/src/orbslam/package.xml @@ -50,7 +50,8 @@ <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> <exec_depend>roscpp</exec_depend> - <depend>std_msgs</depend> + <depend>nav_msgs</depend> + <depend>sensor_msgs</depend> <depend>tf</depend> <export> diff --git a/spring-mock-ws/src/orbslam/src/main.cpp b/spring-mock-ws/src/orbslam/src/main.cpp index 9bef556..e4aa740 100644 --- a/spring-mock-ws/src/orbslam/src/main.cpp +++ b/spring-mock-ws/src/orbslam/src/main.cpp @@ -23,23 +23,42 @@ #include "ros/ros.h" #include "std_msgs/String.h" -#include "std_msgs/Empty.h" +#include "nav_msgs/OccupancyGrid.h" #include "tf/transform_broadcaster.h" +#include "sensor_msgs/Image.h" -void inputCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("orbslam: received message: " << msg); -} +class OrbSlam { + public: + OrbSlam(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "orbslam"); + image_raw_sub_ = nh->subscribe("image_raw", 1, &OrbSlam::image_rawCallback, this); + + map_pub_ = nh->advertise<nav_msgs::OccupancyGrid>("map", 1); + } + + ~OrbSlam() {} - ros::NodeHandle n; + private: + void image_rawCallback(const sensor_msgs::Image::ConstPtr& msg) + { + ROS_INFO_STREAM("orbslam: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber input_sub = n.subscribe("input", 1, inputCallback); + ros::Subscriber image_raw_sub_; + + ros::Publisher map_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "orbslam"); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto orbslam = OrbSlam(&private_node_handle_); ROS_INFO("Node orbslam launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/people3dtracker/CMakeLists.txt b/spring-mock-ws/src/people3dtracker/CMakeLists.txt index 48f911b..3dd4815 100644 --- a/spring-mock-ws/src/people3dtracker/CMakeLists.txt +++ b/spring-mock-ws/src/people3dtracker/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs tf ) diff --git a/spring-mock-ws/src/people3dtracker/src/main.cpp b/spring-mock-ws/src/people3dtracker/src/main.cpp index acc2aad..793b9cb 100644 --- a/spring-mock-ws/src/people3dtracker/src/main.cpp +++ b/spring-mock-ws/src/people3dtracker/src/main.cpp @@ -26,32 +26,51 @@ #include "std_msgs/Empty.h" #include "tf/transform_broadcaster.h" -void feetpositionCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("people3dtracker: received message: " << msg); -} -void peopleroisCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("people3dtracker: received message: " << msg); -} -void groundplaneCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("people3dtracker: received message: " << msg); -} +class People3dTracker { + public: + People3dTracker(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "people3dtracker"); + // ATTENTION: this topic is not defined in the architecture design + groundplane_sub_ = nh->subscribe("groundplane", 1, &People3dTracker::groundplaneCallback, this); + // ATTENTION: this topic is not defined in the architecture design + feetposition_sub_ = nh->subscribe("feetposition", 1, &People3dTracker::feetpositionCallback, this); + // ATTENTION: this topic is not defined in the architecture design + peoplerois_sub_ = nh->subscribe("peoplerois", 1, &People3dTracker::peopleroisCallback, this); + + } - ros::NodeHandle n; + ~People3dTracker() {} - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber feetposition_sub = n.subscribe("feetposition", 1, feetpositionCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber peoplerois_sub = n.subscribe("peoplerois", 1, peopleroisCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber groundplane_sub = n.subscribe("groundplane", 1, groundplaneCallback); + private: + void groundplaneCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("people3dtracker: received message: " << msg); + } + void feetpositionCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("people3dtracker: received message: " << msg); + } + void peopleroisCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("people3dtracker: received message: " << msg); + } + + ros::Subscriber groundplane_sub_; + ros::Subscriber feetposition_sub_; + ros::Subscriber peoplerois_sub_; + + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "people3dtracker"); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto people3dtracker = People3dTracker(&private_node_handle_); ROS_INFO("Node people3dtracker launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/personmanager/CMakeLists.txt b/spring-mock-ws/src/personmanager/CMakeLists.txt index 18e9b07..f7d36cf 100644 --- a/spring-mock-ws/src/personmanager/CMakeLists.txt +++ b/spring-mock-ws/src/personmanager/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs tf ) diff --git a/spring-mock-ws/src/personmanager/src/main.cpp b/spring-mock-ws/src/personmanager/src/main.cpp index 97a2530..d221006 100644 --- a/spring-mock-ws/src/personmanager/src/main.cpp +++ b/spring-mock-ws/src/personmanager/src/main.cpp @@ -26,40 +26,61 @@ #include "std_msgs/Empty.h" #include "tf/transform_broadcaster.h" -void tfvoicesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("personmanager: received message: " << msg); -} -void matchersCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("personmanager: received message: " << msg); -} -void demographicsCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("personmanager: received message: " << msg); -} -void tffacesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("personmanager: received message: " << msg); -} +class PersonManager { + public: + PersonManager(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "personmanager"); + // ATTENTION: this topic is not defined in the architecture design + tffaces_sub_ = nh->subscribe("tffaces", 1, &PersonManager::tffacesCallback, this); + // ATTENTION: this topic is not defined in the architecture design + tfvoices_sub_ = nh->subscribe("tfvoices", 1, &PersonManager::tfvoicesCallback, this); + // ATTENTION: this topic is not defined in the architecture design + matchers_sub_ = nh->subscribe("matchers", 1, &PersonManager::matchersCallback, this); + // ATTENTION: this topic is not defined in the architecture design + demographics_sub_ = nh->subscribe("demographics", 1, &PersonManager::demographicsCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + hppersonid_pub_ = nh->advertise<std_msgs::Empty>("hppersonid", 1); + } - ros::NodeHandle n; + ~PersonManager() {} - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber tfvoices_sub = n.subscribe("tfvoices", 1, tfvoicesCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber matchers_sub = n.subscribe("matchers", 1, matchersCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber demographics_sub = n.subscribe("demographics", 1, demographicsCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber tffaces_sub = n.subscribe("tffaces", 1, tffacesCallback); + private: + void tffacesCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("personmanager: received message: " << msg); + } + void tfvoicesCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("personmanager: received message: " << msg); + } + void matchersCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("personmanager: received message: " << msg); + } + void demographicsCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("personmanager: received message: " << msg); + } + + ros::Subscriber tffaces_sub_; + ros::Subscriber tfvoices_sub_; + ros::Subscriber matchers_sub_; + ros::Subscriber demographics_sub_; + + ros::Publisher hppersonid_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "personmanager"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher hppersonid_pub = n.advertise<std_msgs::Empty>("hppersonid", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto personmanager = PersonManager(&private_node_handle_); ROS_INFO("Node personmanager launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/rgbdcamera_info/CMakeLists.txt b/spring-mock-ws/src/rgbdcamera_info/CMakeLists.txt index 0da168d..9356934 100644 --- a/spring-mock-ws/src/rgbdcamera_info/CMakeLists.txt +++ b/spring-mock-ws/src/rgbdcamera_info/CMakeLists.txt @@ -9,8 +9,7 @@ add_compile_options(-std=c++11) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS roscpp - std_msgs - std_msgs + sensor_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/rgbdcamera_info/package.xml b/spring-mock-ws/src/rgbdcamera_info/package.xml index 1944c18..aeed318 100644 --- a/spring-mock-ws/src/rgbdcamera_info/package.xml +++ b/spring-mock-ws/src/rgbdcamera_info/package.xml @@ -50,7 +50,7 @@ <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> <exec_depend>roscpp</exec_depend> - <depend>std_msgs</depend> + <depend>sensor_msgs</depend> <export> diff --git a/spring-mock-ws/src/rgbdcamera_info/src/main.cpp b/spring-mock-ws/src/rgbdcamera_info/src/main.cpp index 210bf02..f07c4be 100644 --- a/spring-mock-ws/src/rgbdcamera_info/src/main.cpp +++ b/spring-mock-ws/src/rgbdcamera_info/src/main.cpp @@ -23,18 +23,34 @@ #include "ros/ros.h" #include "std_msgs/String.h" -#include "std_msgs/Empty.h" +#include "sensor_msgs/Image.h" +class RgbdCamera_info { + public: + RgbdCamera_info(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "rgbdcamera_info"); - ros::NodeHandle n; + image_raw_pub_ = nh->advertise<sensor_msgs::Image>("image_raw", 1); + } + + ~RgbdCamera_info() {} + + private: + + ros::Publisher image_raw_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "rgbdcamera_info"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher images_pub = n.advertise<std_msgs::Empty>("images", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto rgbdcamera_info = RgbdCamera_info(&private_node_handle_); ROS_INFO("Node rgbdcamera_info launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/robotfunctionallayer/CMakeLists.txt b/spring-mock-ws/src/robotfunctionallayer/CMakeLists.txt index d4a4c90..bd81831 100644 --- a/spring-mock-ws/src/robotfunctionallayer/CMakeLists.txt +++ b/spring-mock-ws/src/robotfunctionallayer/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/robotfunctionallayer/src/main.cpp b/spring-mock-ws/src/robotfunctionallayer/src/main.cpp index 7dab02e..707f29f 100644 --- a/spring-mock-ws/src/robotfunctionallayer/src/main.cpp +++ b/spring-mock-ws/src/robotfunctionallayer/src/main.cpp @@ -25,20 +25,37 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void inputCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("robotfunctionallayer: received message: " << msg); -} +class RobotFunctionalLayer { + public: + RobotFunctionalLayer(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "robotfunctionallayer"); + // ATTENTION: this topic is not defined in the architecture design + input_sub_ = nh->subscribe("input", 1, &RobotFunctionalLayer::inputCallback, this); + + } + + ~RobotFunctionalLayer() {} - ros::NodeHandle n; + private: + void inputCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("robotfunctionallayer: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber input_sub = n.subscribe("input", 1, inputCallback); + ros::Subscriber input_sub_; + + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "robotfunctionallayer"); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto robotfunctionallayer = RobotFunctionalLayer(&private_node_handle_); ROS_INFO("Node robotfunctionallayer launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/robotgui/CMakeLists.txt b/spring-mock-ws/src/robotgui/CMakeLists.txt index 2ff207f..e866568 100644 --- a/spring-mock-ws/src/robotgui/CMakeLists.txt +++ b/spring-mock-ws/src/robotgui/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/robotgui/src/main.cpp b/spring-mock-ws/src/robotgui/src/main.cpp index 1c904d3..dacc7b0 100644 --- a/spring-mock-ws/src/robotgui/src/main.cpp +++ b/spring-mock-ws/src/robotgui/src/main.cpp @@ -25,38 +25,58 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void additionalsupportmaterialCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("robotgui: received message: " << msg); -} -void speechoutputCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("robotgui: received message: " << msg); -} -void speechinputCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("robotgui: received message: " << msg); -} -void ttsfeedbackCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("robotgui: received message: " << msg); -} +class RobotGui { + public: + RobotGui(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "robotgui"); + // ATTENTION: this topic is not defined in the architecture design + additionalsupportmaterial_sub_ = nh->subscribe("additionalsupportmaterial", 1, &RobotGui::additionalsupportmaterialCallback, this); + // ATTENTION: this topic is not defined in the architecture design + ttsfeedback_sub_ = nh->subscribe("ttsfeedback", 1, &RobotGui::ttsfeedbackCallback, this); + // ATTENTION: this topic is not defined in the architecture design + speechoutput_sub_ = nh->subscribe("speechoutput", 1, &RobotGui::speechoutputCallback, this); + // ATTENTION: this topic is not defined in the architecture design + speechinput_sub_ = nh->subscribe("speechinput", 1, &RobotGui::speechinputCallback, this); + + } - ros::NodeHandle n; + ~RobotGui() {} - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber additionalsupportmaterial_sub = n.subscribe("additionalsupportmaterial", 1, additionalsupportmaterialCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber speechoutput_sub = n.subscribe("speechoutput", 1, speechoutputCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber speechinput_sub = n.subscribe("speechinput", 1, speechinputCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber ttsfeedback_sub = n.subscribe("ttsfeedback", 1, ttsfeedbackCallback); + private: + void additionalsupportmaterialCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("robotgui: received message: " << msg); + } + void ttsfeedbackCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("robotgui: received message: " << msg); + } + void speechoutputCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("robotgui: received message: " << msg); + } + void speechinputCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("robotgui: received message: " << msg); + } + + ros::Subscriber additionalsupportmaterial_sub_; + ros::Subscriber ttsfeedback_sub_; + ros::Subscriber speechoutput_sub_; + ros::Subscriber speechinput_sub_; + + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "robotgui"); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto robotgui = RobotGui(&private_node_handle_); ROS_INFO("Node robotgui launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/robotnonverbalbehaviours/CMakeLists.txt b/spring-mock-ws/src/robotnonverbalbehaviours/CMakeLists.txt index 47627e2..d422142 100644 --- a/spring-mock-ws/src/robotnonverbalbehaviours/CMakeLists.txt +++ b/spring-mock-ws/src/robotnonverbalbehaviours/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/robotnonverbalbehaviours/src/main.cpp b/spring-mock-ws/src/robotnonverbalbehaviours/src/main.cpp index c03c568..fca33e4 100644 --- a/spring-mock-ws/src/robotnonverbalbehaviours/src/main.cpp +++ b/spring-mock-ws/src/robotnonverbalbehaviours/src/main.cpp @@ -25,48 +25,71 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void followingnavgoalsCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("robotnonverbalbehaviours: received message: " << msg); -} -void hppersonidCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("robotnonverbalbehaviours: received message: " << msg); -} -void statusCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("robotnonverbalbehaviours: received message: " << msg); -} -void occupancymapCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("robotnonverbalbehaviours: received message: " << msg); -} -void lookatCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("robotnonverbalbehaviours: received message: " << msg); -} +class RobotNonverbalBehaviours { + public: + RobotNonverbalBehaviours(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "robotnonverbalbehaviours"); + // ATTENTION: this topic is not defined in the architecture design + followingnavgoals_sub_ = nh->subscribe("followingnavgoals", 1, &RobotNonverbalBehaviours::followingnavgoalsCallback, this); + // ATTENTION: this topic is not defined in the architecture design + hppersonid_sub_ = nh->subscribe("hppersonid", 1, &RobotNonverbalBehaviours::hppersonidCallback, this); + // ATTENTION: this topic is not defined in the architecture design + status_sub_ = nh->subscribe("status", 1, &RobotNonverbalBehaviours::statusCallback, this); + // ATTENTION: this topic is not defined in the architecture design + occupancymap_sub_ = nh->subscribe("occupancymap", 1, &RobotNonverbalBehaviours::occupancymapCallback, this); + // ATTENTION: this topic is not defined in the architecture design + lookat_sub_ = nh->subscribe("lookat", 1, &RobotNonverbalBehaviours::lookatCallback, this); - ros::NodeHandle n; + // ATTENTION: this topic is not defined in the architecture design + lowlevelactions_pub_ = nh->advertise<std_msgs::Empty>("lowlevelactions", 1); + // ATTENTION: this topic is not defined in the architecture design + status_pub_ = nh->advertise<std_msgs::Empty>("status", 1); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber followingnavgoals_sub = n.subscribe("followingnavgoals", 1, followingnavgoalsCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber hppersonid_sub = n.subscribe("hppersonid", 1, hppersonidCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber status_sub = n.subscribe("status", 1, statusCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber occupancymap_sub = n.subscribe("occupancymap", 1, occupancymapCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber lookat_sub = n.subscribe("lookat", 1, lookatCallback); + ~RobotNonverbalBehaviours() {} + + private: + void followingnavgoalsCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("robotnonverbalbehaviours: received message: " << msg); + } + void hppersonidCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("robotnonverbalbehaviours: received message: " << msg); + } + void statusCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("robotnonverbalbehaviours: received message: " << msg); + } + void occupancymapCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("robotnonverbalbehaviours: received message: " << msg); + } + void lookatCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("robotnonverbalbehaviours: received message: " << msg); + } + + ros::Subscriber followingnavgoals_sub_; + ros::Subscriber hppersonid_sub_; + ros::Subscriber status_sub_; + ros::Subscriber occupancymap_sub_; + ros::Subscriber lookat_sub_; + + ros::Publisher lowlevelactions_pub_; + ros::Publisher status_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "robotnonverbalbehaviours"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher lowlevelactions_pub = n.advertise<std_msgs::Empty>("lowlevelactions", 1); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher status_pub = n.advertise<std_msgs::Empty>("status", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto robotnonverbalbehaviours = RobotNonverbalBehaviours(&private_node_handle_); ROS_INFO("Node robotnonverbalbehaviours launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/robotutterances/CMakeLists.txt b/spring-mock-ws/src/robotutterances/CMakeLists.txt index 569368a..f38e64c 100644 --- a/spring-mock-ws/src/robotutterances/CMakeLists.txt +++ b/spring-mock-ws/src/robotutterances/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/robotutterances/src/main.cpp b/spring-mock-ws/src/robotutterances/src/main.cpp index f12ab7b..62607b9 100644 --- a/spring-mock-ws/src/robotutterances/src/main.cpp +++ b/spring-mock-ws/src/robotutterances/src/main.cpp @@ -25,22 +25,40 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void inputCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("robotutterances: received message: " << msg); -} +class RobotUtterances { + public: + RobotUtterances(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "robotutterances"); + // ATTENTION: this topic is not defined in the architecture design + input_sub_ = nh->subscribe("input", 1, &RobotUtterances::inputCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + speech_pub_ = nh->advertise<std_msgs::Empty>("speech", 1); + } + + ~RobotUtterances() {} - ros::NodeHandle n; + private: + void inputCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("robotutterances: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber input_sub = n.subscribe("input", 1, inputCallback); + ros::Subscriber input_sub_; + + ros::Publisher speech_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "robotutterances"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher speech_pub = n.advertise<std_msgs::Empty>("speech", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto robotutterances = RobotUtterances(&private_node_handle_); ROS_INFO("Node robotutterances launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/rosopenpose/CMakeLists.txt b/spring-mock-ws/src/rosopenpose/CMakeLists.txt index 4db52b7..0434fdc 100644 --- a/spring-mock-ws/src/rosopenpose/CMakeLists.txt +++ b/spring-mock-ws/src/rosopenpose/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/rosopenpose/src/main.cpp b/spring-mock-ws/src/rosopenpose/src/main.cpp index f00e22e..ecd2d75 100644 --- a/spring-mock-ws/src/rosopenpose/src/main.cpp +++ b/spring-mock-ws/src/rosopenpose/src/main.cpp @@ -25,22 +25,40 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void inputCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("rosopenpose: received message: " << msg); -} +class RosOpenpose { + public: + RosOpenpose(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "rosopenpose"); + // ATTENTION: this topic is not defined in the architecture design + input_sub_ = nh->subscribe("input", 1, &RosOpenpose::inputCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + output_pub_ = nh->advertise<std_msgs::Empty>("output", 1); + } + + ~RosOpenpose() {} - ros::NodeHandle n; + private: + void inputCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("rosopenpose: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber input_sub = n.subscribe("input", 1, inputCallback); + ros::Subscriber input_sub_; + + ros::Publisher output_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "rosopenpose"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher output_pub = n.advertise<std_msgs::Empty>("output", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto rosopenpose = RosOpenpose(&private_node_handle_); ROS_INFO("Node rosopenpose launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/sceneunderstanding/CMakeLists.txt b/spring-mock-ws/src/sceneunderstanding/CMakeLists.txt index 7e122b7..a422fd6 100644 --- a/spring-mock-ws/src/sceneunderstanding/CMakeLists.txt +++ b/spring-mock-ws/src/sceneunderstanding/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/sceneunderstanding/src/main.cpp b/spring-mock-ws/src/sceneunderstanding/src/main.cpp index 8022816..c5adb0f 100644 --- a/spring-mock-ws/src/sceneunderstanding/src/main.cpp +++ b/spring-mock-ws/src/sceneunderstanding/src/main.cpp @@ -25,22 +25,40 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void scenegraphCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("sceneunderstanding: received message: " << msg); -} +class SceneUnderstanding { + public: + SceneUnderstanding(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "sceneunderstanding"); + // ATTENTION: this topic is not defined in the architecture design + scenegraph_sub_ = nh->subscribe("scenegraph", 1, &SceneUnderstanding::scenegraphCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + semanticdescription_pub_ = nh->advertise<std_msgs::Empty>("semanticdescription", 1); + } + + ~SceneUnderstanding() {} - ros::NodeHandle n; + private: + void scenegraphCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("sceneunderstanding: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber scenegraph_sub = n.subscribe("scenegraph", 1, scenegraphCallback); + ros::Subscriber scenegraph_sub_; + + ros::Publisher semanticdescription_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "sceneunderstanding"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher semanticdescription_pub = n.advertise<std_msgs::Empty>("semanticdescription", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto sceneunderstanding = SceneUnderstanding(&private_node_handle_); ROS_INFO("Node sceneunderstanding launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/semanticmapping/CMakeLists.txt b/spring-mock-ws/src/semanticmapping/CMakeLists.txt index b599de5..44e6bcb 100644 --- a/spring-mock-ws/src/semanticmapping/CMakeLists.txt +++ b/spring-mock-ws/src/semanticmapping/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/semanticmapping/src/main.cpp b/spring-mock-ws/src/semanticmapping/src/main.cpp index 7cfeaf5..a66320a 100644 --- a/spring-mock-ws/src/semanticmapping/src/main.cpp +++ b/spring-mock-ws/src/semanticmapping/src/main.cpp @@ -25,28 +25,47 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void dense3dmapCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("semanticmapping: received message: " << msg); -} -void detected_objectsCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("semanticmapping: received message: " << msg); -} +class SemanticMapping { + public: + SemanticMapping(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "semanticmapping"); + // ATTENTION: this topic is not defined in the architecture design + detected_objects_sub_ = nh->subscribe("detected_objects", 1, &SemanticMapping::detected_objectsCallback, this); + // ATTENTION: this topic is not defined in the architecture design + dense3dmap_sub_ = nh->subscribe("dense3dmap", 1, &SemanticMapping::dense3dmapCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + scenegraph_pub_ = nh->advertise<std_msgs::Empty>("scenegraph", 1); + } + + ~SemanticMapping() {} - ros::NodeHandle n; + private: + void detected_objectsCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("semanticmapping: received message: " << msg); + } + void dense3dmapCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("semanticmapping: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber dense3dmap_sub = n.subscribe("dense3dmap", 1, dense3dmapCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber detected_objects_sub = n.subscribe("detected_objects", 1, detected_objectsCallback); + ros::Subscriber detected_objects_sub_; + ros::Subscriber dense3dmap_sub_; + + ros::Publisher scenegraph_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "semanticmapping"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher scenegraph_pub = n.advertise<std_msgs::Empty>("scenegraph", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto semanticmapping = SemanticMapping(&private_node_handle_); ROS_INFO("Node semanticmapping launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/soundlocalisation/CMakeLists.txt b/spring-mock-ws/src/soundlocalisation/CMakeLists.txt index 6a4e00c..c0d620a 100644 --- a/spring-mock-ws/src/soundlocalisation/CMakeLists.txt +++ b/spring-mock-ws/src/soundlocalisation/CMakeLists.txt @@ -11,7 +11,6 @@ find_package(catkin REQUIRED COMPONENTS roscpp std_msgs tf - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/soundlocalisation/package.xml b/spring-mock-ws/src/soundlocalisation/package.xml index b2f623f..72e71ab 100644 --- a/spring-mock-ws/src/soundlocalisation/package.xml +++ b/spring-mock-ws/src/soundlocalisation/package.xml @@ -50,8 +50,8 @@ <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> <exec_depend>roscpp</exec_depend> - <depend>tf</depend> <depend>std_msgs</depend> + <depend>tf</depend> <export> diff --git a/spring-mock-ws/src/soundlocalisation/src/main.cpp b/spring-mock-ws/src/soundlocalisation/src/main.cpp index eaed13c..f012923 100644 --- a/spring-mock-ws/src/soundlocalisation/src/main.cpp +++ b/spring-mock-ws/src/soundlocalisation/src/main.cpp @@ -26,20 +26,37 @@ #include "tf/transform_broadcaster.h" #include "std_msgs/Empty.h" -void inputCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("soundlocalisation: received message: " << msg); -} +class SoundLocalisation { + public: + SoundLocalisation(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "soundlocalisation"); + // ATTENTION: this topic is not defined in the architecture design + input_sub_ = nh->subscribe("input", 1, &SoundLocalisation::inputCallback, this); + + } + + ~SoundLocalisation() {} - ros::NodeHandle n; + private: + void inputCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("soundlocalisation: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber input_sub = n.subscribe("input", 1, inputCallback); + ros::Subscriber input_sub_; + + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "soundlocalisation"); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto soundlocalisation = SoundLocalisation(&private_node_handle_); ROS_INFO("Node soundlocalisation launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/speakerrecognition/CMakeLists.txt b/spring-mock-ws/src/speakerrecognition/CMakeLists.txt index 9b475a4..7fb92ba 100644 --- a/spring-mock-ws/src/speakerrecognition/CMakeLists.txt +++ b/spring-mock-ws/src/speakerrecognition/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/speakerrecognition/src/main.cpp b/spring-mock-ws/src/speakerrecognition/src/main.cpp index 7d35d11..25c57ce 100644 --- a/spring-mock-ws/src/speakerrecognition/src/main.cpp +++ b/spring-mock-ws/src/speakerrecognition/src/main.cpp @@ -25,22 +25,40 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void inputCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("speakerrecognition: received message: " << msg); -} +class SpeakerRecognition { + public: + SpeakerRecognition(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "speakerrecognition"); + // ATTENTION: this topic is not defined in the architecture design + input_sub_ = nh->subscribe("input", 1, &SpeakerRecognition::inputCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + personid_pub_ = nh->advertise<std_msgs::Empty>("personid", 1); + } + + ~SpeakerRecognition() {} - ros::NodeHandle n; + private: + void inputCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("speakerrecognition: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber input_sub = n.subscribe("input", 1, inputCallback); + ros::Subscriber input_sub_; + + ros::Publisher personid_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "speakerrecognition"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher personid_pub = n.advertise<std_msgs::Empty>("personid", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto speakerrecognition = SpeakerRecognition(&private_node_handle_); ROS_INFO("Node speakerrecognition launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/speechdiarization/CMakeLists.txt b/spring-mock-ws/src/speechdiarization/CMakeLists.txt index 07d9a34..28daa46 100644 --- a/spring-mock-ws/src/speechdiarization/CMakeLists.txt +++ b/spring-mock-ws/src/speechdiarization/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/speechdiarization/src/main.cpp b/spring-mock-ws/src/speechdiarization/src/main.cpp index 8adfabf..8af98f4 100644 --- a/spring-mock-ws/src/speechdiarization/src/main.cpp +++ b/spring-mock-ws/src/speechdiarization/src/main.cpp @@ -25,22 +25,40 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void inputCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("speechdiarization: received message: " << msg); -} +class SpeechDiarization { + public: + SpeechDiarization(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "speechdiarization"); + // ATTENTION: this topic is not defined in the architecture design + input_sub_ = nh->subscribe("input", 1, &SpeechDiarization::inputCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + hvvoiceidaudio_pub_ = nh->advertise<std_msgs::Empty>("hvvoiceidaudio", 1); + } + + ~SpeechDiarization() {} - ros::NodeHandle n; + private: + void inputCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("speechdiarization: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber input_sub = n.subscribe("input", 1, inputCallback); + ros::Subscriber input_sub_; + + ros::Publisher hvvoiceidaudio_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "speechdiarization"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher hvvoiceidaudio_pub = n.advertise<std_msgs::Empty>("hvvoiceidaudio", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto speechdiarization = SpeechDiarization(&private_node_handle_); ROS_INFO("Node speechdiarization launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/speechsynthesis/CMakeLists.txt b/spring-mock-ws/src/speechsynthesis/CMakeLists.txt index 25f5b23..0562fc0 100644 --- a/spring-mock-ws/src/speechsynthesis/CMakeLists.txt +++ b/spring-mock-ws/src/speechsynthesis/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/speechsynthesis/src/main.cpp b/spring-mock-ws/src/speechsynthesis/src/main.cpp index fa558dd..b340dac 100644 --- a/spring-mock-ws/src/speechsynthesis/src/main.cpp +++ b/spring-mock-ws/src/speechsynthesis/src/main.cpp @@ -25,22 +25,40 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void inputCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("speechsynthesis: received message: " << msg); -} +class SpeechSynthesis { + public: + SpeechSynthesis(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "speechsynthesis"); + // ATTENTION: this topic is not defined in the architecture design + input_sub_ = nh->subscribe("input", 1, &SpeechSynthesis::inputCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + ttsfeedback_pub_ = nh->advertise<std_msgs::Empty>("ttsfeedback", 1); + } + + ~SpeechSynthesis() {} - ros::NodeHandle n; + private: + void inputCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("speechsynthesis: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber input_sub = n.subscribe("input", 1, inputCallback); + ros::Subscriber input_sub_; + + ros::Publisher ttsfeedback_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "speechsynthesis"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher ttsfeedback_pub = n.advertise<std_msgs::Empty>("ttsfeedback", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto speechsynthesis = SpeechSynthesis(&private_node_handle_); ROS_INFO("Node speechsynthesis launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/springarchitecture/CMakeLists.txt b/spring-mock-ws/src/springarchitecture/CMakeLists.txt index 9c038d1..83b43e3 100644 --- a/spring-mock-ws/src/springarchitecture/CMakeLists.txt +++ b/spring-mock-ws/src/springarchitecture/CMakeLists.txt @@ -3,41 +3,41 @@ project(springarchitecture) find_package(catkin REQUIRED COMPONENTS - userattention - multipeopletracker - maskdetection - robotnonverbalbehaviours - robotfunctionallayer - robotutterances - activityreco - occupancymap + sceneunderstanding + personmanager speechsynthesis - facedetection - fisheyestereorgbhead - demographics - respeaker_ros - facerecognition - speakerrecognition - usergaze - nonverbalbehaviours visualslam3dmap + occupancymap + soundlocalisation + userattention + rgbdcamera_info fformation - robotgui people3dtracker + asr + fisheyestereorgbhead + usergaze speechdiarization - rosopenpose + demographics + robotnonverbalbehaviours + nonverbalbehaviours interactionmanager - rgbdcamera_info - asr - dialoguemanager - sceneunderstanding - objectdetectionidentificationlocalisation highlevelplanner - orbslam + robotfunctionallayer + maskdetection + speakerrecognition body2dpose - soundlocalisation + robotgui semanticmapping - personmanager + activityreco + facedetection + respeaker_ros + multipeopletracker + robotutterances + objectdetectionidentificationlocalisation + dialoguemanager + orbslam + rosopenpose + facerecognition ) catkin_package() diff --git a/spring-mock-ws/src/springarchitecture/launch/start_all.launch b/spring-mock-ws/src/springarchitecture/launch/start_all.launch index 74e7ff3..ece0ffd 100644 --- a/spring-mock-ws/src/springarchitecture/launch/start_all.launch +++ b/spring-mock-ws/src/springarchitecture/launch/start_all.launch @@ -1,145 +1,165 @@ <launch> - <!-- launching User attention (userattention) --> - <node pkg="userattention" name="userattention" type="node" output="screen"> + <!-- launching Scene understanding (sceneunderstanding) --> + <node pkg="sceneunderstanding" name="sceneunderstanding" type="node" output="screen"> </node> - <!-- launching Multi-people tracker (multipeopletracker) --> - <node pkg="multipeopletracker" name="multipeopletracker" type="node" output="screen"> + <!-- launching Person manager (personmanager) --> + <node pkg="personmanager" name="personmanager" type="node" output="screen"> </node> - <!-- launching Mask detection (maskdetection) --> - <node pkg="maskdetection" name="maskdetection" type="node" output="screen"> + <!-- launching Speech synthesis (speechsynthesis) --> + <node pkg="speechsynthesis" name="speechsynthesis" type="node" output="screen"> </node> - <!-- launching Robot non-verbal behaviours (robotnonverbalbehaviours) --> - <node pkg="robotnonverbalbehaviours" name="robotnonverbalbehaviours" type="node" output="screen"> + <!-- launching Visual SLAM + 3D map (visualslam3dmap) --> + <node pkg="visualslam3dmap" name="visualslam3dmap" type="node" output="screen"> + <remap from="image_head" to="/camera_head/color/image_head"/> + <remap from="image_torso" to="/camera_torso/color/image_torso"/> </node> - <!-- launching Robot functional layer (robotfunctionallayer) --> - <node pkg="robotfunctionallayer" name="robotfunctionallayer" type="node" output="screen"> + <!-- launching Occupancy map (occupancymap) --> + <node pkg="occupancymap" name="occupancymap" type="node" output="screen"> + <remap from="map_refined" to="/map_refined"/> </node> - <!-- launching Robot utterances (robotutterances) --> - <node pkg="robotutterances" name="robotutterances" type="node" output="screen"> + <!-- launching Sound localisation (soundlocalisation) --> + <node pkg="soundlocalisation" name="soundlocalisation" type="node" output="screen"> </node> - <!-- launching Activity reco (activityreco) --> - <node pkg="activityreco" name="activityreco" type="node" output="screen"> + <!-- launching User attention (userattention) --> + <node pkg="userattention" name="userattention" type="node" output="screen"> </node> - <!-- launching Occupancy map (occupancymap) --> - <node pkg="occupancymap" name="occupancymap" type="node" output="screen"> + <!-- launching RGB-D + camera_info (rgbdcamera_info) --> + <node pkg="rgbdcamera_info" name="rgbdcamera_info" type="node" output="screen"> + <remap from="image_raw" to="/camera_torso/color/image_raw"/> </node> - <!-- launching Speech synthesis (speechsynthesis) --> - <node pkg="speechsynthesis" name="speechsynthesis" type="node" output="screen"> + <!-- launching F-formation (fformation) --> + <node pkg="fformation" name="fformation" type="node" output="screen"> + <remap from="groups" to="/h/i/groups"/> </node> - <!-- launching Face detection (facedetection) --> - <node pkg="facedetection" name="facedetection" type="node" output="screen"> + <!-- launching People 3D tracker (people3dtracker) --> + <node pkg="people3dtracker" name="people3dtracker" type="node" output="screen"> </node> - <!-- launching Fisheye stereo + RGB head (fisheyestereorgbhead) --> - <node pkg="fisheyestereorgbhead" name="fisheyestereorgbhead" type="node" output="screen"> + <!-- launching ASR (asr) --> + <node pkg="asr" name="asr" type="node" output="screen"> </node> - <!-- launching Demographics (demographics) --> - <node pkg="demographics" name="demographics" type="node" output="screen"> + <!-- launching Fisheye stereo + RGB head (fisheyestereorgbhead) --> + <node pkg="fisheyestereorgbhead" name="fisheyestereorgbhead" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> </node> - <!-- launching respeaker_ros (respeaker_ros) --> - <node pkg="respeaker_ros" name="respeaker_ros" type="node" output="screen"> - <remap from="raw_audio" to="/audio/raw_audio"/> + <!-- launching User gaze (usergaze) --> + <node pkg="usergaze" name="usergaze" type="node" output="screen"> </node> - <!-- launching Face recognition (facerecognition) --> - <node pkg="facerecognition" name="facerecognition" type="node" output="screen"> + <!-- launching Speech diarization (speechdiarization) --> + <node pkg="speechdiarization" name="speechdiarization" type="node" output="screen"> </node> - <!-- launching Speaker recognition (speakerrecognition) --> - <node pkg="speakerrecognition" name="speakerrecognition" type="node" output="screen"> + <!-- launching Demographics (demographics) --> + <node pkg="demographics" name="demographics" type="node" output="screen"> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> + <remap from="face_demographics" to="/humans/faces/<id>/demographics"/> </node> - <!-- launching User gaze (usergaze) --> - <node pkg="usergaze" name="usergaze" type="node" output="screen"> + <!-- launching Robot non-verbal behaviours (robotnonverbalbehaviours) --> + <node pkg="robotnonverbalbehaviours" name="robotnonverbalbehaviours" type="node" output="screen"> </node> <!-- launching Non-verbal behaviours (nonverbalbehaviours) --> <node pkg="nonverbalbehaviours" name="nonverbalbehaviours" type="node" output="screen"> </node> - <!-- launching Visual SLAM + 3D map (visualslam3dmap) --> - <node pkg="visualslam3dmap" name="visualslam3dmap" type="node" output="screen"> + <!-- launching Interaction manager (interactionmanager) --> + <node pkg="interactionmanager" name="interactionmanager" type="node" output="screen"> </node> - <!-- launching F-formation (fformation) --> - <node pkg="fformation" name="fformation" type="node" output="screen"> - <remap from="groups" to="/h/i/groups"/> + <!-- launching High-level planner (highlevelplanner) --> + <node pkg="highlevelplanner" name="highlevelplanner" type="node" output="screen"> </node> - <!-- launching Robot GUI (robotgui) --> - <node pkg="robotgui" name="robotgui" type="node" output="screen"> + <!-- launching Robot functional layer (robotfunctionallayer) --> + <node pkg="robotfunctionallayer" name="robotfunctionallayer" type="node" output="screen"> </node> - <!-- launching People 3D tracker (people3dtracker) --> - <node pkg="people3dtracker" name="people3dtracker" type="node" output="screen"> + <!-- launching Mask detection (maskdetection) --> + <node pkg="maskdetection" name="maskdetection" type="node" output="screen"> + <remap from="roi" to="/h/faces/*/roi"/> + <remap from="face_mask" to="/humans/faces/<id>/mask"/> </node> - <!-- launching Speech diarization (speechdiarization) --> - <node pkg="speechdiarization" name="speechdiarization" type="node" output="screen"> + <!-- launching Speaker recognition (speakerrecognition) --> + <node pkg="speakerrecognition" name="speakerrecognition" type="node" output="screen"> </node> - <!-- launching ROS openpose (rosopenpose) --> - <node pkg="rosopenpose" name="rosopenpose" type="node" output="screen"> + <!-- launching Body 2D pose (body2dpose) --> + <node pkg="body2dpose" name="body2dpose" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="body_roi" to="/humans/bodies/<id>/roi"/> + <remap from="body_skeleton2d" to="/humans/bodies/<id>/skeleton2d"/> </node> - <!-- launching Interaction manager (interactionmanager) --> - <node pkg="interactionmanager" name="interactionmanager" type="node" output="screen"> + <!-- launching Robot GUI (robotgui) --> + <node pkg="robotgui" name="robotgui" type="node" output="screen"> </node> - <!-- launching RGB-D + camera_info (rgbdcamera_info) --> - <node pkg="rgbdcamera_info" name="rgbdcamera_info" type="node" output="screen"> + <!-- launching Semantic mapping (semanticmapping) --> + <node pkg="semanticmapping" name="semanticmapping" type="node" output="screen"> </node> - <!-- launching ASR (asr) --> - <node pkg="asr" name="asr" type="node" output="screen"> + <!-- launching Activity reco (activityreco) --> + <node pkg="activityreco" name="activityreco" type="node" output="screen"> </node> - <!-- launching Dialogue manager (dialoguemanager) --> - <node pkg="dialoguemanager" name="dialoguemanager" type="node" output="screen"> + <!-- launching Face detection (facedetection) --> + <node pkg="facedetection" name="facedetection" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> </node> - <!-- launching Scene understanding (sceneunderstanding) --> - <node pkg="sceneunderstanding" name="sceneunderstanding" type="node" output="screen"> + <!-- launching respeaker_ros (respeaker_ros) --> + <node pkg="respeaker_ros" name="respeaker_ros" type="node" output="screen"> + <remap from="raw_audio" to="/audio/raw_audio"/> </node> - <!-- launching Object detection/identification/localisation (objectdetectionidentificationlocalisation) --> - <node pkg="objectdetectionidentificationlocalisation" name="objectdetectionidentificationlocalisation" type="node" output="screen"> + <!-- launching Multi-people tracker (multipeopletracker) --> + <node pkg="multipeopletracker" name="multipeopletracker" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="body_roi" to="/humans/bodies/<id>/roi"/> </node> - <!-- launching High-level planner (highlevelplanner) --> - <node pkg="highlevelplanner" name="highlevelplanner" type="node" output="screen"> + <!-- launching Robot utterances (robotutterances) --> + <node pkg="robotutterances" name="robotutterances" type="node" output="screen"> </node> - <!-- launching ORB SLAM (orbslam) --> - <node pkg="orbslam" name="orbslam" type="node" output="screen"> + <!-- launching Object detection/identification/localisation (objectdetectionidentificationlocalisation) --> + <node pkg="objectdetectionidentificationlocalisation" name="objectdetectionidentificationlocalisation" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> </node> - <!-- launching Body 2D pose (body2dpose) --> - <node pkg="body2dpose" name="body2dpose" type="node" output="screen"> + <!-- launching Dialogue manager (dialoguemanager) --> + <node pkg="dialoguemanager" name="dialoguemanager" type="node" output="screen"> </node> - <!-- launching Sound localisation (soundlocalisation) --> - <node pkg="soundlocalisation" name="soundlocalisation" type="node" output="screen"> + <!-- launching ORB SLAM (orbslam) --> + <node pkg="orbslam" name="orbslam" type="node" output="screen"> + <remap from="image_raw" to="/camera_torso/color/image_raw"/> + <remap from="map" to="/map"/> </node> - <!-- launching Semantic mapping (semanticmapping) --> - <node pkg="semanticmapping" name="semanticmapping" type="node" output="screen"> + <!-- launching ROS openpose (rosopenpose) --> + <node pkg="rosopenpose" name="rosopenpose" type="node" output="screen"> </node> - <!-- launching Person manager (personmanager) --> - <node pkg="personmanager" name="personmanager" type="node" output="screen"> + <!-- launching Face recognition (facerecognition) --> + <node pkg="facerecognition" name="facerecognition" type="node" output="screen"> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> </node> diff --git a/spring-mock-ws/src/springarchitecture/launch/start_all_but_BIU.launch b/spring-mock-ws/src/springarchitecture/launch/start_all_but_BIU.launch index 5e45a65..00ec223 100644 --- a/spring-mock-ws/src/springarchitecture/launch/start_all_but_BIU.launch +++ b/spring-mock-ws/src/springarchitecture/launch/start_all_but_BIU.launch @@ -1,130 +1,150 @@ <launch> <!-- this launch file starts all SPRING nodes except for BIU nodes. --> - <!-- launching User attention (userattention) --> - <node pkg="userattention" name="userattention" type="node" output="screen"> - </node> - - <!-- launching Multi-people tracker (multipeopletracker) --> - <node pkg="multipeopletracker" name="multipeopletracker" type="node" output="screen"> + <!-- launching Scene understanding (sceneunderstanding) --> + <node pkg="sceneunderstanding" name="sceneunderstanding" type="node" output="screen"> </node> - <!-- launching Mask detection (maskdetection) --> - <node pkg="maskdetection" name="maskdetection" type="node" output="screen"> + <!-- launching Person manager (personmanager) --> + <node pkg="personmanager" name="personmanager" type="node" output="screen"> </node> - <!-- launching Robot non-verbal behaviours (robotnonverbalbehaviours) --> - <node pkg="robotnonverbalbehaviours" name="robotnonverbalbehaviours" type="node" output="screen"> + <!-- launching Speech synthesis (speechsynthesis) --> + <node pkg="speechsynthesis" name="speechsynthesis" type="node" output="screen"> </node> - <!-- launching Robot functional layer (robotfunctionallayer) --> - <node pkg="robotfunctionallayer" name="robotfunctionallayer" type="node" output="screen"> + <!-- launching Visual SLAM + 3D map (visualslam3dmap) --> + <node pkg="visualslam3dmap" name="visualslam3dmap" type="node" output="screen"> + <remap from="image_head" to="/camera_head/color/image_head"/> + <remap from="image_torso" to="/camera_torso/color/image_torso"/> </node> - <!-- launching Robot utterances (robotutterances) --> - <node pkg="robotutterances" name="robotutterances" type="node" output="screen"> + <!-- launching Occupancy map (occupancymap) --> + <node pkg="occupancymap" name="occupancymap" type="node" output="screen"> + <remap from="map_refined" to="/map_refined"/> </node> - <!-- launching Activity reco (activityreco) --> - <node pkg="activityreco" name="activityreco" type="node" output="screen"> + <!-- launching User attention (userattention) --> + <node pkg="userattention" name="userattention" type="node" output="screen"> </node> - <!-- launching Occupancy map (occupancymap) --> - <node pkg="occupancymap" name="occupancymap" type="node" output="screen"> + <!-- launching RGB-D + camera_info (rgbdcamera_info) --> + <node pkg="rgbdcamera_info" name="rgbdcamera_info" type="node" output="screen"> + <remap from="image_raw" to="/camera_torso/color/image_raw"/> </node> - <!-- launching Speech synthesis (speechsynthesis) --> - <node pkg="speechsynthesis" name="speechsynthesis" type="node" output="screen"> + <!-- launching F-formation (fformation) --> + <node pkg="fformation" name="fformation" type="node" output="screen"> + <remap from="groups" to="/h/i/groups"/> </node> - <!-- launching Face detection (facedetection) --> - <node pkg="facedetection" name="facedetection" type="node" output="screen"> + <!-- launching People 3D tracker (people3dtracker) --> + <node pkg="people3dtracker" name="people3dtracker" type="node" output="screen"> </node> <!-- launching Fisheye stereo + RGB head (fisheyestereorgbhead) --> <node pkg="fisheyestereorgbhead" name="fisheyestereorgbhead" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + </node> + + <!-- launching User gaze (usergaze) --> + <node pkg="usergaze" name="usergaze" type="node" output="screen"> </node> <!-- launching Demographics (demographics) --> <node pkg="demographics" name="demographics" type="node" output="screen"> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> + <remap from="face_demographics" to="/humans/faces/<id>/demographics"/> </node> - <!-- launching respeaker_ros (respeaker_ros) --> - <node pkg="respeaker_ros" name="respeaker_ros" type="node" output="screen"> - <remap from="raw_audio" to="/audio/raw_audio"/> + <!-- launching Robot non-verbal behaviours (robotnonverbalbehaviours) --> + <node pkg="robotnonverbalbehaviours" name="robotnonverbalbehaviours" type="node" output="screen"> </node> - <!-- launching Face recognition (facerecognition) --> - <node pkg="facerecognition" name="facerecognition" type="node" output="screen"> + <!-- launching Non-verbal behaviours (nonverbalbehaviours) --> + <node pkg="nonverbalbehaviours" name="nonverbalbehaviours" type="node" output="screen"> </node> - <!-- launching User gaze (usergaze) --> - <node pkg="usergaze" name="usergaze" type="node" output="screen"> + <!-- launching Interaction manager (interactionmanager) --> + <node pkg="interactionmanager" name="interactionmanager" type="node" output="screen"> </node> - <!-- launching Non-verbal behaviours (nonverbalbehaviours) --> - <node pkg="nonverbalbehaviours" name="nonverbalbehaviours" type="node" output="screen"> + <!-- launching High-level planner (highlevelplanner) --> + <node pkg="highlevelplanner" name="highlevelplanner" type="node" output="screen"> </node> - <!-- launching Visual SLAM + 3D map (visualslam3dmap) --> - <node pkg="visualslam3dmap" name="visualslam3dmap" type="node" output="screen"> + <!-- launching Robot functional layer (robotfunctionallayer) --> + <node pkg="robotfunctionallayer" name="robotfunctionallayer" type="node" output="screen"> </node> - <!-- launching F-formation (fformation) --> - <node pkg="fformation" name="fformation" type="node" output="screen"> - <remap from="groups" to="/h/i/groups"/> + <!-- launching Mask detection (maskdetection) --> + <node pkg="maskdetection" name="maskdetection" type="node" output="screen"> + <remap from="roi" to="/h/faces/*/roi"/> + <remap from="face_mask" to="/humans/faces/<id>/mask"/> + </node> + + <!-- launching Body 2D pose (body2dpose) --> + <node pkg="body2dpose" name="body2dpose" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="body_roi" to="/humans/bodies/<id>/roi"/> + <remap from="body_skeleton2d" to="/humans/bodies/<id>/skeleton2d"/> </node> <!-- launching Robot GUI (robotgui) --> <node pkg="robotgui" name="robotgui" type="node" output="screen"> </node> - <!-- launching People 3D tracker (people3dtracker) --> - <node pkg="people3dtracker" name="people3dtracker" type="node" output="screen"> + <!-- launching Semantic mapping (semanticmapping) --> + <node pkg="semanticmapping" name="semanticmapping" type="node" output="screen"> </node> - <!-- launching ROS openpose (rosopenpose) --> - <node pkg="rosopenpose" name="rosopenpose" type="node" output="screen"> + <!-- launching Activity reco (activityreco) --> + <node pkg="activityreco" name="activityreco" type="node" output="screen"> </node> - <!-- launching Interaction manager (interactionmanager) --> - <node pkg="interactionmanager" name="interactionmanager" type="node" output="screen"> + <!-- launching Face detection (facedetection) --> + <node pkg="facedetection" name="facedetection" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> </node> - <!-- launching RGB-D + camera_info (rgbdcamera_info) --> - <node pkg="rgbdcamera_info" name="rgbdcamera_info" type="node" output="screen"> + <!-- launching respeaker_ros (respeaker_ros) --> + <node pkg="respeaker_ros" name="respeaker_ros" type="node" output="screen"> + <remap from="raw_audio" to="/audio/raw_audio"/> </node> - <!-- launching Dialogue manager (dialoguemanager) --> - <node pkg="dialoguemanager" name="dialoguemanager" type="node" output="screen"> + <!-- launching Multi-people tracker (multipeopletracker) --> + <node pkg="multipeopletracker" name="multipeopletracker" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="body_roi" to="/humans/bodies/<id>/roi"/> </node> - <!-- launching Scene understanding (sceneunderstanding) --> - <node pkg="sceneunderstanding" name="sceneunderstanding" type="node" output="screen"> + <!-- launching Robot utterances (robotutterances) --> + <node pkg="robotutterances" name="robotutterances" type="node" output="screen"> </node> <!-- launching Object detection/identification/localisation (objectdetectionidentificationlocalisation) --> <node pkg="objectdetectionidentificationlocalisation" name="objectdetectionidentificationlocalisation" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> </node> - <!-- launching High-level planner (highlevelplanner) --> - <node pkg="highlevelplanner" name="highlevelplanner" type="node" output="screen"> + <!-- launching Dialogue manager (dialoguemanager) --> + <node pkg="dialoguemanager" name="dialoguemanager" type="node" output="screen"> </node> <!-- launching ORB SLAM (orbslam) --> <node pkg="orbslam" name="orbslam" type="node" output="screen"> + <remap from="image_raw" to="/camera_torso/color/image_raw"/> + <remap from="map" to="/map"/> </node> - <!-- launching Body 2D pose (body2dpose) --> - <node pkg="body2dpose" name="body2dpose" type="node" output="screen"> - </node> - - <!-- launching Semantic mapping (semanticmapping) --> - <node pkg="semanticmapping" name="semanticmapping" type="node" output="screen"> + <!-- launching ROS openpose (rosopenpose) --> + <node pkg="rosopenpose" name="rosopenpose" type="node" output="screen"> </node> - <!-- launching Person manager (personmanager) --> - <node pkg="personmanager" name="personmanager" type="node" output="screen"> + <!-- launching Face recognition (facerecognition) --> + <node pkg="facerecognition" name="facerecognition" type="node" output="screen"> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> </node> diff --git a/spring-mock-ws/src/springarchitecture/launch/start_all_but_CVUT.launch b/spring-mock-ws/src/springarchitecture/launch/start_all_but_CVUT.launch index fed5c42..29cb432 100644 --- a/spring-mock-ws/src/springarchitecture/launch/start_all_but_CVUT.launch +++ b/spring-mock-ws/src/springarchitecture/launch/start_all_but_CVUT.launch @@ -1,130 +1,146 @@ <launch> <!-- this launch file starts all SPRING nodes except for CVUT nodes. --> - <!-- launching User attention (userattention) --> - <node pkg="userattention" name="userattention" type="node" output="screen"> + <!-- launching Scene understanding (sceneunderstanding) --> + <node pkg="sceneunderstanding" name="sceneunderstanding" type="node" output="screen"> </node> - <!-- launching Multi-people tracker (multipeopletracker) --> - <node pkg="multipeopletracker" name="multipeopletracker" type="node" output="screen"> + <!-- launching Person manager (personmanager) --> + <node pkg="personmanager" name="personmanager" type="node" output="screen"> </node> - <!-- launching Mask detection (maskdetection) --> - <node pkg="maskdetection" name="maskdetection" type="node" output="screen"> + <!-- launching Speech synthesis (speechsynthesis) --> + <node pkg="speechsynthesis" name="speechsynthesis" type="node" output="screen"> </node> - <!-- launching Robot non-verbal behaviours (robotnonverbalbehaviours) --> - <node pkg="robotnonverbalbehaviours" name="robotnonverbalbehaviours" type="node" output="screen"> + <!-- launching Sound localisation (soundlocalisation) --> + <node pkg="soundlocalisation" name="soundlocalisation" type="node" output="screen"> </node> - <!-- launching Robot functional layer (robotfunctionallayer) --> - <node pkg="robotfunctionallayer" name="robotfunctionallayer" type="node" output="screen"> + <!-- launching User attention (userattention) --> + <node pkg="userattention" name="userattention" type="node" output="screen"> </node> - <!-- launching Robot utterances (robotutterances) --> - <node pkg="robotutterances" name="robotutterances" type="node" output="screen"> + <!-- launching RGB-D + camera_info (rgbdcamera_info) --> + <node pkg="rgbdcamera_info" name="rgbdcamera_info" type="node" output="screen"> + <remap from="image_raw" to="/camera_torso/color/image_raw"/> </node> - <!-- launching Activity reco (activityreco) --> - <node pkg="activityreco" name="activityreco" type="node" output="screen"> + <!-- launching F-formation (fformation) --> + <node pkg="fformation" name="fformation" type="node" output="screen"> + <remap from="groups" to="/h/i/groups"/> </node> - <!-- launching Speech synthesis (speechsynthesis) --> - <node pkg="speechsynthesis" name="speechsynthesis" type="node" output="screen"> + <!-- launching People 3D tracker (people3dtracker) --> + <node pkg="people3dtracker" name="people3dtracker" type="node" output="screen"> </node> - <!-- launching Face detection (facedetection) --> - <node pkg="facedetection" name="facedetection" type="node" output="screen"> + <!-- launching ASR (asr) --> + <node pkg="asr" name="asr" type="node" output="screen"> </node> <!-- launching Fisheye stereo + RGB head (fisheyestereorgbhead) --> <node pkg="fisheyestereorgbhead" name="fisheyestereorgbhead" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> </node> - <!-- launching Demographics (demographics) --> - <node pkg="demographics" name="demographics" type="node" output="screen"> - </node> - - <!-- launching respeaker_ros (respeaker_ros) --> - <node pkg="respeaker_ros" name="respeaker_ros" type="node" output="screen"> - <remap from="raw_audio" to="/audio/raw_audio"/> + <!-- launching User gaze (usergaze) --> + <node pkg="usergaze" name="usergaze" type="node" output="screen"> </node> - <!-- launching Face recognition (facerecognition) --> - <node pkg="facerecognition" name="facerecognition" type="node" output="screen"> + <!-- launching Speech diarization (speechdiarization) --> + <node pkg="speechdiarization" name="speechdiarization" type="node" output="screen"> </node> - <!-- launching Speaker recognition (speakerrecognition) --> - <node pkg="speakerrecognition" name="speakerrecognition" type="node" output="screen"> + <!-- launching Demographics (demographics) --> + <node pkg="demographics" name="demographics" type="node" output="screen"> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> + <remap from="face_demographics" to="/humans/faces/<id>/demographics"/> </node> - <!-- launching User gaze (usergaze) --> - <node pkg="usergaze" name="usergaze" type="node" output="screen"> + <!-- launching Robot non-verbal behaviours (robotnonverbalbehaviours) --> + <node pkg="robotnonverbalbehaviours" name="robotnonverbalbehaviours" type="node" output="screen"> </node> <!-- launching Non-verbal behaviours (nonverbalbehaviours) --> <node pkg="nonverbalbehaviours" name="nonverbalbehaviours" type="node" output="screen"> </node> - <!-- launching F-formation (fformation) --> - <node pkg="fformation" name="fformation" type="node" output="screen"> - <remap from="groups" to="/h/i/groups"/> + <!-- launching Interaction manager (interactionmanager) --> + <node pkg="interactionmanager" name="interactionmanager" type="node" output="screen"> </node> - <!-- launching Robot GUI (robotgui) --> - <node pkg="robotgui" name="robotgui" type="node" output="screen"> + <!-- launching High-level planner (highlevelplanner) --> + <node pkg="highlevelplanner" name="highlevelplanner" type="node" output="screen"> </node> - <!-- launching People 3D tracker (people3dtracker) --> - <node pkg="people3dtracker" name="people3dtracker" type="node" output="screen"> + <!-- launching Robot functional layer (robotfunctionallayer) --> + <node pkg="robotfunctionallayer" name="robotfunctionallayer" type="node" output="screen"> </node> - <!-- launching Speech diarization (speechdiarization) --> - <node pkg="speechdiarization" name="speechdiarization" type="node" output="screen"> + <!-- launching Mask detection (maskdetection) --> + <node pkg="maskdetection" name="maskdetection" type="node" output="screen"> + <remap from="roi" to="/h/faces/*/roi"/> + <remap from="face_mask" to="/humans/faces/<id>/mask"/> </node> - <!-- launching ROS openpose (rosopenpose) --> - <node pkg="rosopenpose" name="rosopenpose" type="node" output="screen"> + <!-- launching Speaker recognition (speakerrecognition) --> + <node pkg="speakerrecognition" name="speakerrecognition" type="node" output="screen"> </node> - <!-- launching Interaction manager (interactionmanager) --> - <node pkg="interactionmanager" name="interactionmanager" type="node" output="screen"> + <!-- launching Body 2D pose (body2dpose) --> + <node pkg="body2dpose" name="body2dpose" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="body_roi" to="/humans/bodies/<id>/roi"/> + <remap from="body_skeleton2d" to="/humans/bodies/<id>/skeleton2d"/> </node> - <!-- launching RGB-D + camera_info (rgbdcamera_info) --> - <node pkg="rgbdcamera_info" name="rgbdcamera_info" type="node" output="screen"> + <!-- launching Robot GUI (robotgui) --> + <node pkg="robotgui" name="robotgui" type="node" output="screen"> </node> - <!-- launching ASR (asr) --> - <node pkg="asr" name="asr" type="node" output="screen"> + <!-- launching Activity reco (activityreco) --> + <node pkg="activityreco" name="activityreco" type="node" output="screen"> </node> - <!-- launching Dialogue manager (dialoguemanager) --> - <node pkg="dialoguemanager" name="dialoguemanager" type="node" output="screen"> + <!-- launching Face detection (facedetection) --> + <node pkg="facedetection" name="facedetection" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> </node> - <!-- launching Scene understanding (sceneunderstanding) --> - <node pkg="sceneunderstanding" name="sceneunderstanding" type="node" output="screen"> + <!-- launching respeaker_ros (respeaker_ros) --> + <node pkg="respeaker_ros" name="respeaker_ros" type="node" output="screen"> + <remap from="raw_audio" to="/audio/raw_audio"/> </node> - <!-- launching High-level planner (highlevelplanner) --> - <node pkg="highlevelplanner" name="highlevelplanner" type="node" output="screen"> + <!-- launching Multi-people tracker (multipeopletracker) --> + <node pkg="multipeopletracker" name="multipeopletracker" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="body_roi" to="/humans/bodies/<id>/roi"/> </node> - <!-- launching ORB SLAM (orbslam) --> - <node pkg="orbslam" name="orbslam" type="node" output="screen"> + <!-- launching Robot utterances (robotutterances) --> + <node pkg="robotutterances" name="robotutterances" type="node" output="screen"> </node> - <!-- launching Body 2D pose (body2dpose) --> - <node pkg="body2dpose" name="body2dpose" type="node" output="screen"> + <!-- launching Dialogue manager (dialoguemanager) --> + <node pkg="dialoguemanager" name="dialoguemanager" type="node" output="screen"> </node> - <!-- launching Sound localisation (soundlocalisation) --> - <node pkg="soundlocalisation" name="soundlocalisation" type="node" output="screen"> + <!-- launching ORB SLAM (orbslam) --> + <node pkg="orbslam" name="orbslam" type="node" output="screen"> + <remap from="image_raw" to="/camera_torso/color/image_raw"/> + <remap from="map" to="/map"/> </node> - <!-- launching Person manager (personmanager) --> - <node pkg="personmanager" name="personmanager" type="node" output="screen"> + <!-- launching ROS openpose (rosopenpose) --> + <node pkg="rosopenpose" name="rosopenpose" type="node" output="screen"> + </node> + + <!-- launching Face recognition (facerecognition) --> + <node pkg="facerecognition" name="facerecognition" type="node" output="screen"> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> </node> diff --git a/spring-mock-ws/src/springarchitecture/launch/start_all_but_ERM.launch b/spring-mock-ws/src/springarchitecture/launch/start_all_but_ERM.launch index efc33e2..379a2c2 100644 --- a/spring-mock-ws/src/springarchitecture/launch/start_all_but_ERM.launch +++ b/spring-mock-ws/src/springarchitecture/launch/start_all_but_ERM.launch @@ -1,142 +1,162 @@ <launch> <!-- this launch file starts all SPRING nodes except for ERM nodes. --> - <!-- launching User attention (userattention) --> - <node pkg="userattention" name="userattention" type="node" output="screen"> + <!-- launching Scene understanding (sceneunderstanding) --> + <node pkg="sceneunderstanding" name="sceneunderstanding" type="node" output="screen"> </node> - <!-- launching Multi-people tracker (multipeopletracker) --> - <node pkg="multipeopletracker" name="multipeopletracker" type="node" output="screen"> + <!-- launching Person manager (personmanager) --> + <node pkg="personmanager" name="personmanager" type="node" output="screen"> </node> - <!-- launching Mask detection (maskdetection) --> - <node pkg="maskdetection" name="maskdetection" type="node" output="screen"> + <!-- launching Speech synthesis (speechsynthesis) --> + <node pkg="speechsynthesis" name="speechsynthesis" type="node" output="screen"> </node> - <!-- launching Robot non-verbal behaviours (robotnonverbalbehaviours) --> - <node pkg="robotnonverbalbehaviours" name="robotnonverbalbehaviours" type="node" output="screen"> + <!-- launching Visual SLAM + 3D map (visualslam3dmap) --> + <node pkg="visualslam3dmap" name="visualslam3dmap" type="node" output="screen"> + <remap from="image_head" to="/camera_head/color/image_head"/> + <remap from="image_torso" to="/camera_torso/color/image_torso"/> </node> - <!-- launching Robot functional layer (robotfunctionallayer) --> - <node pkg="robotfunctionallayer" name="robotfunctionallayer" type="node" output="screen"> + <!-- launching Occupancy map (occupancymap) --> + <node pkg="occupancymap" name="occupancymap" type="node" output="screen"> + <remap from="map_refined" to="/map_refined"/> </node> - <!-- launching Robot utterances (robotutterances) --> - <node pkg="robotutterances" name="robotutterances" type="node" output="screen"> + <!-- launching Sound localisation (soundlocalisation) --> + <node pkg="soundlocalisation" name="soundlocalisation" type="node" output="screen"> </node> - <!-- launching Activity reco (activityreco) --> - <node pkg="activityreco" name="activityreco" type="node" output="screen"> + <!-- launching User attention (userattention) --> + <node pkg="userattention" name="userattention" type="node" output="screen"> </node> - <!-- launching Occupancy map (occupancymap) --> - <node pkg="occupancymap" name="occupancymap" type="node" output="screen"> + <!-- launching RGB-D + camera_info (rgbdcamera_info) --> + <node pkg="rgbdcamera_info" name="rgbdcamera_info" type="node" output="screen"> + <remap from="image_raw" to="/camera_torso/color/image_raw"/> </node> - <!-- launching Speech synthesis (speechsynthesis) --> - <node pkg="speechsynthesis" name="speechsynthesis" type="node" output="screen"> + <!-- launching F-formation (fformation) --> + <node pkg="fformation" name="fformation" type="node" output="screen"> + <remap from="groups" to="/h/i/groups"/> </node> - <!-- launching Face detection (facedetection) --> - <node pkg="facedetection" name="facedetection" type="node" output="screen"> + <!-- launching People 3D tracker (people3dtracker) --> + <node pkg="people3dtracker" name="people3dtracker" type="node" output="screen"> </node> - <!-- launching Fisheye stereo + RGB head (fisheyestereorgbhead) --> - <node pkg="fisheyestereorgbhead" name="fisheyestereorgbhead" type="node" output="screen"> + <!-- launching ASR (asr) --> + <node pkg="asr" name="asr" type="node" output="screen"> </node> - <!-- launching Demographics (demographics) --> - <node pkg="demographics" name="demographics" type="node" output="screen"> + <!-- launching Fisheye stereo + RGB head (fisheyestereorgbhead) --> + <node pkg="fisheyestereorgbhead" name="fisheyestereorgbhead" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> </node> - <!-- launching respeaker_ros (respeaker_ros) --> - <node pkg="respeaker_ros" name="respeaker_ros" type="node" output="screen"> - <remap from="raw_audio" to="/audio/raw_audio"/> + <!-- launching User gaze (usergaze) --> + <node pkg="usergaze" name="usergaze" type="node" output="screen"> </node> - <!-- launching Face recognition (facerecognition) --> - <node pkg="facerecognition" name="facerecognition" type="node" output="screen"> + <!-- launching Speech diarization (speechdiarization) --> + <node pkg="speechdiarization" name="speechdiarization" type="node" output="screen"> </node> - <!-- launching Speaker recognition (speakerrecognition) --> - <node pkg="speakerrecognition" name="speakerrecognition" type="node" output="screen"> + <!-- launching Demographics (demographics) --> + <node pkg="demographics" name="demographics" type="node" output="screen"> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> + <remap from="face_demographics" to="/humans/faces/<id>/demographics"/> </node> - <!-- launching User gaze (usergaze) --> - <node pkg="usergaze" name="usergaze" type="node" output="screen"> + <!-- launching Robot non-verbal behaviours (robotnonverbalbehaviours) --> + <node pkg="robotnonverbalbehaviours" name="robotnonverbalbehaviours" type="node" output="screen"> </node> <!-- launching Non-verbal behaviours (nonverbalbehaviours) --> <node pkg="nonverbalbehaviours" name="nonverbalbehaviours" type="node" output="screen"> </node> - <!-- launching Visual SLAM + 3D map (visualslam3dmap) --> - <node pkg="visualslam3dmap" name="visualslam3dmap" type="node" output="screen"> + <!-- launching Interaction manager (interactionmanager) --> + <node pkg="interactionmanager" name="interactionmanager" type="node" output="screen"> </node> - <!-- launching F-formation (fformation) --> - <node pkg="fformation" name="fformation" type="node" output="screen"> - <remap from="groups" to="/h/i/groups"/> + <!-- launching High-level planner (highlevelplanner) --> + <node pkg="highlevelplanner" name="highlevelplanner" type="node" output="screen"> </node> - <!-- launching People 3D tracker (people3dtracker) --> - <node pkg="people3dtracker" name="people3dtracker" type="node" output="screen"> + <!-- launching Robot functional layer (robotfunctionallayer) --> + <node pkg="robotfunctionallayer" name="robotfunctionallayer" type="node" output="screen"> </node> - <!-- launching Speech diarization (speechdiarization) --> - <node pkg="speechdiarization" name="speechdiarization" type="node" output="screen"> + <!-- launching Mask detection (maskdetection) --> + <node pkg="maskdetection" name="maskdetection" type="node" output="screen"> + <remap from="roi" to="/h/faces/*/roi"/> + <remap from="face_mask" to="/humans/faces/<id>/mask"/> </node> - <!-- launching ROS openpose (rosopenpose) --> - <node pkg="rosopenpose" name="rosopenpose" type="node" output="screen"> + <!-- launching Speaker recognition (speakerrecognition) --> + <node pkg="speakerrecognition" name="speakerrecognition" type="node" output="screen"> </node> - <!-- launching Interaction manager (interactionmanager) --> - <node pkg="interactionmanager" name="interactionmanager" type="node" output="screen"> + <!-- launching Body 2D pose (body2dpose) --> + <node pkg="body2dpose" name="body2dpose" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="body_roi" to="/humans/bodies/<id>/roi"/> + <remap from="body_skeleton2d" to="/humans/bodies/<id>/skeleton2d"/> </node> - <!-- launching RGB-D + camera_info (rgbdcamera_info) --> - <node pkg="rgbdcamera_info" name="rgbdcamera_info" type="node" output="screen"> + <!-- launching Semantic mapping (semanticmapping) --> + <node pkg="semanticmapping" name="semanticmapping" type="node" output="screen"> </node> - <!-- launching ASR (asr) --> - <node pkg="asr" name="asr" type="node" output="screen"> + <!-- launching Activity reco (activityreco) --> + <node pkg="activityreco" name="activityreco" type="node" output="screen"> </node> - <!-- launching Dialogue manager (dialoguemanager) --> - <node pkg="dialoguemanager" name="dialoguemanager" type="node" output="screen"> + <!-- launching Face detection (facedetection) --> + <node pkg="facedetection" name="facedetection" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> </node> - <!-- launching Scene understanding (sceneunderstanding) --> - <node pkg="sceneunderstanding" name="sceneunderstanding" type="node" output="screen"> + <!-- launching respeaker_ros (respeaker_ros) --> + <node pkg="respeaker_ros" name="respeaker_ros" type="node" output="screen"> + <remap from="raw_audio" to="/audio/raw_audio"/> </node> - <!-- launching Object detection/identification/localisation (objectdetectionidentificationlocalisation) --> - <node pkg="objectdetectionidentificationlocalisation" name="objectdetectionidentificationlocalisation" type="node" output="screen"> + <!-- launching Multi-people tracker (multipeopletracker) --> + <node pkg="multipeopletracker" name="multipeopletracker" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="body_roi" to="/humans/bodies/<id>/roi"/> </node> - <!-- launching High-level planner (highlevelplanner) --> - <node pkg="highlevelplanner" name="highlevelplanner" type="node" output="screen"> + <!-- launching Robot utterances (robotutterances) --> + <node pkg="robotutterances" name="robotutterances" type="node" output="screen"> </node> - <!-- launching ORB SLAM (orbslam) --> - <node pkg="orbslam" name="orbslam" type="node" output="screen"> + <!-- launching Object detection/identification/localisation (objectdetectionidentificationlocalisation) --> + <node pkg="objectdetectionidentificationlocalisation" name="objectdetectionidentificationlocalisation" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> </node> - <!-- launching Body 2D pose (body2dpose) --> - <node pkg="body2dpose" name="body2dpose" type="node" output="screen"> + <!-- launching Dialogue manager (dialoguemanager) --> + <node pkg="dialoguemanager" name="dialoguemanager" type="node" output="screen"> </node> - <!-- launching Sound localisation (soundlocalisation) --> - <node pkg="soundlocalisation" name="soundlocalisation" type="node" output="screen"> + <!-- launching ORB SLAM (orbslam) --> + <node pkg="orbslam" name="orbslam" type="node" output="screen"> + <remap from="image_raw" to="/camera_torso/color/image_raw"/> + <remap from="map" to="/map"/> </node> - <!-- launching Semantic mapping (semanticmapping) --> - <node pkg="semanticmapping" name="semanticmapping" type="node" output="screen"> + <!-- launching ROS openpose (rosopenpose) --> + <node pkg="rosopenpose" name="rosopenpose" type="node" output="screen"> </node> - <!-- launching Person manager (personmanager) --> - <node pkg="personmanager" name="personmanager" type="node" output="screen"> + <!-- launching Face recognition (facerecognition) --> + <node pkg="facerecognition" name="facerecognition" type="node" output="screen"> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> </node> diff --git a/spring-mock-ws/src/springarchitecture/launch/start_all_but_HWU.launch b/spring-mock-ws/src/springarchitecture/launch/start_all_but_HWU.launch index 77aaf31..33c685a 100644 --- a/spring-mock-ws/src/springarchitecture/launch/start_all_but_HWU.launch +++ b/spring-mock-ws/src/springarchitecture/launch/start_all_but_HWU.launch @@ -1,126 +1,146 @@ <launch> <!-- this launch file starts all SPRING nodes except for HWU nodes. --> - <!-- launching User attention (userattention) --> - <node pkg="userattention" name="userattention" type="node" output="screen"> + <!-- launching Person manager (personmanager) --> + <node pkg="personmanager" name="personmanager" type="node" output="screen"> </node> - <!-- launching Multi-people tracker (multipeopletracker) --> - <node pkg="multipeopletracker" name="multipeopletracker" type="node" output="screen"> + <!-- launching Speech synthesis (speechsynthesis) --> + <node pkg="speechsynthesis" name="speechsynthesis" type="node" output="screen"> </node> - <!-- launching Mask detection (maskdetection) --> - <node pkg="maskdetection" name="maskdetection" type="node" output="screen"> + <!-- launching Visual SLAM + 3D map (visualslam3dmap) --> + <node pkg="visualslam3dmap" name="visualslam3dmap" type="node" output="screen"> + <remap from="image_head" to="/camera_head/color/image_head"/> + <remap from="image_torso" to="/camera_torso/color/image_torso"/> </node> - <!-- launching Robot non-verbal behaviours (robotnonverbalbehaviours) --> - <node pkg="robotnonverbalbehaviours" name="robotnonverbalbehaviours" type="node" output="screen"> + <!-- launching Occupancy map (occupancymap) --> + <node pkg="occupancymap" name="occupancymap" type="node" output="screen"> + <remap from="map_refined" to="/map_refined"/> </node> - <!-- launching Robot functional layer (robotfunctionallayer) --> - <node pkg="robotfunctionallayer" name="robotfunctionallayer" type="node" output="screen"> + <!-- launching Sound localisation (soundlocalisation) --> + <node pkg="soundlocalisation" name="soundlocalisation" type="node" output="screen"> </node> - <!-- launching Activity reco (activityreco) --> - <node pkg="activityreco" name="activityreco" type="node" output="screen"> + <!-- launching User attention (userattention) --> + <node pkg="userattention" name="userattention" type="node" output="screen"> </node> - <!-- launching Occupancy map (occupancymap) --> - <node pkg="occupancymap" name="occupancymap" type="node" output="screen"> + <!-- launching RGB-D + camera_info (rgbdcamera_info) --> + <node pkg="rgbdcamera_info" name="rgbdcamera_info" type="node" output="screen"> + <remap from="image_raw" to="/camera_torso/color/image_raw"/> </node> - <!-- launching Speech synthesis (speechsynthesis) --> - <node pkg="speechsynthesis" name="speechsynthesis" type="node" output="screen"> + <!-- launching F-formation (fformation) --> + <node pkg="fformation" name="fformation" type="node" output="screen"> + <remap from="groups" to="/h/i/groups"/> </node> - <!-- launching Face detection (facedetection) --> - <node pkg="facedetection" name="facedetection" type="node" output="screen"> + <!-- launching People 3D tracker (people3dtracker) --> + <node pkg="people3dtracker" name="people3dtracker" type="node" output="screen"> </node> - <!-- launching Fisheye stereo + RGB head (fisheyestereorgbhead) --> - <node pkg="fisheyestereorgbhead" name="fisheyestereorgbhead" type="node" output="screen"> + <!-- launching ASR (asr) --> + <node pkg="asr" name="asr" type="node" output="screen"> </node> - <!-- launching Demographics (demographics) --> - <node pkg="demographics" name="demographics" type="node" output="screen"> + <!-- launching Fisheye stereo + RGB head (fisheyestereorgbhead) --> + <node pkg="fisheyestereorgbhead" name="fisheyestereorgbhead" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> </node> - <!-- launching respeaker_ros (respeaker_ros) --> - <node pkg="respeaker_ros" name="respeaker_ros" type="node" output="screen"> - <remap from="raw_audio" to="/audio/raw_audio"/> + <!-- launching User gaze (usergaze) --> + <node pkg="usergaze" name="usergaze" type="node" output="screen"> </node> - <!-- launching Face recognition (facerecognition) --> - <node pkg="facerecognition" name="facerecognition" type="node" output="screen"> + <!-- launching Speech diarization (speechdiarization) --> + <node pkg="speechdiarization" name="speechdiarization" type="node" output="screen"> </node> - <!-- launching Speaker recognition (speakerrecognition) --> - <node pkg="speakerrecognition" name="speakerrecognition" type="node" output="screen"> + <!-- launching Demographics (demographics) --> + <node pkg="demographics" name="demographics" type="node" output="screen"> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> + <remap from="face_demographics" to="/humans/faces/<id>/demographics"/> </node> - <!-- launching User gaze (usergaze) --> - <node pkg="usergaze" name="usergaze" type="node" output="screen"> + <!-- launching Robot non-verbal behaviours (robotnonverbalbehaviours) --> + <node pkg="robotnonverbalbehaviours" name="robotnonverbalbehaviours" type="node" output="screen"> </node> <!-- launching Non-verbal behaviours (nonverbalbehaviours) --> <node pkg="nonverbalbehaviours" name="nonverbalbehaviours" type="node" output="screen"> </node> - <!-- launching Visual SLAM + 3D map (visualslam3dmap) --> - <node pkg="visualslam3dmap" name="visualslam3dmap" type="node" output="screen"> + <!-- launching Robot functional layer (robotfunctionallayer) --> + <node pkg="robotfunctionallayer" name="robotfunctionallayer" type="node" output="screen"> </node> - <!-- launching F-formation (fformation) --> - <node pkg="fformation" name="fformation" type="node" output="screen"> - <remap from="groups" to="/h/i/groups"/> + <!-- launching Mask detection (maskdetection) --> + <node pkg="maskdetection" name="maskdetection" type="node" output="screen"> + <remap from="roi" to="/h/faces/*/roi"/> + <remap from="face_mask" to="/humans/faces/<id>/mask"/> + </node> + + <!-- launching Speaker recognition (speakerrecognition) --> + <node pkg="speakerrecognition" name="speakerrecognition" type="node" output="screen"> + </node> + + <!-- launching Body 2D pose (body2dpose) --> + <node pkg="body2dpose" name="body2dpose" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="body_roi" to="/humans/bodies/<id>/roi"/> + <remap from="body_skeleton2d" to="/humans/bodies/<id>/skeleton2d"/> </node> <!-- launching Robot GUI (robotgui) --> <node pkg="robotgui" name="robotgui" type="node" output="screen"> </node> - <!-- launching People 3D tracker (people3dtracker) --> - <node pkg="people3dtracker" name="people3dtracker" type="node" output="screen"> + <!-- launching Semantic mapping (semanticmapping) --> + <node pkg="semanticmapping" name="semanticmapping" type="node" output="screen"> </node> - <!-- launching Speech diarization (speechdiarization) --> - <node pkg="speechdiarization" name="speechdiarization" type="node" output="screen"> + <!-- launching Activity reco (activityreco) --> + <node pkg="activityreco" name="activityreco" type="node" output="screen"> </node> - <!-- launching ROS openpose (rosopenpose) --> - <node pkg="rosopenpose" name="rosopenpose" type="node" output="screen"> + <!-- launching Face detection (facedetection) --> + <node pkg="facedetection" name="facedetection" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> </node> - <!-- launching RGB-D + camera_info (rgbdcamera_info) --> - <node pkg="rgbdcamera_info" name="rgbdcamera_info" type="node" output="screen"> + <!-- launching respeaker_ros (respeaker_ros) --> + <node pkg="respeaker_ros" name="respeaker_ros" type="node" output="screen"> + <remap from="raw_audio" to="/audio/raw_audio"/> </node> - <!-- launching ASR (asr) --> - <node pkg="asr" name="asr" type="node" output="screen"> + <!-- launching Multi-people tracker (multipeopletracker) --> + <node pkg="multipeopletracker" name="multipeopletracker" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="body_roi" to="/humans/bodies/<id>/roi"/> </node> <!-- launching Object detection/identification/localisation (objectdetectionidentificationlocalisation) --> <node pkg="objectdetectionidentificationlocalisation" name="objectdetectionidentificationlocalisation" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> </node> <!-- launching ORB SLAM (orbslam) --> <node pkg="orbslam" name="orbslam" type="node" output="screen"> + <remap from="image_raw" to="/camera_torso/color/image_raw"/> + <remap from="map" to="/map"/> </node> - <!-- launching Body 2D pose (body2dpose) --> - <node pkg="body2dpose" name="body2dpose" type="node" output="screen"> - </node> - - <!-- launching Sound localisation (soundlocalisation) --> - <node pkg="soundlocalisation" name="soundlocalisation" type="node" output="screen"> - </node> - - <!-- launching Semantic mapping (semanticmapping) --> - <node pkg="semanticmapping" name="semanticmapping" type="node" output="screen"> + <!-- launching ROS openpose (rosopenpose) --> + <node pkg="rosopenpose" name="rosopenpose" type="node" output="screen"> </node> - <!-- launching Person manager (personmanager) --> - <node pkg="personmanager" name="personmanager" type="node" output="screen"> + <!-- launching Face recognition (facerecognition) --> + <node pkg="facerecognition" name="facerecognition" type="node" output="screen"> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> </node> diff --git a/spring-mock-ws/src/springarchitecture/launch/start_all_but_INRIA.launch b/spring-mock-ws/src/springarchitecture/launch/start_all_but_INRIA.launch index 871c968..9ef3a42 100644 --- a/spring-mock-ws/src/springarchitecture/launch/start_all_but_INRIA.launch +++ b/spring-mock-ws/src/springarchitecture/launch/start_all_but_INRIA.launch @@ -1,126 +1,144 @@ <launch> <!-- this launch file starts all SPRING nodes except for INRIA nodes. --> - <!-- launching User attention (userattention) --> - <node pkg="userattention" name="userattention" type="node" output="screen"> + <!-- launching Scene understanding (sceneunderstanding) --> + <node pkg="sceneunderstanding" name="sceneunderstanding" type="node" output="screen"> </node> - <!-- launching Mask detection (maskdetection) --> - <node pkg="maskdetection" name="maskdetection" type="node" output="screen"> + <!-- launching Speech synthesis (speechsynthesis) --> + <node pkg="speechsynthesis" name="speechsynthesis" type="node" output="screen"> </node> - <!-- launching Robot functional layer (robotfunctionallayer) --> - <node pkg="robotfunctionallayer" name="robotfunctionallayer" type="node" output="screen"> + <!-- launching Visual SLAM + 3D map (visualslam3dmap) --> + <node pkg="visualslam3dmap" name="visualslam3dmap" type="node" output="screen"> + <remap from="image_head" to="/camera_head/color/image_head"/> + <remap from="image_torso" to="/camera_torso/color/image_torso"/> </node> - <!-- launching Robot utterances (robotutterances) --> - <node pkg="robotutterances" name="robotutterances" type="node" output="screen"> + <!-- launching Occupancy map (occupancymap) --> + <node pkg="occupancymap" name="occupancymap" type="node" output="screen"> + <remap from="map_refined" to="/map_refined"/> </node> - <!-- launching Activity reco (activityreco) --> - <node pkg="activityreco" name="activityreco" type="node" output="screen"> + <!-- launching Sound localisation (soundlocalisation) --> + <node pkg="soundlocalisation" name="soundlocalisation" type="node" output="screen"> </node> - <!-- launching Occupancy map (occupancymap) --> - <node pkg="occupancymap" name="occupancymap" type="node" output="screen"> + <!-- launching User attention (userattention) --> + <node pkg="userattention" name="userattention" type="node" output="screen"> </node> - <!-- launching Speech synthesis (speechsynthesis) --> - <node pkg="speechsynthesis" name="speechsynthesis" type="node" output="screen"> + <!-- launching RGB-D + camera_info (rgbdcamera_info) --> + <node pkg="rgbdcamera_info" name="rgbdcamera_info" type="node" output="screen"> + <remap from="image_raw" to="/camera_torso/color/image_raw"/> </node> - <!-- launching Face detection (facedetection) --> - <node pkg="facedetection" name="facedetection" type="node" output="screen"> + <!-- launching F-formation (fformation) --> + <node pkg="fformation" name="fformation" type="node" output="screen"> + <remap from="groups" to="/h/i/groups"/> + </node> + + <!-- launching ASR (asr) --> + <node pkg="asr" name="asr" type="node" output="screen"> </node> <!-- launching Fisheye stereo + RGB head (fisheyestereorgbhead) --> <node pkg="fisheyestereorgbhead" name="fisheyestereorgbhead" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + </node> + + <!-- launching User gaze (usergaze) --> + <node pkg="usergaze" name="usergaze" type="node" output="screen"> + </node> + + <!-- launching Speech diarization (speechdiarization) --> + <node pkg="speechdiarization" name="speechdiarization" type="node" output="screen"> </node> <!-- launching Demographics (demographics) --> <node pkg="demographics" name="demographics" type="node" output="screen"> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> + <remap from="face_demographics" to="/humans/faces/<id>/demographics"/> </node> - <!-- launching respeaker_ros (respeaker_ros) --> - <node pkg="respeaker_ros" name="respeaker_ros" type="node" output="screen"> - <remap from="raw_audio" to="/audio/raw_audio"/> + <!-- launching Non-verbal behaviours (nonverbalbehaviours) --> + <node pkg="nonverbalbehaviours" name="nonverbalbehaviours" type="node" output="screen"> </node> - <!-- launching Face recognition (facerecognition) --> - <node pkg="facerecognition" name="facerecognition" type="node" output="screen"> + <!-- launching Interaction manager (interactionmanager) --> + <node pkg="interactionmanager" name="interactionmanager" type="node" output="screen"> </node> - <!-- launching Speaker recognition (speakerrecognition) --> - <node pkg="speakerrecognition" name="speakerrecognition" type="node" output="screen"> + <!-- launching High-level planner (highlevelplanner) --> + <node pkg="highlevelplanner" name="highlevelplanner" type="node" output="screen"> </node> - <!-- launching User gaze (usergaze) --> - <node pkg="usergaze" name="usergaze" type="node" output="screen"> + <!-- launching Robot functional layer (robotfunctionallayer) --> + <node pkg="robotfunctionallayer" name="robotfunctionallayer" type="node" output="screen"> </node> - <!-- launching Non-verbal behaviours (nonverbalbehaviours) --> - <node pkg="nonverbalbehaviours" name="nonverbalbehaviours" type="node" output="screen"> + <!-- launching Mask detection (maskdetection) --> + <node pkg="maskdetection" name="maskdetection" type="node" output="screen"> + <remap from="roi" to="/h/faces/*/roi"/> + <remap from="face_mask" to="/humans/faces/<id>/mask"/> </node> - <!-- launching Visual SLAM + 3D map (visualslam3dmap) --> - <node pkg="visualslam3dmap" name="visualslam3dmap" type="node" output="screen"> + <!-- launching Speaker recognition (speakerrecognition) --> + <node pkg="speakerrecognition" name="speakerrecognition" type="node" output="screen"> </node> - <!-- launching F-formation (fformation) --> - <node pkg="fformation" name="fformation" type="node" output="screen"> - <remap from="groups" to="/h/i/groups"/> + <!-- launching Body 2D pose (body2dpose) --> + <node pkg="body2dpose" name="body2dpose" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="body_roi" to="/humans/bodies/<id>/roi"/> + <remap from="body_skeleton2d" to="/humans/bodies/<id>/skeleton2d"/> </node> <!-- launching Robot GUI (robotgui) --> <node pkg="robotgui" name="robotgui" type="node" output="screen"> </node> - <!-- launching Speech diarization (speechdiarization) --> - <node pkg="speechdiarization" name="speechdiarization" type="node" output="screen"> - </node> - - <!-- launching Interaction manager (interactionmanager) --> - <node pkg="interactionmanager" name="interactionmanager" type="node" output="screen"> + <!-- launching Semantic mapping (semanticmapping) --> + <node pkg="semanticmapping" name="semanticmapping" type="node" output="screen"> </node> - <!-- launching RGB-D + camera_info (rgbdcamera_info) --> - <node pkg="rgbdcamera_info" name="rgbdcamera_info" type="node" output="screen"> + <!-- launching Activity reco (activityreco) --> + <node pkg="activityreco" name="activityreco" type="node" output="screen"> </node> - <!-- launching ASR (asr) --> - <node pkg="asr" name="asr" type="node" output="screen"> + <!-- launching Face detection (facedetection) --> + <node pkg="facedetection" name="facedetection" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> </node> - <!-- launching Dialogue manager (dialoguemanager) --> - <node pkg="dialoguemanager" name="dialoguemanager" type="node" output="screen"> + <!-- launching respeaker_ros (respeaker_ros) --> + <node pkg="respeaker_ros" name="respeaker_ros" type="node" output="screen"> + <remap from="raw_audio" to="/audio/raw_audio"/> </node> - <!-- launching Scene understanding (sceneunderstanding) --> - <node pkg="sceneunderstanding" name="sceneunderstanding" type="node" output="screen"> + <!-- launching Robot utterances (robotutterances) --> + <node pkg="robotutterances" name="robotutterances" type="node" output="screen"> </node> <!-- launching Object detection/identification/localisation (objectdetectionidentificationlocalisation) --> <node pkg="objectdetectionidentificationlocalisation" name="objectdetectionidentificationlocalisation" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> </node> - <!-- launching High-level planner (highlevelplanner) --> - <node pkg="highlevelplanner" name="highlevelplanner" type="node" output="screen"> + <!-- launching Dialogue manager (dialoguemanager) --> + <node pkg="dialoguemanager" name="dialoguemanager" type="node" output="screen"> </node> <!-- launching ORB SLAM (orbslam) --> <node pkg="orbslam" name="orbslam" type="node" output="screen"> + <remap from="image_raw" to="/camera_torso/color/image_raw"/> + <remap from="map" to="/map"/> </node> - <!-- launching Body 2D pose (body2dpose) --> - <node pkg="body2dpose" name="body2dpose" type="node" output="screen"> - </node> - - <!-- launching Sound localisation (soundlocalisation) --> - <node pkg="soundlocalisation" name="soundlocalisation" type="node" output="screen"> - </node> - - <!-- launching Semantic mapping (semanticmapping) --> - <node pkg="semanticmapping" name="semanticmapping" type="node" output="screen"> + <!-- launching Face recognition (facerecognition) --> + <node pkg="facerecognition" name="facerecognition" type="node" output="screen"> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> </node> diff --git a/spring-mock-ws/src/springarchitecture/launch/start_all_but_Other.launch b/spring-mock-ws/src/springarchitecture/launch/start_all_but_Other.launch index 5ddb6fd..8c9d994 100644 --- a/spring-mock-ws/src/springarchitecture/launch/start_all_but_Other.launch +++ b/spring-mock-ws/src/springarchitecture/launch/start_all_but_Other.launch @@ -1,146 +1,166 @@ <launch> <!-- this launch file starts all SPRING nodes except for Other nodes. --> - <!-- launching User attention (userattention) --> - <node pkg="userattention" name="userattention" type="node" output="screen"> + <!-- launching Scene understanding (sceneunderstanding) --> + <node pkg="sceneunderstanding" name="sceneunderstanding" type="node" output="screen"> </node> - <!-- launching Multi-people tracker (multipeopletracker) --> - <node pkg="multipeopletracker" name="multipeopletracker" type="node" output="screen"> + <!-- launching Person manager (personmanager) --> + <node pkg="personmanager" name="personmanager" type="node" output="screen"> </node> - <!-- launching Mask detection (maskdetection) --> - <node pkg="maskdetection" name="maskdetection" type="node" output="screen"> + <!-- launching Speech synthesis (speechsynthesis) --> + <node pkg="speechsynthesis" name="speechsynthesis" type="node" output="screen"> </node> - <!-- launching Robot non-verbal behaviours (robotnonverbalbehaviours) --> - <node pkg="robotnonverbalbehaviours" name="robotnonverbalbehaviours" type="node" output="screen"> + <!-- launching Visual SLAM + 3D map (visualslam3dmap) --> + <node pkg="visualslam3dmap" name="visualslam3dmap" type="node" output="screen"> + <remap from="image_head" to="/camera_head/color/image_head"/> + <remap from="image_torso" to="/camera_torso/color/image_torso"/> </node> - <!-- launching Robot functional layer (robotfunctionallayer) --> - <node pkg="robotfunctionallayer" name="robotfunctionallayer" type="node" output="screen"> + <!-- launching Occupancy map (occupancymap) --> + <node pkg="occupancymap" name="occupancymap" type="node" output="screen"> + <remap from="map_refined" to="/map_refined"/> </node> - <!-- launching Robot utterances (robotutterances) --> - <node pkg="robotutterances" name="robotutterances" type="node" output="screen"> + <!-- launching Sound localisation (soundlocalisation) --> + <node pkg="soundlocalisation" name="soundlocalisation" type="node" output="screen"> </node> - <!-- launching Activity reco (activityreco) --> - <node pkg="activityreco" name="activityreco" type="node" output="screen"> + <!-- launching User attention (userattention) --> + <node pkg="userattention" name="userattention" type="node" output="screen"> </node> - <!-- launching Occupancy map (occupancymap) --> - <node pkg="occupancymap" name="occupancymap" type="node" output="screen"> + <!-- launching RGB-D + camera_info (rgbdcamera_info) --> + <node pkg="rgbdcamera_info" name="rgbdcamera_info" type="node" output="screen"> + <remap from="image_raw" to="/camera_torso/color/image_raw"/> </node> - <!-- launching Speech synthesis (speechsynthesis) --> - <node pkg="speechsynthesis" name="speechsynthesis" type="node" output="screen"> + <!-- launching F-formation (fformation) --> + <node pkg="fformation" name="fformation" type="node" output="screen"> + <remap from="groups" to="/h/i/groups"/> </node> - <!-- launching Face detection (facedetection) --> - <node pkg="facedetection" name="facedetection" type="node" output="screen"> + <!-- launching People 3D tracker (people3dtracker) --> + <node pkg="people3dtracker" name="people3dtracker" type="node" output="screen"> </node> - <!-- launching Fisheye stereo + RGB head (fisheyestereorgbhead) --> - <node pkg="fisheyestereorgbhead" name="fisheyestereorgbhead" type="node" output="screen"> + <!-- launching ASR (asr) --> + <node pkg="asr" name="asr" type="node" output="screen"> </node> - <!-- launching Demographics (demographics) --> - <node pkg="demographics" name="demographics" type="node" output="screen"> + <!-- launching Fisheye stereo + RGB head (fisheyestereorgbhead) --> + <node pkg="fisheyestereorgbhead" name="fisheyestereorgbhead" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> </node> - <!-- launching respeaker_ros (respeaker_ros) --> - <node pkg="respeaker_ros" name="respeaker_ros" type="node" output="screen"> - <remap from="raw_audio" to="/audio/raw_audio"/> + <!-- launching User gaze (usergaze) --> + <node pkg="usergaze" name="usergaze" type="node" output="screen"> </node> - <!-- launching Face recognition (facerecognition) --> - <node pkg="facerecognition" name="facerecognition" type="node" output="screen"> + <!-- launching Speech diarization (speechdiarization) --> + <node pkg="speechdiarization" name="speechdiarization" type="node" output="screen"> </node> - <!-- launching Speaker recognition (speakerrecognition) --> - <node pkg="speakerrecognition" name="speakerrecognition" type="node" output="screen"> + <!-- launching Demographics (demographics) --> + <node pkg="demographics" name="demographics" type="node" output="screen"> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> + <remap from="face_demographics" to="/humans/faces/<id>/demographics"/> </node> - <!-- launching User gaze (usergaze) --> - <node pkg="usergaze" name="usergaze" type="node" output="screen"> + <!-- launching Robot non-verbal behaviours (robotnonverbalbehaviours) --> + <node pkg="robotnonverbalbehaviours" name="robotnonverbalbehaviours" type="node" output="screen"> </node> <!-- launching Non-verbal behaviours (nonverbalbehaviours) --> <node pkg="nonverbalbehaviours" name="nonverbalbehaviours" type="node" output="screen"> </node> - <!-- launching Visual SLAM + 3D map (visualslam3dmap) --> - <node pkg="visualslam3dmap" name="visualslam3dmap" type="node" output="screen"> + <!-- launching Interaction manager (interactionmanager) --> + <node pkg="interactionmanager" name="interactionmanager" type="node" output="screen"> </node> - <!-- launching F-formation (fformation) --> - <node pkg="fformation" name="fformation" type="node" output="screen"> - <remap from="groups" to="/h/i/groups"/> + <!-- launching High-level planner (highlevelplanner) --> + <node pkg="highlevelplanner" name="highlevelplanner" type="node" output="screen"> </node> - <!-- launching Robot GUI (robotgui) --> - <node pkg="robotgui" name="robotgui" type="node" output="screen"> + <!-- launching Robot functional layer (robotfunctionallayer) --> + <node pkg="robotfunctionallayer" name="robotfunctionallayer" type="node" output="screen"> </node> - <!-- launching People 3D tracker (people3dtracker) --> - <node pkg="people3dtracker" name="people3dtracker" type="node" output="screen"> + <!-- launching Mask detection (maskdetection) --> + <node pkg="maskdetection" name="maskdetection" type="node" output="screen"> + <remap from="roi" to="/h/faces/*/roi"/> + <remap from="face_mask" to="/humans/faces/<id>/mask"/> </node> - <!-- launching Speech diarization (speechdiarization) --> - <node pkg="speechdiarization" name="speechdiarization" type="node" output="screen"> + <!-- launching Speaker recognition (speakerrecognition) --> + <node pkg="speakerrecognition" name="speakerrecognition" type="node" output="screen"> </node> - <!-- launching ROS openpose (rosopenpose) --> - <node pkg="rosopenpose" name="rosopenpose" type="node" output="screen"> + <!-- launching Body 2D pose (body2dpose) --> + <node pkg="body2dpose" name="body2dpose" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="body_roi" to="/humans/bodies/<id>/roi"/> + <remap from="body_skeleton2d" to="/humans/bodies/<id>/skeleton2d"/> </node> - <!-- launching Interaction manager (interactionmanager) --> - <node pkg="interactionmanager" name="interactionmanager" type="node" output="screen"> + <!-- launching Robot GUI (robotgui) --> + <node pkg="robotgui" name="robotgui" type="node" output="screen"> </node> - <!-- launching RGB-D + camera_info (rgbdcamera_info) --> - <node pkg="rgbdcamera_info" name="rgbdcamera_info" type="node" output="screen"> + <!-- launching Semantic mapping (semanticmapping) --> + <node pkg="semanticmapping" name="semanticmapping" type="node" output="screen"> </node> - <!-- launching ASR (asr) --> - <node pkg="asr" name="asr" type="node" output="screen"> + <!-- launching Activity reco (activityreco) --> + <node pkg="activityreco" name="activityreco" type="node" output="screen"> </node> - <!-- launching Dialogue manager (dialoguemanager) --> - <node pkg="dialoguemanager" name="dialoguemanager" type="node" output="screen"> + <!-- launching Face detection (facedetection) --> + <node pkg="facedetection" name="facedetection" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> </node> - <!-- launching Scene understanding (sceneunderstanding) --> - <node pkg="sceneunderstanding" name="sceneunderstanding" type="node" output="screen"> + <!-- launching respeaker_ros (respeaker_ros) --> + <node pkg="respeaker_ros" name="respeaker_ros" type="node" output="screen"> + <remap from="raw_audio" to="/audio/raw_audio"/> </node> - <!-- launching Object detection/identification/localisation (objectdetectionidentificationlocalisation) --> - <node pkg="objectdetectionidentificationlocalisation" name="objectdetectionidentificationlocalisation" type="node" output="screen"> + <!-- launching Multi-people tracker (multipeopletracker) --> + <node pkg="multipeopletracker" name="multipeopletracker" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="body_roi" to="/humans/bodies/<id>/roi"/> </node> - <!-- launching High-level planner (highlevelplanner) --> - <node pkg="highlevelplanner" name="highlevelplanner" type="node" output="screen"> + <!-- launching Robot utterances (robotutterances) --> + <node pkg="robotutterances" name="robotutterances" type="node" output="screen"> </node> - <!-- launching ORB SLAM (orbslam) --> - <node pkg="orbslam" name="orbslam" type="node" output="screen"> + <!-- launching Object detection/identification/localisation (objectdetectionidentificationlocalisation) --> + <node pkg="objectdetectionidentificationlocalisation" name="objectdetectionidentificationlocalisation" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> </node> - <!-- launching Body 2D pose (body2dpose) --> - <node pkg="body2dpose" name="body2dpose" type="node" output="screen"> + <!-- launching Dialogue manager (dialoguemanager) --> + <node pkg="dialoguemanager" name="dialoguemanager" type="node" output="screen"> </node> - <!-- launching Sound localisation (soundlocalisation) --> - <node pkg="soundlocalisation" name="soundlocalisation" type="node" output="screen"> + <!-- launching ORB SLAM (orbslam) --> + <node pkg="orbslam" name="orbslam" type="node" output="screen"> + <remap from="image_raw" to="/camera_torso/color/image_raw"/> + <remap from="map" to="/map"/> </node> - <!-- launching Semantic mapping (semanticmapping) --> - <node pkg="semanticmapping" name="semanticmapping" type="node" output="screen"> + <!-- launching ROS openpose (rosopenpose) --> + <node pkg="rosopenpose" name="rosopenpose" type="node" output="screen"> </node> - <!-- launching Person manager (personmanager) --> - <node pkg="personmanager" name="personmanager" type="node" output="screen"> + <!-- launching Face recognition (facerecognition) --> + <node pkg="facerecognition" name="facerecognition" type="node" output="screen"> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> </node> diff --git a/spring-mock-ws/src/springarchitecture/launch/start_all_but_PAL.launch b/spring-mock-ws/src/springarchitecture/launch/start_all_but_PAL.launch index 2fd2757..1b5313c 100644 --- a/spring-mock-ws/src/springarchitecture/launch/start_all_but_PAL.launch +++ b/spring-mock-ws/src/springarchitecture/launch/start_all_but_PAL.launch @@ -1,121 +1,137 @@ <launch> <!-- this launch file starts all SPRING nodes except for PAL nodes. --> - <!-- launching User attention (userattention) --> - <node pkg="userattention" name="userattention" type="node" output="screen"> + <!-- launching Scene understanding (sceneunderstanding) --> + <node pkg="sceneunderstanding" name="sceneunderstanding" type="node" output="screen"> </node> - <!-- launching Multi-people tracker (multipeopletracker) --> - <node pkg="multipeopletracker" name="multipeopletracker" type="node" output="screen"> + <!-- launching Person manager (personmanager) --> + <node pkg="personmanager" name="personmanager" type="node" output="screen"> </node> - <!-- launching Mask detection (maskdetection) --> - <node pkg="maskdetection" name="maskdetection" type="node" output="screen"> + <!-- launching Visual SLAM + 3D map (visualslam3dmap) --> + <node pkg="visualslam3dmap" name="visualslam3dmap" type="node" output="screen"> + <remap from="image_head" to="/camera_head/color/image_head"/> + <remap from="image_torso" to="/camera_torso/color/image_torso"/> </node> - <!-- launching Robot non-verbal behaviours (robotnonverbalbehaviours) --> - <node pkg="robotnonverbalbehaviours" name="robotnonverbalbehaviours" type="node" output="screen"> + <!-- launching Occupancy map (occupancymap) --> + <node pkg="occupancymap" name="occupancymap" type="node" output="screen"> + <remap from="map_refined" to="/map_refined"/> </node> - <!-- launching Robot utterances (robotutterances) --> - <node pkg="robotutterances" name="robotutterances" type="node" output="screen"> + <!-- launching Sound localisation (soundlocalisation) --> + <node pkg="soundlocalisation" name="soundlocalisation" type="node" output="screen"> </node> - <!-- launching Activity reco (activityreco) --> - <node pkg="activityreco" name="activityreco" type="node" output="screen"> + <!-- launching User attention (userattention) --> + <node pkg="userattention" name="userattention" type="node" output="screen"> </node> - <!-- launching Occupancy map (occupancymap) --> - <node pkg="occupancymap" name="occupancymap" type="node" output="screen"> + <!-- launching F-formation (fformation) --> + <node pkg="fformation" name="fformation" type="node" output="screen"> + <remap from="groups" to="/h/i/groups"/> </node> - <!-- launching Face detection (facedetection) --> - <node pkg="facedetection" name="facedetection" type="node" output="screen"> + <!-- launching People 3D tracker (people3dtracker) --> + <node pkg="people3dtracker" name="people3dtracker" type="node" output="screen"> </node> - <!-- launching Demographics (demographics) --> - <node pkg="demographics" name="demographics" type="node" output="screen"> + <!-- launching ASR (asr) --> + <node pkg="asr" name="asr" type="node" output="screen"> </node> - <!-- launching Face recognition (facerecognition) --> - <node pkg="facerecognition" name="facerecognition" type="node" output="screen"> + <!-- launching User gaze (usergaze) --> + <node pkg="usergaze" name="usergaze" type="node" output="screen"> </node> - <!-- launching Speaker recognition (speakerrecognition) --> - <node pkg="speakerrecognition" name="speakerrecognition" type="node" output="screen"> + <!-- launching Speech diarization (speechdiarization) --> + <node pkg="speechdiarization" name="speechdiarization" type="node" output="screen"> </node> - <!-- launching User gaze (usergaze) --> - <node pkg="usergaze" name="usergaze" type="node" output="screen"> + <!-- launching Demographics (demographics) --> + <node pkg="demographics" name="demographics" type="node" output="screen"> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> + <remap from="face_demographics" to="/humans/faces/<id>/demographics"/> </node> - <!-- launching Non-verbal behaviours (nonverbalbehaviours) --> - <node pkg="nonverbalbehaviours" name="nonverbalbehaviours" type="node" output="screen"> + <!-- launching Robot non-verbal behaviours (robotnonverbalbehaviours) --> + <node pkg="robotnonverbalbehaviours" name="robotnonverbalbehaviours" type="node" output="screen"> </node> - <!-- launching Visual SLAM + 3D map (visualslam3dmap) --> - <node pkg="visualslam3dmap" name="visualslam3dmap" type="node" output="screen"> + <!-- launching Non-verbal behaviours (nonverbalbehaviours) --> + <node pkg="nonverbalbehaviours" name="nonverbalbehaviours" type="node" output="screen"> </node> - <!-- launching F-formation (fformation) --> - <node pkg="fformation" name="fformation" type="node" output="screen"> - <remap from="groups" to="/h/i/groups"/> + <!-- launching Interaction manager (interactionmanager) --> + <node pkg="interactionmanager" name="interactionmanager" type="node" output="screen"> </node> - <!-- launching Robot GUI (robotgui) --> - <node pkg="robotgui" name="robotgui" type="node" output="screen"> + <!-- launching High-level planner (highlevelplanner) --> + <node pkg="highlevelplanner" name="highlevelplanner" type="node" output="screen"> </node> - <!-- launching People 3D tracker (people3dtracker) --> - <node pkg="people3dtracker" name="people3dtracker" type="node" output="screen"> + <!-- launching Mask detection (maskdetection) --> + <node pkg="maskdetection" name="maskdetection" type="node" output="screen"> + <remap from="roi" to="/h/faces/*/roi"/> + <remap from="face_mask" to="/humans/faces/<id>/mask"/> </node> - <!-- launching Speech diarization (speechdiarization) --> - <node pkg="speechdiarization" name="speechdiarization" type="node" output="screen"> + <!-- launching Speaker recognition (speakerrecognition) --> + <node pkg="speakerrecognition" name="speakerrecognition" type="node" output="screen"> </node> - <!-- launching ROS openpose (rosopenpose) --> - <node pkg="rosopenpose" name="rosopenpose" type="node" output="screen"> + <!-- launching Body 2D pose (body2dpose) --> + <node pkg="body2dpose" name="body2dpose" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="body_roi" to="/humans/bodies/<id>/roi"/> + <remap from="body_skeleton2d" to="/humans/bodies/<id>/skeleton2d"/> </node> - <!-- launching Interaction manager (interactionmanager) --> - <node pkg="interactionmanager" name="interactionmanager" type="node" output="screen"> + <!-- launching Robot GUI (robotgui) --> + <node pkg="robotgui" name="robotgui" type="node" output="screen"> </node> - <!-- launching ASR (asr) --> - <node pkg="asr" name="asr" type="node" output="screen"> + <!-- launching Semantic mapping (semanticmapping) --> + <node pkg="semanticmapping" name="semanticmapping" type="node" output="screen"> </node> - <!-- launching Dialogue manager (dialoguemanager) --> - <node pkg="dialoguemanager" name="dialoguemanager" type="node" output="screen"> + <!-- launching Activity reco (activityreco) --> + <node pkg="activityreco" name="activityreco" type="node" output="screen"> </node> - <!-- launching Scene understanding (sceneunderstanding) --> - <node pkg="sceneunderstanding" name="sceneunderstanding" type="node" output="screen"> + <!-- launching Face detection (facedetection) --> + <node pkg="facedetection" name="facedetection" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> </node> - <!-- launching Object detection/identification/localisation (objectdetectionidentificationlocalisation) --> - <node pkg="objectdetectionidentificationlocalisation" name="objectdetectionidentificationlocalisation" type="node" output="screen"> + <!-- launching Multi-people tracker (multipeopletracker) --> + <node pkg="multipeopletracker" name="multipeopletracker" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="body_roi" to="/humans/bodies/<id>/roi"/> </node> - <!-- launching High-level planner (highlevelplanner) --> - <node pkg="highlevelplanner" name="highlevelplanner" type="node" output="screen"> + <!-- launching Robot utterances (robotutterances) --> + <node pkg="robotutterances" name="robotutterances" type="node" output="screen"> </node> - <!-- launching Body 2D pose (body2dpose) --> - <node pkg="body2dpose" name="body2dpose" type="node" output="screen"> + <!-- launching Object detection/identification/localisation (objectdetectionidentificationlocalisation) --> + <node pkg="objectdetectionidentificationlocalisation" name="objectdetectionidentificationlocalisation" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> </node> - <!-- launching Sound localisation (soundlocalisation) --> - <node pkg="soundlocalisation" name="soundlocalisation" type="node" output="screen"> + <!-- launching Dialogue manager (dialoguemanager) --> + <node pkg="dialoguemanager" name="dialoguemanager" type="node" output="screen"> </node> - <!-- launching Semantic mapping (semanticmapping) --> - <node pkg="semanticmapping" name="semanticmapping" type="node" output="screen"> + <!-- launching ROS openpose (rosopenpose) --> + <node pkg="rosopenpose" name="rosopenpose" type="node" output="screen"> </node> - <!-- launching Person manager (personmanager) --> - <node pkg="personmanager" name="personmanager" type="node" output="screen"> + <!-- launching Face recognition (facerecognition) --> + <node pkg="facerecognition" name="facerecognition" type="node" output="screen"> + <remap from="face_roi" to="/humans/faces/<id>/roi"/> </node> diff --git a/spring-mock-ws/src/springarchitecture/launch/start_all_but_UNITN.launch b/spring-mock-ws/src/springarchitecture/launch/start_all_but_UNITN.launch index 249a925..4af0c24 100644 --- a/spring-mock-ws/src/springarchitecture/launch/start_all_but_UNITN.launch +++ b/spring-mock-ws/src/springarchitecture/launch/start_all_but_UNITN.launch @@ -1,105 +1,115 @@ <launch> <!-- this launch file starts all SPRING nodes except for UNITN nodes. --> - <!-- launching Multi-people tracker (multipeopletracker) --> - <node pkg="multipeopletracker" name="multipeopletracker" type="node" output="screen"> + <!-- launching Scene understanding (sceneunderstanding) --> + <node pkg="sceneunderstanding" name="sceneunderstanding" type="node" output="screen"> </node> - <!-- launching Robot non-verbal behaviours (robotnonverbalbehaviours) --> - <node pkg="robotnonverbalbehaviours" name="robotnonverbalbehaviours" type="node" output="screen"> + <!-- launching Person manager (personmanager) --> + <node pkg="personmanager" name="personmanager" type="node" output="screen"> </node> - <!-- launching Robot functional layer (robotfunctionallayer) --> - <node pkg="robotfunctionallayer" name="robotfunctionallayer" type="node" output="screen"> + <!-- launching Speech synthesis (speechsynthesis) --> + <node pkg="speechsynthesis" name="speechsynthesis" type="node" output="screen"> </node> - <!-- launching Robot utterances (robotutterances) --> - <node pkg="robotutterances" name="robotutterances" type="node" output="screen"> + <!-- launching Visual SLAM + 3D map (visualslam3dmap) --> + <node pkg="visualslam3dmap" name="visualslam3dmap" type="node" output="screen"> + <remap from="image_head" to="/camera_head/color/image_head"/> + <remap from="image_torso" to="/camera_torso/color/image_torso"/> </node> <!-- launching Occupancy map (occupancymap) --> <node pkg="occupancymap" name="occupancymap" type="node" output="screen"> + <remap from="map_refined" to="/map_refined"/> </node> - <!-- launching Speech synthesis (speechsynthesis) --> - <node pkg="speechsynthesis" name="speechsynthesis" type="node" output="screen"> - </node> - - <!-- launching Fisheye stereo + RGB head (fisheyestereorgbhead) --> - <node pkg="fisheyestereorgbhead" name="fisheyestereorgbhead" type="node" output="screen"> - </node> - - <!-- launching respeaker_ros (respeaker_ros) --> - <node pkg="respeaker_ros" name="respeaker_ros" type="node" output="screen"> - <remap from="raw_audio" to="/audio/raw_audio"/> + <!-- launching Sound localisation (soundlocalisation) --> + <node pkg="soundlocalisation" name="soundlocalisation" type="node" output="screen"> </node> - <!-- launching Speaker recognition (speakerrecognition) --> - <node pkg="speakerrecognition" name="speakerrecognition" type="node" output="screen"> + <!-- launching RGB-D + camera_info (rgbdcamera_info) --> + <node pkg="rgbdcamera_info" name="rgbdcamera_info" type="node" output="screen"> + <remap from="image_raw" to="/camera_torso/color/image_raw"/> </node> - <!-- launching Visual SLAM + 3D map (visualslam3dmap) --> - <node pkg="visualslam3dmap" name="visualslam3dmap" type="node" output="screen"> + <!-- launching People 3D tracker (people3dtracker) --> + <node pkg="people3dtracker" name="people3dtracker" type="node" output="screen"> </node> - <!-- launching Robot GUI (robotgui) --> - <node pkg="robotgui" name="robotgui" type="node" output="screen"> + <!-- launching ASR (asr) --> + <node pkg="asr" name="asr" type="node" output="screen"> </node> - <!-- launching People 3D tracker (people3dtracker) --> - <node pkg="people3dtracker" name="people3dtracker" type="node" output="screen"> + <!-- launching Fisheye stereo + RGB head (fisheyestereorgbhead) --> + <node pkg="fisheyestereorgbhead" name="fisheyestereorgbhead" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> </node> <!-- launching Speech diarization (speechdiarization) --> <node pkg="speechdiarization" name="speechdiarization" type="node" output="screen"> </node> - <!-- launching ROS openpose (rosopenpose) --> - <node pkg="rosopenpose" name="rosopenpose" type="node" output="screen"> + <!-- launching Robot non-verbal behaviours (robotnonverbalbehaviours) --> + <node pkg="robotnonverbalbehaviours" name="robotnonverbalbehaviours" type="node" output="screen"> </node> <!-- launching Interaction manager (interactionmanager) --> <node pkg="interactionmanager" name="interactionmanager" type="node" output="screen"> </node> - <!-- launching RGB-D + camera_info (rgbdcamera_info) --> - <node pkg="rgbdcamera_info" name="rgbdcamera_info" type="node" output="screen"> + <!-- launching High-level planner (highlevelplanner) --> + <node pkg="highlevelplanner" name="highlevelplanner" type="node" output="screen"> </node> - <!-- launching ASR (asr) --> - <node pkg="asr" name="asr" type="node" output="screen"> + <!-- launching Robot functional layer (robotfunctionallayer) --> + <node pkg="robotfunctionallayer" name="robotfunctionallayer" type="node" output="screen"> </node> - <!-- launching Dialogue manager (dialoguemanager) --> - <node pkg="dialoguemanager" name="dialoguemanager" type="node" output="screen"> + <!-- launching Speaker recognition (speakerrecognition) --> + <node pkg="speakerrecognition" name="speakerrecognition" type="node" output="screen"> </node> - <!-- launching Scene understanding (sceneunderstanding) --> - <node pkg="sceneunderstanding" name="sceneunderstanding" type="node" output="screen"> + <!-- launching Robot GUI (robotgui) --> + <node pkg="robotgui" name="robotgui" type="node" output="screen"> </node> - <!-- launching Object detection/identification/localisation (objectdetectionidentificationlocalisation) --> - <node pkg="objectdetectionidentificationlocalisation" name="objectdetectionidentificationlocalisation" type="node" output="screen"> + <!-- launching Semantic mapping (semanticmapping) --> + <node pkg="semanticmapping" name="semanticmapping" type="node" output="screen"> </node> - <!-- launching High-level planner (highlevelplanner) --> - <node pkg="highlevelplanner" name="highlevelplanner" type="node" output="screen"> + <!-- launching respeaker_ros (respeaker_ros) --> + <node pkg="respeaker_ros" name="respeaker_ros" type="node" output="screen"> + <remap from="raw_audio" to="/audio/raw_audio"/> </node> - <!-- launching ORB SLAM (orbslam) --> - <node pkg="orbslam" name="orbslam" type="node" output="screen"> + <!-- launching Multi-people tracker (multipeopletracker) --> + <node pkg="multipeopletracker" name="multipeopletracker" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> + <remap from="body_roi" to="/humans/bodies/<id>/roi"/> </node> - <!-- launching Sound localisation (soundlocalisation) --> - <node pkg="soundlocalisation" name="soundlocalisation" type="node" output="screen"> + <!-- launching Robot utterances (robotutterances) --> + <node pkg="robotutterances" name="robotutterances" type="node" output="screen"> </node> - <!-- launching Semantic mapping (semanticmapping) --> - <node pkg="semanticmapping" name="semanticmapping" type="node" output="screen"> + <!-- launching Object detection/identification/localisation (objectdetectionidentificationlocalisation) --> + <node pkg="objectdetectionidentificationlocalisation" name="objectdetectionidentificationlocalisation" type="node" output="screen"> + <remap from="image_raw" to="/camera_head/color/image_raw"/> </node> - <!-- launching Person manager (personmanager) --> - <node pkg="personmanager" name="personmanager" type="node" output="screen"> + <!-- launching Dialogue manager (dialoguemanager) --> + <node pkg="dialoguemanager" name="dialoguemanager" type="node" output="screen"> + </node> + + <!-- launching ORB SLAM (orbslam) --> + <node pkg="orbslam" name="orbslam" type="node" output="screen"> + <remap from="image_raw" to="/camera_torso/color/image_raw"/> + <remap from="map" to="/map"/> + </node> + + <!-- launching ROS openpose (rosopenpose) --> + <node pkg="rosopenpose" name="rosopenpose" type="node" output="screen"> </node> diff --git a/spring-mock-ws/src/springarchitecture/package.xml b/spring-mock-ws/src/springarchitecture/package.xml index 770e1b7..d53047d 100644 --- a/spring-mock-ws/src/springarchitecture/package.xml +++ b/spring-mock-ws/src/springarchitecture/package.xml @@ -9,41 +9,41 @@ <license>BSD</license> <buildtool_depend>catkin</buildtool_depend> - <depend>userattention</depend> - <depend>multipeopletracker</depend> - <depend>maskdetection</depend> - <depend>robotnonverbalbehaviours</depend> - <depend>robotfunctionallayer</depend> - <depend>robotutterances</depend> - <depend>activityreco</depend> - <depend>occupancymap</depend> + <depend>sceneunderstanding</depend> + <depend>personmanager</depend> <depend>speechsynthesis</depend> - <depend>facedetection</depend> - <depend>fisheyestereorgbhead</depend> - <depend>demographics</depend> - <depend>respeaker_ros</depend> - <depend>facerecognition</depend> - <depend>speakerrecognition</depend> - <depend>usergaze</depend> - <depend>nonverbalbehaviours</depend> <depend>visualslam3dmap</depend> + <depend>occupancymap</depend> + <depend>soundlocalisation</depend> + <depend>userattention</depend> + <depend>rgbdcamera_info</depend> <depend>fformation</depend> - <depend>robotgui</depend> <depend>people3dtracker</depend> + <depend>asr</depend> + <depend>fisheyestereorgbhead</depend> + <depend>usergaze</depend> <depend>speechdiarization</depend> - <depend>rosopenpose</depend> + <depend>demographics</depend> + <depend>robotnonverbalbehaviours</depend> + <depend>nonverbalbehaviours</depend> <depend>interactionmanager</depend> - <depend>rgbdcamera_info</depend> - <depend>asr</depend> - <depend>dialoguemanager</depend> - <depend>sceneunderstanding</depend> - <depend>objectdetectionidentificationlocalisation</depend> <depend>highlevelplanner</depend> - <depend>orbslam</depend> + <depend>robotfunctionallayer</depend> + <depend>maskdetection</depend> + <depend>speakerrecognition</depend> <depend>body2dpose</depend> - <depend>soundlocalisation</depend> + <depend>robotgui</depend> <depend>semanticmapping</depend> - <depend>personmanager</depend> + <depend>activityreco</depend> + <depend>facedetection</depend> + <depend>respeaker_ros</depend> + <depend>multipeopletracker</depend> + <depend>robotutterances</depend> + <depend>objectdetectionidentificationlocalisation</depend> + <depend>dialoguemanager</depend> + <depend>orbslam</depend> + <depend>rosopenpose</depend> + <depend>facerecognition</depend> <export> diff --git a/spring-mock-ws/src/userattention/CMakeLists.txt b/spring-mock-ws/src/userattention/CMakeLists.txt index 562b923..671332b 100644 --- a/spring-mock-ws/src/userattention/CMakeLists.txt +++ b/spring-mock-ws/src/userattention/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/userattention/src/main.cpp b/spring-mock-ws/src/userattention/src/main.cpp index 56defb0..9f98f8e 100644 --- a/spring-mock-ws/src/userattention/src/main.cpp +++ b/spring-mock-ws/src/userattention/src/main.cpp @@ -25,48 +25,71 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void tfbodiesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("userattention: received message: " << msg); -} -void gazedirectionCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("userattention: received message: " << msg); -} -void inputCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("userattention: received message: " << msg); -} -void tffacesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("userattention: received message: " << msg); -} -void tfpersonsCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("userattention: received message: " << msg); -} +class UserAttention { + public: + UserAttention(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "userattention"); + // ATTENTION: this topic is not defined in the architecture design + tfpersons_sub_ = nh->subscribe("tfpersons", 1, &UserAttention::tfpersonsCallback, this); + // ATTENTION: this topic is not defined in the architecture design + tfbodies_sub_ = nh->subscribe("tfbodies", 1, &UserAttention::tfbodiesCallback, this); + // ATTENTION: this topic is not defined in the architecture design + gazedirection_sub_ = nh->subscribe("gazedirection", 1, &UserAttention::gazedirectionCallback, this); + // ATTENTION: this topic is not defined in the architecture design + input_sub_ = nh->subscribe("input", 1, &UserAttention::inputCallback, this); + // ATTENTION: this topic is not defined in the architecture design + tffaces_sub_ = nh->subscribe("tffaces", 1, &UserAttention::tffacesCallback, this); - ros::NodeHandle n; + // ATTENTION: this topic is not defined in the architecture design + output_pub_ = nh->advertise<std_msgs::Empty>("output", 1); + // ATTENTION: this topic is not defined in the architecture design + currentattentiveperson_pub_ = nh->advertise<std_msgs::Empty>("currentattentiveperson", 1); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber tfbodies_sub = n.subscribe("tfbodies", 1, tfbodiesCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber gazedirection_sub = n.subscribe("gazedirection", 1, gazedirectionCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber input_sub = n.subscribe("input", 1, inputCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber tffaces_sub = n.subscribe("tffaces", 1, tffacesCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber tfpersons_sub = n.subscribe("tfpersons", 1, tfpersonsCallback); + ~UserAttention() {} + + private: + void tfpersonsCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("userattention: received message: " << msg); + } + void tfbodiesCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("userattention: received message: " << msg); + } + void gazedirectionCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("userattention: received message: " << msg); + } + void inputCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("userattention: received message: " << msg); + } + void tffacesCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("userattention: received message: " << msg); + } + + ros::Subscriber tfpersons_sub_; + ros::Subscriber tfbodies_sub_; + ros::Subscriber gazedirection_sub_; + ros::Subscriber input_sub_; + ros::Subscriber tffaces_sub_; + + ros::Publisher output_pub_; + ros::Publisher currentattentiveperson_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "userattention"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher currentattentiveperson_pub = n.advertise<std_msgs::Empty>("currentattentiveperson", 1); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher output_pub = n.advertise<std_msgs::Empty>("output", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto userattention = UserAttention(&private_node_handle_); ROS_INFO("Node userattention launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/usergaze/CMakeLists.txt b/spring-mock-ws/src/usergaze/CMakeLists.txt index 2b3d726..4d55bf2 100644 --- a/spring-mock-ws/src/usergaze/CMakeLists.txt +++ b/spring-mock-ws/src/usergaze/CMakeLists.txt @@ -10,7 +10,6 @@ add_compile_options(-std=c++11) find_package(catkin REQUIRED COMPONENTS roscpp std_msgs - std_msgs ) ## System dependencies are found with CMake's conventions diff --git a/spring-mock-ws/src/usergaze/src/main.cpp b/spring-mock-ws/src/usergaze/src/main.cpp index 58dd40f..6f6e81a 100644 --- a/spring-mock-ws/src/usergaze/src/main.cpp +++ b/spring-mock-ws/src/usergaze/src/main.cpp @@ -25,28 +25,47 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" -void tffacesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("usergaze: received message: " << msg); -} -void imagesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("usergaze: received message: " << msg); -} +class UserGaze { + public: + UserGaze(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "usergaze"); + // ATTENTION: this topic is not defined in the architecture design + tffaces_sub_ = nh->subscribe("tffaces", 1, &UserGaze::tffacesCallback, this); + // ATTENTION: this topic is not defined in the architecture design + images_sub_ = nh->subscribe("images", 1, &UserGaze::imagesCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + gazedirection_pub_ = nh->advertise<std_msgs::Empty>("gazedirection", 1); + } + + ~UserGaze() {} - ros::NodeHandle n; + private: + void tffacesCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("usergaze: received message: " << msg); + } + void imagesCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("usergaze: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber tffaces_sub = n.subscribe("tffaces", 1, tffacesCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber images_sub = n.subscribe("images", 1, imagesCallback); + ros::Subscriber tffaces_sub_; + ros::Subscriber images_sub_; + + ros::Publisher gazedirection_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "usergaze"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher gazedirection_pub = n.advertise<std_msgs::Empty>("gazedirection", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto usergaze = UserGaze(&private_node_handle_); ROS_INFO("Node usergaze launched and ready."); ros::spin(); diff --git a/spring-mock-ws/src/visualslam3dmap/CMakeLists.txt b/spring-mock-ws/src/visualslam3dmap/CMakeLists.txt index 8f7cbc0..f2c088f 100644 --- a/spring-mock-ws/src/visualslam3dmap/CMakeLists.txt +++ b/spring-mock-ws/src/visualslam3dmap/CMakeLists.txt @@ -9,7 +9,7 @@ add_compile_options(-std=c++11) ## is used, also find other catkin packages find_package(catkin REQUIRED COMPONENTS roscpp - std_msgs + sensor_msgs std_msgs tf ) diff --git a/spring-mock-ws/src/visualslam3dmap/package.xml b/spring-mock-ws/src/visualslam3dmap/package.xml index 7f5f152..188e2a6 100644 --- a/spring-mock-ws/src/visualslam3dmap/package.xml +++ b/spring-mock-ws/src/visualslam3dmap/package.xml @@ -50,6 +50,7 @@ <!-- <doc_depend>doxygen</doc_depend> --> <buildtool_depend>catkin</buildtool_depend> <exec_depend>roscpp</exec_depend> + <depend>sensor_msgs</depend> <depend>std_msgs</depend> <depend>tf</depend> diff --git a/spring-mock-ws/src/visualslam3dmap/src/main.cpp b/spring-mock-ws/src/visualslam3dmap/src/main.cpp index 0d66256..531826c 100644 --- a/spring-mock-ws/src/visualslam3dmap/src/main.cpp +++ b/spring-mock-ws/src/visualslam3dmap/src/main.cpp @@ -25,29 +25,54 @@ #include "std_msgs/String.h" #include "std_msgs/Empty.h" #include "tf/transform_broadcaster.h" +#include "sensor_msgs/Image.h" -void localisationpriorCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("visualslam3dmap: received message: " << msg); -} -void imagesCallback(const std_msgs::Empty::ConstPtr& msg) -{ - ROS_INFO_STREAM("visualslam3dmap: received message: " << msg); -} +class VisualSlam3dMap { + public: + VisualSlam3dMap(ros::NodeHandle* nh) { -int main(int argc, char **argv) { - ros::init(argc, argv, "visualslam3dmap"); + // ATTENTION: this topic is not defined in the architecture design + localisationprior_sub_ = nh->subscribe("localisationprior", 1, &VisualSlam3dMap::localisationpriorCallback, this); + image_head_sub_ = nh->subscribe("image_head", 1, &VisualSlam3dMap::image_headCallback, this); + image_torso_sub_ = nh->subscribe("image_torso", 1, &VisualSlam3dMap::image_torsoCallback, this); + + // ATTENTION: this topic is not defined in the architecture design + dense3dmap_pub_ = nh->advertise<std_msgs::Empty>("dense3dmap", 1); + } + + ~VisualSlam3dMap() {} - ros::NodeHandle n; + private: + void localisationpriorCallback(const std_msgs::Empty::ConstPtr& msg) + { + ROS_INFO_STREAM("visualslam3dmap: received message: " << msg); + } + void image_headCallback(const sensor_msgs::Image::ConstPtr& msg) + { + ROS_INFO_STREAM("visualslam3dmap: received message: " << msg); + } + void image_torsoCallback(const sensor_msgs::Image::ConstPtr& msg) + { + ROS_INFO_STREAM("visualslam3dmap: received message: " << msg); + } - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber localisationprior_sub = n.subscribe("localisationprior", 1, localisationpriorCallback); - // ATTENTION: this topic is not defined in the architecture design - ros::Subscriber images_sub = n.subscribe("images", 1, imagesCallback); + ros::Subscriber localisationprior_sub_; + ros::Subscriber image_head_sub_; + ros::Subscriber image_torso_sub_; + + ros::Publisher dense3dmap_pub_; + +}; + +int main(int argc, char** argv) { + ros::init(argc, argv, "visualslam3dmap"); - // ATTENTION: this topic is not defined in the architecture design - ros::Publisher dense3dmap_pub = n.advertise<std_msgs::Empty>("dense3dmap", 1); + // Initialize node parameters from launch file or command line. + // Use a private node handle so that multiple instances of the node can be + // run simultaneously while using different parameters. + ros::NodeHandle private_node_handle_("~"); + auto visualslam3dmap = VisualSlam3dMap(&private_node_handle_); ROS_INFO("Node visualslam3dmap launched and ready."); ros::spin(); -- GitLab