From aec0c193c5d8c9d09b787b38c2008307619c1174 Mon Sep 17 00:00:00 2001 From: Kayman Date: Wed, 28 Mar 2018 16:16:42 +0900 Subject: [PATCH 01/18] changed CMakeLists.txt --- ball_detector/CMakeLists.txt | 20 +++++++++++++++++++- op3_demo/CMakeLists.txt | 26 +++++++++++++++++++++++--- 2 files changed, 42 insertions(+), 4 deletions(-) diff --git a/ball_detector/CMakeLists.txt b/ball_detector/CMakeLists.txt index a79af76..09858b1 100644 --- a/ball_detector/CMakeLists.txt +++ b/ball_detector/CMakeLists.txt @@ -19,6 +19,23 @@ find_package(catkin REQUIRED COMPONENTS message_generation ) +## Resolve system dependency on yaml-cpp, which apparently does not +## provide a CMake find_package() module. +find_package(PkgConfig REQUIRED) +pkg_check_modules(YAML_CPP REQUIRED yaml-cpp) +find_path(YAML_CPP_INCLUDE_DIR + NAMES yaml_cpp.h + PATHS ${YAML_CPP_INCLUDE_DIRS} +) +find_library(YAML_CPP_LIBRARY + NAMES YAML_CPP + PATHS ${YAML_CPP_LIBRARY_DIRS} +) +link_directories(${YAML_CPP_LIBRARY_DIRS}) + +if(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") +add_definitions(-DHAVE_NEW_YAMLCPP) +endif(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") ################################################################################ # Declare ROS messages, services and actions ################################################################################ @@ -59,6 +76,7 @@ catkin_package( include_directories( include ${catkin_INCLUDE_DIRS} + ${YAML_CPP_INCLUDE_DIRS} ) add_executable(ball_detector_node @@ -69,7 +87,7 @@ add_dependencies(ball_detector_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin target_link_libraries(ball_detector_node ${catkin_LIBRARIES} - yaml-cpp + ${YAML_CPP_LIBRARIES} ) ################################################################################ diff --git a/op3_demo/CMakeLists.txt b/op3_demo/CMakeLists.txt index 4615615..b721d98 100644 --- a/op3_demo/CMakeLists.txt +++ b/op3_demo/CMakeLists.txt @@ -19,8 +19,25 @@ find_package(catkin REQUIRED COMPONENTS robotis_math ) -find_package(Eigen REQUIRED) +find_package(Eigen3 REQUIRED) + +## Resolve system dependency on yaml-cpp, which apparently does not +## provide a CMake find_package() module. +find_package(PkgConfig REQUIRED) +pkg_check_modules(YAML_CPP REQUIRED yaml-cpp) +find_path(YAML_CPP_INCLUDE_DIR + NAMES yaml_cpp.h + PATHS ${YAML_CPP_INCLUDE_DIRS} +) +find_library(YAML_CPP_LIBRARY + NAMES YAML_CPP + PATHS ${YAML_CPP_LIBRARY_DIRS} +) +link_directories(${YAML_CPP_LIBRARY_DIRS}) +if(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") +add_definitions(-DHAVE_NEW_YAMLCPP) +endif(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") ################################################################################ # Declare ROS messages, services and actions @@ -36,6 +53,7 @@ find_package(Eigen REQUIRED) catkin_package( INCLUDE_DIRS include CATKIN_DEPENDS roscpp sensor_msgs + DEPENDS EIGEN3 ) ################################################################################ @@ -44,7 +62,8 @@ catkin_package( include_directories( include ${catkin_INCLUDE_DIRS} - ${Eigen_INCLUDE_DIRS} + ${EIGEN3_INCLUDE_DIRS} + ${YAML_CPP_INCLUDE_DIRS} ) add_executable(op_demo_node @@ -80,7 +99,8 @@ add_dependencies(self_test_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXP target_link_libraries(self_test_node ${catkin_LIBRARIES} - yaml-cpp + ${Eigen3_LIBRARIES} + ${YAML_CPP_LIBRARIES} ) ################################################################################ From 25c569c91121caa6eff356850cf66b099437cb6d Mon Sep 17 00:00:00 2001 From: Kayman Date: Wed, 28 Mar 2018 16:26:25 +0900 Subject: [PATCH 02/18] fixed CMakeLists.txt --- ball_detector/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/ball_detector/CMakeLists.txt b/ball_detector/CMakeLists.txt index 09858b1..1456418 100644 --- a/ball_detector/CMakeLists.txt +++ b/ball_detector/CMakeLists.txt @@ -12,6 +12,7 @@ find_package(catkin REQUIRED COMPONENTS cv_bridge geometry_msgs image_transport + cmake_modules roscpp rospy std_msgs From a6ca620b7be33258673f2bcf5fede90758c85d10 Mon Sep 17 00:00:00 2001 From: Kayman Date: Wed, 28 Mar 2018 16:46:38 +0900 Subject: [PATCH 03/18] added cmake_modules for test. --- ball_detector/CMakeLists.txt | 2 +- ball_detector/package.xml | 2 ++ op3_demo/CMakeLists.txt | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ball_detector/CMakeLists.txt b/ball_detector/CMakeLists.txt index 1456418..a81a3d7 100644 --- a/ball_detector/CMakeLists.txt +++ b/ball_detector/CMakeLists.txt @@ -68,7 +68,7 @@ generate_dynamic_reconfigure_options(cfg/detector_params.cfg) ################################################################################ catkin_package( INCLUDE_DIRS include - CATKIN_DEPENDS cv_bridge geometry_msgs image_transport roscpp rospy std_msgs dynamic_reconfigure + CATKIN_DEPENDS cv_bridge cmake_modules geometry_msgs image_transport roscpp rospy std_msgs dynamic_reconfigure ) ################################################################################ diff --git a/ball_detector/package.xml b/ball_detector/package.xml index 79f988f..25ce8ce 100644 --- a/ball_detector/package.xml +++ b/ball_detector/package.xml @@ -19,6 +19,7 @@ roscpp rospy std_msgs + cmake_modules dynamic_reconfigure message_generation roslib @@ -28,6 +29,7 @@ roscpp rospy std_msgs + cmake_modules dynamic_reconfigure message_runtime diff --git a/op3_demo/CMakeLists.txt b/op3_demo/CMakeLists.txt index b721d98..d002446 100644 --- a/op3_demo/CMakeLists.txt +++ b/op3_demo/CMakeLists.txt @@ -52,7 +52,7 @@ endif(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") ################################################################################ catkin_package( INCLUDE_DIRS include - CATKIN_DEPENDS roscpp sensor_msgs + CATKIN_DEPENDS roscpp sensor_msgs cmake_modules DEPENDS EIGEN3 ) From 15ad67a9a1ce473ac8fd096db7b19319fc66ab65 Mon Sep 17 00:00:00 2001 From: Kayman Date: Wed, 28 Mar 2018 16:59:31 +0900 Subject: [PATCH 04/18] fixed CMakeLists.txt and package.xml --- ball_detector/CMakeLists.txt | 3 +-- ball_detector/package.xml | 31 ++++++++++++------------------- op3_demo/package.xml | 29 +++++++++++------------------ 3 files changed, 24 insertions(+), 39 deletions(-) diff --git a/ball_detector/CMakeLists.txt b/ball_detector/CMakeLists.txt index a81a3d7..09858b1 100644 --- a/ball_detector/CMakeLists.txt +++ b/ball_detector/CMakeLists.txt @@ -12,7 +12,6 @@ find_package(catkin REQUIRED COMPONENTS cv_bridge geometry_msgs image_transport - cmake_modules roscpp rospy std_msgs @@ -68,7 +67,7 @@ generate_dynamic_reconfigure_options(cfg/detector_params.cfg) ################################################################################ catkin_package( INCLUDE_DIRS include - CATKIN_DEPENDS cv_bridge cmake_modules geometry_msgs image_transport roscpp rospy std_msgs dynamic_reconfigure + CATKIN_DEPENDS cv_bridge geometry_msgs image_transport roscpp rospy std_msgs dynamic_reconfigure ) ################################################################################ diff --git a/ball_detector/package.xml b/ball_detector/package.xml index 25ce8ce..e0d63a5 100644 --- a/ball_detector/package.xml +++ b/ball_detector/package.xml @@ -12,24 +12,17 @@ Pyo catkin - roslib - cv_bridge - geometry_msgs - image_transport - roscpp - rospy - std_msgs - cmake_modules - dynamic_reconfigure + roslib + cv_bridge + geometry_msgs + image_transport + roscpp + rospy + std_msgs + cmake_modules + dynamic_reconfigure + yaml-cpp message_generation - roslib - cv_bridge - geometry_msgs - image_transport - roscpp - rospy - std_msgs - cmake_modules - dynamic_reconfigure - message_runtime + message_runtime + message_runtime diff --git a/op3_demo/package.xml b/op3_demo/package.xml index 68baa53..ccc8d31 100644 --- a/op3_demo/package.xml +++ b/op3_demo/package.xml @@ -11,22 +11,15 @@ Pyo catkin - roscpp - roslib - sensor_msgs - ball_detector - robotis_controller_msgs - op3_walking_module_msgs - op3_action_module_msgs - cmake_modules - robotis_math - roscpp - roslib - sensor_msgs - ball_detector - robotis_controller_msgs - op3_walking_module_msgs - op3_action_module_msgs - cmake_modules - robotis_math + roscpp + roslib + sensor_msgs + ball_detector + robotis_controller_msgs + op3_walking_module_msgs + op3_action_module_msgs + cmake_modules + robotis_math + eigen + yaml-cpp From ad3be190eab099eb18dd05eab0e432982f9a3f97 Mon Sep 17 00:00:00 2001 From: Kayman Date: Wed, 28 Mar 2018 17:04:39 +0900 Subject: [PATCH 05/18] fixed wrong syntax --- ball_detector/package.xml | 2 +- op3_demo/package.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ball_detector/package.xml b/ball_detector/package.xml index e0d63a5..c612c4f 100644 --- a/ball_detector/package.xml +++ b/ball_detector/package.xml @@ -1,5 +1,5 @@ - + ball_detector 0.1.0 diff --git a/op3_demo/package.xml b/op3_demo/package.xml index ccc8d31..cff56e8 100644 --- a/op3_demo/package.xml +++ b/op3_demo/package.xml @@ -1,5 +1,5 @@ - + op3_demo 0.1.0 From 7106ae6bddabe8caf4aa362cd75be3fabd3da9ca Mon Sep 17 00:00:00 2001 From: Kayman Date: Wed, 28 Mar 2018 17:22:08 +0900 Subject: [PATCH 06/18] test for dynamic reconfigure settting --- ball_detector/package.xml | 6 ++++-- op3_demo/package.xml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ball_detector/package.xml b/ball_detector/package.xml index c612c4f..47af0d6 100644 --- a/ball_detector/package.xml +++ b/ball_detector/package.xml @@ -1,7 +1,7 @@ ball_detector - 0.1.0 + 0.1.1 This package implements a circle-like shape detector of the input image. It requires and input image and publish, at frame rate, a marked image @@ -20,9 +20,11 @@ rospy std_msgs cmake_modules - dynamic_reconfigure yaml-cpp message_generation message_runtime message_runtime + dynamic_reconfigure + dynamic_reconfigure + dynamic_reconfigure diff --git a/op3_demo/package.xml b/op3_demo/package.xml index cff56e8..70af22d 100644 --- a/op3_demo/package.xml +++ b/op3_demo/package.xml @@ -1,7 +1,7 @@ op3_demo - 0.1.0 + 0.1.1 op3 default demo It includes three demontrations(soccer demo, vision demo, action script demo) From 8742227fa076b43469d73f61c751832a139e2859 Mon Sep 17 00:00:00 2001 From: Pyo Date: Wed, 28 Mar 2018 19:36:08 +0900 Subject: [PATCH 07/18] added gencfg to generate dynamic reconfigure --- ball_detector/CMakeLists.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ball_detector/CMakeLists.txt b/ball_detector/CMakeLists.txt index 09858b1..d97925a 100644 --- a/ball_detector/CMakeLists.txt +++ b/ball_detector/CMakeLists.txt @@ -83,8 +83,7 @@ add_executable(ball_detector_node src/ball_detector.cpp src/ball_detector_node.cpp) -add_dependencies(ball_detector_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) - +add_dependencies(ball_detector_node ${PROJECT_NAME}_gencfg ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) target_link_libraries(ball_detector_node ${catkin_LIBRARIES} ${YAML_CPP_LIBRARIES} From f0051d7182270df293b4038ac9cea71cdf9872cb Mon Sep 17 00:00:00 2001 From: Pyo Date: Wed, 28 Mar 2018 20:16:30 +0900 Subject: [PATCH 08/18] Update and rename detector_params.cfg to DetectorParams.cfg --- ball_detector/cfg/{detector_params.cfg => DetectorParams.cfg} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename ball_detector/cfg/{detector_params.cfg => DetectorParams.cfg} (97%) diff --git a/ball_detector/cfg/detector_params.cfg b/ball_detector/cfg/DetectorParams.cfg similarity index 97% rename from ball_detector/cfg/detector_params.cfg rename to ball_detector/cfg/DetectorParams.cfg index 2d61d6c..1d3e29c 100755 --- a/ball_detector/cfg/detector_params.cfg +++ b/ball_detector/cfg/DetectorParams.cfg @@ -30,4 +30,4 @@ gen.add("filter2_v_max",int_t , -1, "Threshold of V filter", 255, 0, 255) gen.add("ellipse_size",int_t , -1, "Ellipse size", 2, 1, 9) gen.add("debug_image", bool_t, 0, "Show filtered image to debug", False) -exit(gen.generate(PACKAGE, "ball_detector_node", "detectorParams")) +exit(gen.generate(PACKAGE, "ball_detector_node", "DetectorParams")) From b14d9c5ad1d5c4ade055a6ba6685ad6f6d54a080 Mon Sep 17 00:00:00 2001 From: Pyo Date: Wed, 28 Mar 2018 20:18:19 +0900 Subject: [PATCH 09/18] Update ball_detector.h --- ball_detector/include/ball_detector/ball_detector.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/ball_detector/include/ball_detector/ball_detector.h b/ball_detector/include/ball_detector/ball_detector.h index b246ff3..18cf79f 100644 --- a/ball_detector/include/ball_detector/ball_detector.h +++ b/ball_detector/include/ball_detector/ball_detector.h @@ -37,7 +37,7 @@ #include "ball_detector/circleSetStamped.h" #include "ball_detector/ball_detector_config.h" -#include "ball_detector/detectorParamsConfig.h" +#include "ball_detector/DetectorParamsConfig.h" #include "ball_detector/GetParameters.h" #include "ball_detector/SetParameters.h" @@ -71,7 +71,7 @@ class BallDetector //callbacks to camera info subscription void cameraInfoCallback(const sensor_msgs::CameraInfo & msg); - void dynParamCallback(ball_detector::detectorParamsConfig &config, uint32_t level); + void dynParamCallback(ball_detector::DetectorParamsConfig &config, uint32_t level); void enableCallback(const std_msgs::Bool::ConstPtr &msg); void paramCommandCallback(const std_msgs::String::ConstPtr &msg); @@ -154,8 +154,8 @@ class BallDetector cv::Mat in_image_; cv::Mat out_image_; - dynamic_reconfigure::Server param_server_; - dynamic_reconfigure::Server::CallbackType callback_fnc_; + dynamic_reconfigure::Server param_server_; + dynamic_reconfigure::Server::CallbackType callback_fnc_; }; } // namespace robotis_op From c7ad70b6a39ee98ba3156fa8e5f8c580edea3f17 Mon Sep 17 00:00:00 2001 From: Pyo Date: Wed, 28 Mar 2018 20:39:01 +0900 Subject: [PATCH 10/18] Update CMakeLists.txt --- ball_detector/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ball_detector/CMakeLists.txt b/ball_detector/CMakeLists.txt index d97925a..57f6e27 100644 --- a/ball_detector/CMakeLists.txt +++ b/ball_detector/CMakeLists.txt @@ -59,7 +59,7 @@ generate_messages( ################################################################################ # Declare ROS dynamic reconfigure parameters ################################################################################ -generate_dynamic_reconfigure_options(cfg/detector_params.cfg) +generate_dynamic_reconfigure_options(cfg/DetectorParams.cfg) ################################################################################ From 2122f8c493042fbaae8c36899bb686e083f6b5a8 Mon Sep 17 00:00:00 2001 From: Pyo Date: Wed, 28 Mar 2018 20:50:53 +0900 Subject: [PATCH 11/18] Update ball_detector.cpp --- ball_detector/src/ball_detector.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ball_detector/src/ball_detector.cpp b/ball_detector/src/ball_detector.cpp index df4fe80..552c699 100644 --- a/ball_detector/src/ball_detector.cpp +++ b/ball_detector/src/ball_detector.cpp @@ -234,7 +234,7 @@ void BallDetector::imageCallback(const sensor_msgs::ImageConstPtr & msg) return; } -void BallDetector::dynParamCallback(ball_detector::detectorParamsConfig &config, uint32_t level) +void BallDetector::dynParamCallback(ball_detector::DetectorParamsConfig &config, uint32_t level) { params_config_.gaussian_blur_size = config.gaussian_blur_size; params_config_.gaussian_blur_sigma = config.gaussian_blur_sigma; From 014a28cd8f1118d94c153343a93c0878fe39cc84 Mon Sep 17 00:00:00 2001 From: Pyo Date: Mon, 2 Apr 2018 08:25:00 +0900 Subject: [PATCH 12/18] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2387548..51875b9 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## ROBOTIS OP3 +# ROBOTIS OP3 ## ROS Packages for ROBOTIS OP3 Demo From 66f3b91ce95ea77910bd0b41b8d8158e87e51377 Mon Sep 17 00:00:00 2001 From: Kayman Date: Mon, 16 Apr 2018 17:47:15 +0900 Subject: [PATCH 13/18] merged with master added op3_bringup package --- .robotis_op3_demo.rosinstall | 2 + .travis.yml | 5 +- README.md | 34 ++ ball_detector/CHANGELOG.rst | 12 + ball_detector/CMakeLists.txt | 69 +++- ...params_blue.cfg => DetectorParamsBlue.cfg} | 2 +- ...r_params_red.cfg => DetectorParamsRed.cfg} | 2 +- .../ball_detector_params.yaml | 0 .../ball_detector_params_default.yaml | 0 .../ball_detector_params_op.yaml | 0 .../include/ball_detector/ball_detector.h | 21 +- ball_detector/launch/ball_detector.launch | 16 +- .../launch/ball_detector_from_usb_cam.launch | 45 ++- .../launch/ball_detector_from_uvc.launch | 50 +-- ball_detector/package.xml | 35 +- .../{launch => rviz}/ball_detector.rviz | 0 ball_detector/src/ball_detector.cpp | 5 +- op3_bringup/CMakeLists.txt | 195 ++++++++++ op3_bringup/launch/op3_bringup.launch | 15 + .../launch/op3_bringup_visualization.launch | 18 + op3_bringup/package.xml | 59 +++ op3_bringup/rviz/op3_bringup.rviz | 348 ++++++++++++++++++ op3_demo/CHANGELOG.rst | 12 + op3_demo/CMakeLists.txt | 91 ++--- op3_demo/include/op3_demo/action_demo.h | 6 +- op3_demo/include/op3_demo/ball_follower.h | 6 +- op3_demo/include/op3_demo/ball_tracker.h | 9 +- op3_demo/include/op3_demo/button_test.h | 4 +- op3_demo/include/op3_demo/face_tracker.h | 3 +- op3_demo/include/op3_demo/mic_test.h | 4 +- op3_demo/include/op3_demo/soccer_demo.h | 11 +- op3_demo/include/op3_demo/vision_demo.h | 9 +- op3_demo/launch/demo.launch | 2 - op3_demo/launch/face_detection_op3.launch | 20 +- op3_demo/launch/self_test.launch | 37 +- op3_demo/list/action_script.yaml | 23 ++ .../{script => list}/action_script_bk.yaml | 20 +- op3_demo/package.xml | 23 +- op3_demo/script/action_script.yaml | 23 -- op3_demo/src/action/action_demo.cpp | 2 +- op3_demo/src/demo_node.cpp | 2 +- op3_demo/src/soccer/ball_tracker.cpp | 2 +- op3_demo/src/test/button_test.cpp | 2 +- op3_demo/src/test/mic_test.cpp | 4 +- op3_demo/src/test_node.cpp | 2 +- robotis_op3_demo/CHANGELOG.rst | 12 + robotis_op3_demo/CMakeLists.txt | 2 +- robotis_op3_demo/package.xml | 23 +- 48 files changed, 1024 insertions(+), 263 deletions(-) create mode 100644 .robotis_op3_demo.rosinstall create mode 100644 README.md create mode 100644 ball_detector/CHANGELOG.rst rename ball_detector/cfg/{detector_params_blue.cfg => DetectorParamsBlue.cfg} (96%) mode change 100755 => 100644 rename ball_detector/cfg/{detector_params_red.cfg => DetectorParamsRed.cfg} (96%) mode change 100755 => 100644 rename ball_detector/{launch => config}/ball_detector_params.yaml (100%) rename ball_detector/{launch => config}/ball_detector_params_default.yaml (100%) rename ball_detector/{launch => config}/ball_detector_params_op.yaml (100%) rename ball_detector/{launch => rviz}/ball_detector.rviz (100%) create mode 100644 op3_bringup/CMakeLists.txt create mode 100644 op3_bringup/launch/op3_bringup.launch create mode 100644 op3_bringup/launch/op3_bringup_visualization.launch create mode 100644 op3_bringup/package.xml create mode 100644 op3_bringup/rviz/op3_bringup.rviz create mode 100644 op3_demo/CHANGELOG.rst create mode 100644 op3_demo/list/action_script.yaml rename op3_demo/{script => list}/action_script_bk.yaml (72%) delete mode 100644 op3_demo/script/action_script.yaml create mode 100644 robotis_op3_demo/CHANGELOG.rst diff --git a/.robotis_op3_demo.rosinstall b/.robotis_op3_demo.rosinstall new file mode 100644 index 0000000..146fa30 --- /dev/null +++ b/.robotis_op3_demo.rosinstall @@ -0,0 +1,2 @@ +- git: {local-name: robotis_op3_tools, uri: 'https://github.com/ROBOTIS-GIT/ROBOTIS-OP3-Tools.git', version: master} +- git: {local-name: humanoid_navigation, uri: 'https://github.com/ROBOTIS-GIT/humanoid_navigation.git', version: master} \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index 07bc3c6..9316a80 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,14 +12,15 @@ compiler: - gcc notifications: email: - on_success: always + on_success: change on_failure: always recipients: - pyo@robotis.com env: matrix: - - ROS_DISTRO=kinetic ROS_REPO=ros-shadow-fixed UPSTREAM_WORKSPACE=debian +# - ROS_DISTRO=kinetic ROS_REPO=ros-shadow-fixed UPSTREAM_WORKSPACE=debian # - ROS_DISTRO=kinetic ROS_REPO=ros-shadow-fixed UPSTREAM_WORKSPACE=debian OS_NAME=debian OS_CODE_NAME=jessie + - ROS_DISTRO=kinetic ROS_REPO=ros-shadow-fixed UPSTREAM_WORKSPACE=file $ROSINSTALL_FILENAME=".robotis_op3_demo.rosinstall" branches: only: - master diff --git a/README.md b/README.md new file mode 100644 index 0000000..51875b9 --- /dev/null +++ b/README.md @@ -0,0 +1,34 @@ +# ROBOTIS OP3 + + +## ROS Packages for ROBOTIS OP3 Demo +|Version|Kinetic + Ubuntu Xenial|Melodic + Ubuntu Bionic| +|:---:|:---:|:---:| +|[![GitHub version](https://badge.fury.io/gh/ROBOTIS-GIT%2FROBOTIS-OP3-Demo.svg)](https://badge.fury.io/gh/ROBOTIS-GIT%2FROBOTIS-OP3-Demo)|[![Build Status](https://travis-ci.org/ROBOTIS-GIT/ROBOTIS-OP3-Demo.svg?branch=kinetic-devel)](https://travis-ci.org/ROBOTIS-GIT/ROBOTIS-OP3-Demo)|-| + +## ROBOTIS e-Manual for ROBOTIS OP3 +- [ROBOTIS e-Manual for ROBOTIS OP3](http://emanual.robotis.com/docs/en/platform/op3/introduction/) + +## Wiki for robotis_op3_demo Packages +- http://wiki.ros.org/robotis_op3_demo (metapackage) +- http://wiki.ros.org/ball_detector +- http://wiki.ros.org/op3_demo + +## Open Source related to ROBOTIS OP3 +- [robotis_op3](https://github.com/ROBOTIS-GIT/ROBOTIS-OP3) +- [robotis_op3_msgs](https://github.com/ROBOTIS-GIT/ROBOTIS-OP3-msgs) +- [robotis_op3_common](https://github.com/ROBOTIS-GIT/ROBOTIS-OP3-Common) +- [robotis_op3_tools](https://github.com/ROBOTIS-GIT/ROBOTIS-OP3-Tools) +- [robotis_op3_demo](https://github.com/ROBOTIS-GIT/ROBOTIS-OP3-Demo) +- [robotis_framework](https://github.com/ROBOTIS-GIT/ROBOTIS-Framework) +- [robotis_controller_msgs](https://github.com/ROBOTIS-GIT/ROBOTIS-Framework-msgs) +- [robotis_utility](https://github.com/ROBOTIS-GIT/ROBOTIS-Utility) +- [robotis_math](https://github.com/ROBOTIS-GIT/ROBOTIS-Math) +- [dynamixel_sdk](https://github.com/ROBOTIS-GIT/DynamixelSDK) +- [OpenCR-Hardware](https://github.com/ROBOTIS-GIT/OpenCR-Hardware) +- [OpenCR](https://github.com/ROBOTIS-GIT/OpenCR) + +## Documents and Videos related to ROBOTIS OP3 +- [ROBOTIS e-Manual for ROBOTIS OP3](http://emanual.robotis.com/docs/en/platform/op3/introduction/) +- [ROBOTIS e-Manual for ROBOTIS Framework](http://emanual.robotis.com/docs/en/software/robotis_framework_packages/) +- [ROBOTIS e-Manual for Dynamixel SDK](http://emanual.robotis.com/docs/en/software/dynamixel/dynamixel_sdk/overview/) diff --git a/ball_detector/CHANGELOG.rst b/ball_detector/CHANGELOG.rst new file mode 100644 index 0000000..5d3764c --- /dev/null +++ b/ball_detector/CHANGELOG.rst @@ -0,0 +1,12 @@ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Changelog for package ball_detector +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +0.1.0 (2018-03-30) +------------------ +* first release +* added launch files in order to move the camera setting to op3_camera_setting package +* added missing package in find_package() +* refacoring to release +* splited repositoryfrom ROBOTIS-OP3 +* Contributors: Kayman, Zerom, Pyo diff --git a/ball_detector/CMakeLists.txt b/ball_detector/CMakeLists.txt index 57f6e27..d2acc5e 100644 --- a/ball_detector/CMakeLists.txt +++ b/ball_detector/CMakeLists.txt @@ -1,26 +1,30 @@ ################################################################################ -# CMake +# Set minimum required version of cmake, project name and compile options ################################################################################ cmake_minimum_required(VERSION 2.8.3) project(ball_detector) ################################################################################ -# Packages +# Find catkin packages and libraries for catkin and system dependencies ################################################################################ find_package(catkin REQUIRED COMPONENTS - roslib - cv_bridge - geometry_msgs - image_transport roscpp - rospy + roslib std_msgs + sensor_msgs + geometry_msgs dynamic_reconfigure + cv_bridge + image_transport message_generation ) +find_package(Boost REQUIRED COMPONENTS thread) +find_package(OpenCV 3 REQUIRED) + ## Resolve system dependency on yaml-cpp, which apparently does not ## provide a CMake find_package() module. +## Insert your header file compatible specified path like '#include ' find_package(PkgConfig REQUIRED) pkg_check_modules(YAML_CPP REQUIRED yaml-cpp) find_path(YAML_CPP_INCLUDE_DIR @@ -36,12 +40,17 @@ link_directories(${YAML_CPP_LIBRARY_DIRS}) if(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") add_definitions(-DHAVE_NEW_YAMLCPP) endif(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") + +################################################################################ +# Setup for python modules and scripts +################################################################################ + ################################################################################ # Declare ROS messages, services and actions ################################################################################ add_message_files( FILES - circleSetStamped.msg + CircleSetStamped.msg BallDetectorParams.msg ) @@ -53,21 +62,34 @@ add_service_files( generate_messages( DEPENDENCIES - geometry_msgs std_msgs + std_msgs + geometry_msgs ) ################################################################################ # Declare ROS dynamic reconfigure parameters ################################################################################ -generate_dynamic_reconfigure_options(cfg/DetectorParams.cfg) +generate_dynamic_reconfigure_options( + cfg/DetectorParams.cfg +) ################################################################################ -# Catkin specific configuration -################################################################################ +# Declare catkin specific configuration to be passed to dependent projects +################################################################################## catkin_package( INCLUDE_DIRS include - CATKIN_DEPENDS cv_bridge geometry_msgs image_transport roscpp rospy std_msgs dynamic_reconfigure + CATKIN_DEPENDS + roscpp + roslib + std_msgs + sensor_msgs + geometry_msgs + dynamic_reconfigure + cv_bridge + image_transport + message_runtime + DEPENDS Boost OpenCV ) ################################################################################ @@ -76,22 +98,39 @@ catkin_package( include_directories( include ${catkin_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} + ${OpenCV_INCLUDE_DIRS} ${YAML_CPP_INCLUDE_DIRS} ) add_executable(ball_detector_node src/ball_detector.cpp - src/ball_detector_node.cpp) + src/ball_detector_node.cpp +) + +add_dependencies(ball_detector_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) -add_dependencies(ball_detector_node ${PROJECT_NAME}_gencfg ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) target_link_libraries(ball_detector_node ${catkin_LIBRARIES} + ${Boost_LIBRARIES} + ${OpenCV_LIBRARIES} ${YAML_CPP_LIBRARIES} ) ################################################################################ # Install ################################################################################ +install(TARGETS ball_detector_node + RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +) + +install(DIRECTORY include/${PROJECT_NAME}/ + DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +) + +install(DIRECTORY config launch rviz + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) ################################################################################ # Test diff --git a/ball_detector/cfg/detector_params_blue.cfg b/ball_detector/cfg/DetectorParamsBlue.cfg old mode 100755 new mode 100644 similarity index 96% rename from ball_detector/cfg/detector_params_blue.cfg rename to ball_detector/cfg/DetectorParamsBlue.cfg index 2d61d6c..b9bd967 --- a/ball_detector/cfg/detector_params_blue.cfg +++ b/ball_detector/cfg/DetectorParamsBlue.cfg @@ -30,4 +30,4 @@ gen.add("filter2_v_max",int_t , -1, "Threshold of V filter", 255, 0, 255) gen.add("ellipse_size",int_t , -1, "Ellipse size", 2, 1, 9) gen.add("debug_image", bool_t, 0, "Show filtered image to debug", False) -exit(gen.generate(PACKAGE, "ball_detector_node", "detectorParams")) +exit(gen.generate(PACKAGE, "ball_detector_node", "DetectorParamsBlue")) diff --git a/ball_detector/cfg/detector_params_red.cfg b/ball_detector/cfg/DetectorParamsRed.cfg old mode 100755 new mode 100644 similarity index 96% rename from ball_detector/cfg/detector_params_red.cfg rename to ball_detector/cfg/DetectorParamsRed.cfg index 4fa6a18..79d08a2 --- a/ball_detector/cfg/detector_params_red.cfg +++ b/ball_detector/cfg/DetectorParamsRed.cfg @@ -30,4 +30,4 @@ gen.add("filter2_v_max",int_t , -1, "Threshold of V filter", 255, 0, 255) gen.add("ellipse_size",int_t , -1, "Ellipse size", 5, 1, 9) gen.add("debug_image", bool_t, 0, "Show filtered image to debug", False) -exit(gen.generate(PACKAGE, "ball_detector_node", "detectorParams")) +exit(gen.generate(PACKAGE, "ball_detector_node", "DetectorParamsRed")) diff --git a/ball_detector/launch/ball_detector_params.yaml b/ball_detector/config/ball_detector_params.yaml similarity index 100% rename from ball_detector/launch/ball_detector_params.yaml rename to ball_detector/config/ball_detector_params.yaml diff --git a/ball_detector/launch/ball_detector_params_default.yaml b/ball_detector/config/ball_detector_params_default.yaml similarity index 100% rename from ball_detector/launch/ball_detector_params_default.yaml rename to ball_detector/config/ball_detector_params_default.yaml diff --git a/ball_detector/launch/ball_detector_params_op.yaml b/ball_detector/config/ball_detector_params_op.yaml similarity index 100% rename from ball_detector/launch/ball_detector_params_op.yaml rename to ball_detector/config/ball_detector_params_op.yaml diff --git a/ball_detector/include/ball_detector/ball_detector.h b/ball_detector/include/ball_detector/ball_detector.h index 18cf79f..96a9981 100644 --- a/ball_detector/include/ball_detector/ball_detector.h +++ b/ball_detector/include/ball_detector/ball_detector.h @@ -21,23 +21,26 @@ #include -#include -#include - -//ros dependencies #include #include #include #include -#include -#include #include #include #include +#include +#include + +#include +#include +#include +#include -#include "ball_detector/circleSetStamped.h" -#include "ball_detector/ball_detector_config.h" #include "ball_detector/DetectorParamsConfig.h" + +#include "ball_detector/ball_detector_config.h" + +#include "ball_detector/CircleSetStamped.h" #include "ball_detector/GetParameters.h" #include "ball_detector/SetParameters.h" @@ -112,7 +115,7 @@ class BallDetector int not_found_count_; //circle set publisher - ball_detector::circleSetStamped circles_msg_; + ball_detector::CircleSetStamped circles_msg_; ros::Publisher circles_pub_; //camera info subscriber diff --git a/ball_detector/launch/ball_detector.launch b/ball_detector/launch/ball_detector.launch index 05cc278..34a12ba 100644 --- a/ball_detector/launch/ball_detector.launch +++ b/ball_detector/launch/ball_detector.launch @@ -1,13 +1,13 @@ - + - - - - - - - + + + + + + + diff --git a/ball_detector/launch/ball_detector_from_usb_cam.launch b/ball_detector/launch/ball_detector_from_usb_cam.launch index e84838b..44ecad5 100644 --- a/ball_detector/launch/ball_detector_from_usb_cam.launch +++ b/ball_detector/launch/ball_detector_from_usb_cam.launch @@ -1,28 +1,27 @@ - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/ball_detector/launch/ball_detector_from_uvc.launch b/ball_detector/launch/ball_detector_from_uvc.launch index 4ef7b43..5946129 100644 --- a/ball_detector/launch/ball_detector_from_uvc.launch +++ b/ball_detector/launch/ball_detector_from_uvc.launch @@ -1,30 +1,30 @@ - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + diff --git a/ball_detector/package.xml b/ball_detector/package.xml index 47af0d6..2f2acf3 100644 --- a/ball_detector/package.xml +++ b/ball_detector/package.xml @@ -1,30 +1,35 @@ ball_detector - 0.1.1 + 0.1.0 - This package implements a circle-like shape detector of the input image. - It requires and input image and publish, at frame rate, a marked image - and a stamped array of circle centers and radius. + This package implements a circle-like shape detector of the input image. + It requires and input image and publish, at frame rate, a marked image + and a stamped array of circle centers and radius. - Apache License 2.0 - kayman + Apache 2.0 + Kayman + Zerom Pyo - + http://wiki.ros.org/ball_detector + http://emanual.robotis.com/docs/en/platform/op3/introduction/ + https://github.com/ROBOTIS-GIT/ROBOTIS-OP3-Demo + https://github.com/ROBOTIS-GIT/ROBOTIS-OP3-Demo/issues catkin + roscpp roslib - cv_bridge + std_msgs + sensor_msgs geometry_msgs + dynamic_reconfigure + cv_bridge image_transport - roscpp - rospy - std_msgs - cmake_modules + boost + opencv3 yaml-cpp message_generation message_runtime message_runtime - dynamic_reconfigure - dynamic_reconfigure - dynamic_reconfigure + usb_cam + uvc_camera diff --git a/ball_detector/launch/ball_detector.rviz b/ball_detector/rviz/ball_detector.rviz similarity index 100% rename from ball_detector/launch/ball_detector.rviz rename to ball_detector/rviz/ball_detector.rviz diff --git a/ball_detector/src/ball_detector.cpp b/ball_detector/src/ball_detector.cpp index 552c699..7dbba3c 100644 --- a/ball_detector/src/ball_detector.cpp +++ b/ball_detector/src/ball_detector.cpp @@ -16,7 +16,6 @@ /* Author: Kayman Jung */ -#include #include #include "ball_detector/ball_detector.h" @@ -72,7 +71,7 @@ BallDetector::BallDetector() //sets publishers image_pub_ = it_.advertise("image_out", 100); - circles_pub_ = nh_.advertise("circle_set", 100); + circles_pub_ = nh_.advertise("circle_set", 100); camera_info_pub_ = nh_.advertise("camera_info", 100); //sets subscribers @@ -92,7 +91,7 @@ BallDetector::BallDetector() param_command_sub_ = nh_.subscribe("param_command", 1, &BallDetector::paramCommandCallback, this); set_param_client_ = nh_.advertiseService("set_param", &BallDetector::setParamCallback, this); get_param_client_ = nh_.advertiseService("get_param", &BallDetector::getParamCallback, this); - default_setting_path_ = ros::package::getPath(ROS_PACKAGE_NAME) + "/launch/ball_detector_params_default.yaml"; + default_setting_path_ = ros::package::getPath(ROS_PACKAGE_NAME) + "/config/ball_detector_params_default.yaml"; //sets config and prints it params_config_ = detect_config; diff --git a/op3_bringup/CMakeLists.txt b/op3_bringup/CMakeLists.txt new file mode 100644 index 0000000..403e6d6 --- /dev/null +++ b/op3_bringup/CMakeLists.txt @@ -0,0 +1,195 @@ +cmake_minimum_required(VERSION 2.8.3) +project(op3_bringup) + +## Compile as C++11, supported in ROS Kinetic and newer +# add_compile_options(-std=c++11) + +## Find catkin macros and libraries +## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) +## is used, also find other catkin packages +find_package(catkin REQUIRED) + +## System dependencies are found with CMake's conventions +# find_package(Boost REQUIRED COMPONENTS system) + + +## Uncomment this if the package has a setup.py. This macro ensures +## modules and global scripts declared therein get installed +## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html +# catkin_python_setup() + +################################################ +## Declare ROS messages, services and actions ## +################################################ + +## To declare and build messages, services or actions from within this +## package, follow these steps: +## * Let MSG_DEP_SET be the set of packages whose message types you use in +## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). +## * In the file package.xml: +## * add a build_depend tag for "message_generation" +## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET +## * If MSG_DEP_SET isn't empty the following dependency has been pulled in +## but can be declared for certainty nonetheless: +## * add a run_depend tag for "message_runtime" +## * In this file (CMakeLists.txt): +## * add "message_generation" and every package in MSG_DEP_SET to +## find_package(catkin REQUIRED COMPONENTS ...) +## * add "message_runtime" and every package in MSG_DEP_SET to +## catkin_package(CATKIN_DEPENDS ...) +## * uncomment the add_*_files sections below as needed +## and list every .msg/.srv/.action file to be processed +## * uncomment the generate_messages entry below +## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) + +## Generate messages in the 'msg' folder +# add_message_files( +# FILES +# Message1.msg +# Message2.msg +# ) + +## Generate services in the 'srv' folder +# add_service_files( +# FILES +# Service1.srv +# Service2.srv +# ) + +## Generate actions in the 'action' folder +# add_action_files( +# FILES +# Action1.action +# Action2.action +# ) + +## Generate added messages and services with any dependencies listed here +# generate_messages( +# DEPENDENCIES +# std_msgs # Or other packages containing msgs +# ) + +################################################ +## Declare ROS dynamic reconfigure parameters ## +################################################ + +## To declare and build dynamic reconfigure parameters within this +## package, follow these steps: +## * In the file package.xml: +## * add a build_depend and a run_depend tag for "dynamic_reconfigure" +## * In this file (CMakeLists.txt): +## * add "dynamic_reconfigure" to +## find_package(catkin REQUIRED COMPONENTS ...) +## * uncomment the "generate_dynamic_reconfigure_options" section below +## and list every .cfg file to be processed + +## Generate dynamic reconfigure parameters in the 'cfg' folder +# generate_dynamic_reconfigure_options( +# cfg/DynReconf1.cfg +# cfg/DynReconf2.cfg +# ) + +################################### +## catkin specific configuration ## +################################### +## The catkin_package macro generates cmake config files for your package +## Declare things to be passed to dependent projects +## INCLUDE_DIRS: uncomment this if your package contains header files +## LIBRARIES: libraries you create in this project that dependent projects also need +## CATKIN_DEPENDS: catkin_packages dependent projects also need +## DEPENDS: system dependencies of this project that dependent projects also need +catkin_package( +# INCLUDE_DIRS include +# LIBRARIES op3_bringup +# CATKIN_DEPENDS other_catkin_pkg +# DEPENDS system_lib +) + +########### +## Build ## +########### + +## Specify additional locations of header files +## Your package locations should be listed before other locations +include_directories( +# include +# ${catkin_INCLUDE_DIRS} +) + +## Declare a C++ library +# add_library(${PROJECT_NAME} +# src/${PROJECT_NAME}/op3_bringup.cpp +# ) + +## Add cmake target dependencies of the library +## as an example, code may need to be generated before libraries +## either from message generation or dynamic reconfigure +# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) + +## Declare a C++ executable +## With catkin_make all packages are built within a single CMake context +## The recommended prefix ensures that target names across packages don't collide +# add_executable(${PROJECT_NAME}_node src/op3_bringup_node.cpp) + +## Rename C++ executable without prefix +## The above recommended prefix causes long target names, the following renames the +## target back to the shorter version for ease of user use +## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node" +# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "") + +## Add cmake target dependencies of the executable +## same as for the library above +# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) + +## Specify libraries to link a library or executable target against +# target_link_libraries(${PROJECT_NAME}_node +# ${catkin_LIBRARIES} +# ) + +############# +## Install ## +############# + +# all install targets should use catkin DESTINATION variables +# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html + +## Mark executable scripts (Python etc.) for installation +## in contrast to setup.py, you can choose the destination +# install(PROGRAMS +# scripts/my_python_script +# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark executables and/or libraries for installation +# install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node +# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} +# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +# ) + +## Mark cpp header files for installation +# install(DIRECTORY include/${PROJECT_NAME}/ +# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +# FILES_MATCHING PATTERN "*.h" +# PATTERN ".svn" EXCLUDE +# ) + +## Mark other files for installation (e.g. launch and bag files, etc.) +# install(FILES +# # myfile1 +# # myfile2 +# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +# ) + +############# +## Testing ## +############# + +## Add gtest based cpp test target and link libraries +# catkin_add_gtest(${PROJECT_NAME}-test test/test_op3_bringup.cpp) +# if(TARGET ${PROJECT_NAME}-test) +# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) +# endif() + +## Add folders to be run by python nosetests +# catkin_add_nosetests(test) diff --git a/op3_bringup/launch/op3_bringup.launch b/op3_bringup/launch/op3_bringup.launch new file mode 100644 index 0000000..a3eacfb --- /dev/null +++ b/op3_bringup/launch/op3_bringup.launch @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/op3_bringup/launch/op3_bringup_visualization.launch b/op3_bringup/launch/op3_bringup_visualization.launch new file mode 100644 index 0000000..5ad06e0 --- /dev/null +++ b/op3_bringup/launch/op3_bringup_visualization.launch @@ -0,0 +1,18 @@ + + + + + + + + [/robotis/present_joint_states] + + + + + + + + + + diff --git a/op3_bringup/package.xml b/op3_bringup/package.xml new file mode 100644 index 0000000..21f0087 --- /dev/null +++ b/op3_bringup/package.xml @@ -0,0 +1,59 @@ + + + op3_bringup + 0.0.0 + The op3_bringup package + + + + + robotis + + + + + + TODO + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + catkin + + + + + + + + diff --git a/op3_bringup/rviz/op3_bringup.rviz b/op3_bringup/rviz/op3_bringup.rviz new file mode 100644 index 0000000..7a00cca --- /dev/null +++ b/op3_bringup/rviz/op3_bringup.rviz @@ -0,0 +1,348 @@ +Panels: + - Class: rviz/Displays + Help Height: 78 + Name: Displays + Property Tree Widget: + Expanded: + - /Global Options1 + - /Status1 + - /TF1 + Splitter Ratio: 0.5 + Tree Height: 352 + - Class: rviz/Selection + Name: Selection + - Class: rviz/Tool Properties + Expanded: + - /2D Pose Estimate1 + - /2D Nav Goal1 + - /Publish Point1 + Name: Tool Properties + Splitter Ratio: 0.588679016 + - Class: rviz/Views + Expanded: + - /Current View1 + Name: Views + Splitter Ratio: 0.5 + - Class: rviz/Time + Experimental: false + Name: Time + SyncMode: 0 + SyncSource: Image +Visualization Manager: + Class: "" + Displays: + - Alpha: 0.5 + Cell Size: 1 + Class: rviz/Grid + Color: 160; 160; 164 + Enabled: true + Line Style: + Line Width: 0.0299999993 + Value: Lines + Name: Grid + Normal Cell Count: 0 + Offset: + X: 0 + Y: 0 + Z: 0 + Plane: XY + Plane Cell Count: 10 + Reference Frame: + Value: true + - Alpha: 1 + Class: rviz/RobotModel + Collision Enabled: false + Enabled: true + Links: + All Links Enabled: true + Expand Joint Details: false + Expand Link Details: false + Expand Tree: false + Link Tree Style: Links in Alphabetic Order + body_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + cam_gazebo_link: + Alpha: 1 + Show Axes: false + Show Trail: false + cam_link: + Alpha: 1 + Show Axes: false + Show Trail: false + head_pan_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + head_tilt_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_ank_pitch_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_ank_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_el_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_hip_pitch_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_hip_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_hip_yaw_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_knee_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_sho_pitch_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + l_sho_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_ank_pitch_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_ank_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_el_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_hip_pitch_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_hip_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_hip_yaw_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_knee_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_sho_pitch_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + r_sho_roll_link: + Alpha: 1 + Show Axes: false + Show Trail: false + Value: true + Name: RobotModel + Robot Description: robot_description + TF Prefix: "" + Update Interval: 0 + Value: true + Visual Enabled: true + - Class: rviz/Image + Enabled: true + Image Topic: /usb_cam_node/image_raw + Max Value: 1 + Median window: 5 + Min Value: 0 + Name: Image + Normalize Range: true + Queue Size: 2 + Transport Hint: raw + Unreliable: false + Value: true + - Class: rviz/TF + Enabled: true + Frame Timeout: 15 + Frames: + All Enabled: true + body_link: + Value: true + cam_gazebo_link: + Value: true + cam_link: + Value: true + head_pan_link: + Value: true + head_tilt_link: + Value: true + l_ank_pitch_link: + Value: true + l_ank_roll_link: + Value: true + l_el_link: + Value: true + l_hip_pitch_link: + Value: true + l_hip_roll_link: + Value: true + l_hip_yaw_link: + Value: true + l_knee_link: + Value: true + l_sho_pitch_link: + Value: true + l_sho_roll_link: + Value: true + r_ank_pitch_link: + Value: true + r_ank_roll_link: + Value: true + r_el_link: + Value: true + r_hip_pitch_link: + Value: true + r_hip_roll_link: + Value: true + r_hip_yaw_link: + Value: true + r_knee_link: + Value: true + r_sho_pitch_link: + Value: true + r_sho_roll_link: + Value: true + world: + Value: true + Marker Scale: 0.200000003 + Name: TF + Show Arrows: false + Show Axes: true + Show Names: false + Tree: + world: + body_link: + head_pan_link: + head_tilt_link: + cam_gazebo_link: + {} + cam_link: + {} + l_hip_yaw_link: + l_hip_roll_link: + l_hip_pitch_link: + l_knee_link: + l_ank_pitch_link: + l_ank_roll_link: + {} + l_sho_pitch_link: + l_sho_roll_link: + l_el_link: + {} + r_hip_yaw_link: + r_hip_roll_link: + r_hip_pitch_link: + r_knee_link: + r_ank_pitch_link: + r_ank_roll_link: + {} + r_sho_pitch_link: + r_sho_roll_link: + r_el_link: + {} + Update Interval: 0 + Value: true + Enabled: true + Global Options: + Background Color: 48; 48; 48 + Default Light: true + Fixed Frame: body_link + Frame Rate: 30 + Name: root + Tools: + - Class: rviz/Interact + Hide Inactive Objects: true + - Class: rviz/MoveCamera + - Class: rviz/Select + - Class: rviz/FocusCamera + - Class: rviz/Measure + - Class: rviz/SetInitialPose + Topic: /initialpose + - Class: rviz/SetGoal + Topic: /move_base_simple/goal + - Class: rviz/PublishPoint + Single click: true + Topic: /clicked_point + Value: true + Views: + Current: + Class: rviz/Orbit + Distance: 1.0015856 + Enable Stereo Rendering: + Stereo Eye Separation: 0.0599999987 + Stereo Focal Distance: 1 + Swap Stereo Eyes: false + Value: false + Focal Point: + X: 0 + Y: 0 + Z: 0 + Focal Shape Fixed Size: true + Focal Shape Size: 0.0500000007 + Invert Z Axis: false + Name: Current View + Near Clip Distance: 0.00999999978 + Pitch: 0.425398082 + Target Frame: + Value: Orbit (rviz) + Yaw: 5.78858471 + Saved: ~ +Window Geometry: + Displays: + collapsed: false + Height: 1023 + Hide Left Dock: false + Hide Right Dock: true + Image: + collapsed: false + QMainWindow State: 000000ff00000000fd00000004000000000000023300000358fc0200000009fb0000001200530065006c0065006300740069006f006e00000001e10000009b0000006600fffffffb0000001e0054006f006f006c002000500072006f007000650072007400690065007302000001ed000001df00000185000000a3fb000000120056006900650077007300200054006f006f02000001df000002110000018500000122fb000000200054006f006f006c002000500072006f0070006500720074006900650073003203000002880000011d000002210000017afb000000100044006900730070006c0061007900730100000043000001f1000000df00fffffffb0000002000730065006c0065006300740069006f006e00200062007500660066006500720200000138000000aa0000023a00000294fb00000014005700690064006500530074006500720065006f02000000e6000000d2000003ee0000030bfb0000000c004b0069006e0065006300740200000186000001060000030c00000261fb0000000a0049006d006100670065010000023a000001610000001800ffffff000000010000010f00000358fc0200000003fb0000001e0054006f006f006c002000500072006f00700065007200740069006500730100000041000000780000000000000000fb0000000a00560069006500770073000000004300000358000000b800fffffffb0000001200530065006c0065006300740069006f006e010000025a000000b200000000000000000000000200000490000000a9fc0100000001fb0000000a00560069006500770073030000004e00000080000002e10000019700000003000007800000003efc0100000002fb0000000800540069006d00650100000000000007800000022400fffffffb0000000800540069006d00650100000000000004500000000000000000000005470000035800000004000000040000000800000008fc0000000100000002000000010000000a0054006f006f006c00730100000000ffffffff0000000000000000 + Selection: + collapsed: false + Time: + collapsed: false + Tool Properties: + collapsed: false + Views: + collapsed: true + Width: 1920 + X: 0 + Y: 0 diff --git a/op3_demo/CHANGELOG.rst b/op3_demo/CHANGELOG.rst new file mode 100644 index 0000000..62ead4d --- /dev/null +++ b/op3_demo/CHANGELOG.rst @@ -0,0 +1,12 @@ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Changelog for package op3_demo +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +0.1.0 (2018-03-30) +------------------ +* first release +* added launch files in order to move the camera setting to op3_camera_setting package +* added missing package in find_package() +* refacoring to release +* splited repositoryfrom ROBOTIS-OP3 +* Contributors: Kayman, Yoshimaru Tanaka, Pyo diff --git a/op3_demo/CMakeLists.txt b/op3_demo/CMakeLists.txt index d002446..42445a0 100644 --- a/op3_demo/CMakeLists.txt +++ b/op3_demo/CMakeLists.txt @@ -1,28 +1,32 @@ ################################################################################ -# CMake +# Set minimum required version of cmake, project name and compile options ################################################################################ cmake_minimum_required(VERSION 2.8.3) project(op3_demo) ################################################################################ -# Packages +# Find catkin packages and libraries for catkin and system dependencies ################################################################################ find_package(catkin REQUIRED COMPONENTS roscpp roslib + std_msgs sensor_msgs - ball_detector + geometry_msgs + robotis_controller_msgs op3_walking_module_msgs op3_action_module_msgs - robotis_controller_msgs cmake_modules robotis_math + ball_detector ) +find_package(Boost REQUIRED COMPONENTS thread) find_package(Eigen3 REQUIRED) ## Resolve system dependency on yaml-cpp, which apparently does not ## provide a CMake find_package() module. +## Insert your header file compatible specified path like '#include ' find_package(PkgConfig REQUIRED) pkg_check_modules(YAML_CPP REQUIRED yaml-cpp) find_path(YAML_CPP_INCLUDE_DIR @@ -39,6 +43,10 @@ if(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") add_definitions(-DHAVE_NEW_YAMLCPP) endif(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") +################################################################################ +# Setup for python modules and scripts +################################################################################ + ################################################################################ # Declare ROS messages, services and actions ################################################################################ @@ -48,12 +56,23 @@ endif(NOT ${YAML_CPP_VERSION} VERSION_LESS "0.5") ################################################################################ ################################################################################ -# Catkin specific configuration +# Declare catkin specific configuration to be passed to dependent projects ################################################################################ catkin_package( INCLUDE_DIRS include - CATKIN_DEPENDS roscpp sensor_msgs cmake_modules - DEPENDS EIGEN3 + CATKIN_DEPENDS + roscpp + roslib + std_msgs + sensor_msgs + geometry_msgs + robotis_controller_msgs + op3_walking_module_msgs + op3_action_module_msgs + cmake_modules + robotis_math + ball_detector + DEPENDS Boost EIGEN3 ) ################################################################################ @@ -62,6 +81,7 @@ catkin_package( include_directories( include ${catkin_INCLUDE_DIRS} + ${Boost_INCLUDE_DIRS} ${EIGEN3_INCLUDE_DIRS} ${YAML_CPP_INCLUDE_DIRS} ) @@ -76,11 +96,16 @@ add_executable(op_demo_node src/vision/face_tracker.cpp ) -add_dependencies(op_demo_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) +add_dependencies(op_demo_node + ${${PROJECT_NAME}_EXPORTED_TARGETS} + ${catkin_EXPORTED_TARGETS} +) target_link_libraries(op_demo_node ${catkin_LIBRARIES} - yaml-cpp + ${Boost_LIBRARIES} + ${Eigen3_LIBRARIES} + ${YAML_CPP_LIBRARIES} ) add_executable(self_test_node @@ -95,48 +120,32 @@ add_executable(self_test_node src/test/mic_test.cpp ) -add_dependencies(self_test_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) +add_dependencies(self_test_node + ${${PROJECT_NAME}_EXPORTED_TARGETS} + ${catkin_EXPORTED_TARGETS} +) target_link_libraries(self_test_node ${catkin_LIBRARIES} - ${Eigen3_LIBRARIES} + ${Boost_LIBRARIES} + ${Eigen3_LIBRARIES} ${YAML_CPP_LIBRARIES} ) ################################################################################ # Install ################################################################################ +install(TARGETS op_demo_node self_test_node + RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} +) -# all install targets should use catkin DESTINATION variables -# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html - -## Mark executable scripts (Python etc.) for installation -## in contrast to setup.py, you can choose the destination -# install(PROGRAMS -# scripts/my_python_script -# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -# ) - -## Mark executables and/or libraries for installation -# install(TARGETS ball_tracking ball_tracking_node -# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} -# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} -# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -# ) - -## Mark cpp header files for installation -# install(DIRECTORY include/${PROJECT_NAME}/ -# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} -# FILES_MATCHING PATTERN "*.h" -# PATTERN ".svn" EXCLUDE -# ) - -## Mark other files for installation (e.g. launch and bag files, etc.) -# install(FILES -# # myfile1 -# # myfile2 -# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -# ) +install(DIRECTORY include/${PROJECT_NAME}/ + DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} +) + +install(DIRECTORY data launch list + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} +) ################################################################################ # Test diff --git a/op3_demo/include/op3_demo/action_demo.h b/op3_demo/include/op3_demo/action_demo.h index 32a9435..4231406 100644 --- a/op3_demo/include/op3_demo/action_demo.h +++ b/op3_demo/include/op3_demo/action_demo.h @@ -19,14 +19,14 @@ #ifndef ACTION_DEMO_H_ #define ACTION_DEMO_H_ -#include -#include - #include #include #include #include +#include +#include + #include "op3_demo/op_demo.h" #include "robotis_controller_msgs/JointCtrlModule.h" #include "robotis_controller_msgs/SetModule.h" diff --git a/op3_demo/include/op3_demo/ball_follower.h b/op3_demo/include/op3_demo/ball_follower.h index 9e12ffc..7ec1d46 100644 --- a/op3_demo/include/op3_demo/ball_follower.h +++ b/op3_demo/include/op3_demo/ball_follower.h @@ -20,16 +20,16 @@ #define BALL_FOLLOWER_H_ #include -#include - #include #include #include #include #include +#include +#include #include "robotis_controller_msgs/JointCtrlModule.h" -#include "ball_detector/circleSetStamped.h" +#include "ball_detector/CircleSetStamped.h" #include "op3_walking_module_msgs/WalkingParam.h" #include "op3_walking_module_msgs/GetWalkingParam.h" diff --git a/op3_demo/include/op3_demo/ball_tracker.h b/op3_demo/include/op3_demo/ball_tracker.h index 0d3cfac..5461494 100644 --- a/op3_demo/include/op3_demo/ball_tracker.h +++ b/op3_demo/include/op3_demo/ball_tracker.h @@ -20,17 +20,16 @@ #define BALL_TRACKING_H_ #include -#include - #include #include #include #include -//#include #include +#include +#include #include "robotis_controller_msgs/JointCtrlModule.h" -#include "ball_detector/circleSetStamped.h" +#include "ball_detector/CircleSetStamped.h" #include "op3_walking_module_msgs/WalkingParam.h" #include "op3_walking_module_msgs/GetWalkingParam.h" @@ -80,7 +79,7 @@ class BallTracker const int WAITING_THRESHOLD; const bool DEBUG_PRINT; - void ballPositionCallback(const ball_detector::circleSetStamped::ConstPtr &msg); + void ballPositionCallback(const ball_detector::CircleSetStamped::ConstPtr &msg); void ballTrackerCommandCallback(const std_msgs::String::ConstPtr &msg); void publishHeadJoint(double pan, double tilt); void scanBall(); diff --git a/op3_demo/include/op3_demo/button_test.h b/op3_demo/include/op3_demo/button_test.h index 127c978..84e8bee 100644 --- a/op3_demo/include/op3_demo/button_test.h +++ b/op3_demo/include/op3_demo/button_test.h @@ -19,14 +19,12 @@ #ifndef BUTTON_TEST_H_ #define BUTTON_TEST_H_ -#include - #include #include #include +#include #include "op3_demo/op_demo.h" - #include "robotis_controller_msgs/SyncWriteItem.h" namespace robotis_op diff --git a/op3_demo/include/op3_demo/face_tracker.h b/op3_demo/include/op3_demo/face_tracker.h index 0671b24..3289375 100644 --- a/op3_demo/include/op3_demo/face_tracker.h +++ b/op3_demo/include/op3_demo/face_tracker.h @@ -20,8 +20,6 @@ #define FACE_TRACKING_H_ #include -#include - #include #include #include @@ -29,6 +27,7 @@ #include #include #include +#include namespace robotis_op { diff --git a/op3_demo/include/op3_demo/mic_test.h b/op3_demo/include/op3_demo/mic_test.h index 7cd025a..144fe96 100644 --- a/op3_demo/include/op3_demo/mic_test.h +++ b/op3_demo/include/op3_demo/mic_test.h @@ -20,14 +20,12 @@ #define MIC_TEST_H_ #include -#include - #include #include #include +#include #include "op3_demo/op_demo.h" - #include "robotis_controller_msgs/SyncWriteItem.h" namespace robotis_op diff --git a/op3_demo/include/op3_demo/soccer_demo.h b/op3_demo/include/op3_demo/soccer_demo.h index f65d81b..a771eda 100644 --- a/op3_demo/include/op3_demo/soccer_demo.h +++ b/op3_demo/include/op3_demo/soccer_demo.h @@ -23,16 +23,19 @@ #include #include #include +#include +#include -#include "op3_demo/op_demo.h" -#include "op3_demo/ball_tracker.h" -#include "op3_demo/ball_follower.h" -#include "robotis_math/robotis_linear_algebra.h" #include "op3_action_module_msgs/IsRunning.h" #include "robotis_controller_msgs/SyncWriteItem.h" #include "robotis_controller_msgs/JointCtrlModule.h" #include "robotis_controller_msgs/SetJointModule.h" +#include "op3_demo/op_demo.h" +#include "op3_demo/ball_tracker.h" +#include "op3_demo/ball_follower.h" +#include "robotis_math/robotis_linear_algebra.h" + namespace robotis_op { diff --git a/op3_demo/include/op3_demo/vision_demo.h b/op3_demo/include/op3_demo/vision_demo.h index 3ebdc46..20cd1ad 100644 --- a/op3_demo/include/op3_demo/vision_demo.h +++ b/op3_demo/include/op3_demo/vision_demo.h @@ -19,19 +19,18 @@ #ifndef VISION_DEMO_H_ #define VISION_DEMO_H_ -#include - #include #include #include #include - -#include "op3_demo/op_demo.h" -#include "op3_demo/face_tracker.h" +#include #include "robotis_controller_msgs/SyncWriteItem.h" #include "robotis_controller_msgs/SetModule.h" +#include "op3_demo/op_demo.h" +#include "op3_demo/face_tracker.h" + namespace robotis_op { diff --git a/op3_demo/launch/demo.launch b/op3_demo/launch/demo.launch index aa5098b..2b5281c 100644 --- a/op3_demo/launch/demo.launch +++ b/op3_demo/launch/demo.launch @@ -1,7 +1,5 @@ - - diff --git a/op3_demo/launch/face_detection_op3.launch b/op3_demo/launch/face_detection_op3.launch index afc5f12..d42ab41 100644 --- a/op3_demo/launch/face_detection_op3.launch +++ b/op3_demo/launch/face_detection_op3.launch @@ -7,16 +7,16 @@ - - - - + args="$(arg face_cascade_name_0) + $(arg face_cascade_name_1) + $(arg face_cascade_name_2) + $(arg face_cascade_name_3) + $(arg face_cascade_name_4)" + output="screen"> + + + + diff --git a/op3_demo/launch/self_test.launch b/op3_demo/launch/self_test.launch index c5ca857..623004e 100644 --- a/op3_demo/launch/self_test.launch +++ b/op3_demo/launch/self_test.launch @@ -1,30 +1,29 @@ + + - - - - - + + - - + + - - + + - - + + - - + + - - - - - - + + + + + + diff --git a/op3_demo/list/action_script.yaml b/op3_demo/list/action_script.yaml new file mode 100644 index 0000000..21ce72b --- /dev/null +++ b/op3_demo/list/action_script.yaml @@ -0,0 +1,23 @@ +# combination action page number and mp3 file path +action_and_sound: + 4 : "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Thank you.mp3" + 41: "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Introduction.mp3" + 24: "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Wow.mp3" + 23: "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Yes go.mp3" + 15: "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Sit down.mp3" + 1: "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Stand up.mp3" + 54: "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Clap please.mp3" + 27: "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Oops.mp3" + 38: "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Bye bye.mp3" +# 101 : "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Oops.mp3" + 110 : "" + 111 : "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Intro01.mp3" + 115 : "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Intro02.mp3" + 118 : "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Intro03.mp3" + +# play list +prev_default: [4, 41, 24, 23, 15, 1, 54, 27, 38] +default: [4, 110, 111, 115, 118, 24, 54, 27, 38] + +# example of play list +#certification: [101] \ No newline at end of file diff --git a/op3_demo/script/action_script_bk.yaml b/op3_demo/list/action_script_bk.yaml similarity index 72% rename from op3_demo/script/action_script_bk.yaml rename to op3_demo/list/action_script_bk.yaml index a18155d..bc401fb 100644 --- a/op3_demo/script/action_script_bk.yaml +++ b/op3_demo/list/action_script_bk.yaml @@ -1,15 +1,15 @@ # combination action page number and mp3 file path action_and_sound: - 4 : "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Thank you.mp3" - 41: "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Introduction.mp3" - 24: "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Wow.mp3" - 23: "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Yes go.mp3" - 15: "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Sit down.mp3" - 1: "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Stand up.mp3" - 54: "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Clap please.mp3" - 27: "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Oops.mp3" - 38: "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Bye bye.mp3" - 101 : "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Oops.mp3" + 4 : "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Thank you.mp3" + 41: "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Introduction.mp3" + 24: "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Wow.mp3" + 23: "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Yes go.mp3" + 15: "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Sit down.mp3" + 1: "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Stand up.mp3" + 54: "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Clap please.mp3" + 27: "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Oops.mp3" + 38: "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Bye bye.mp3" + 101 : "/home/robotis/catkin_ws/src/ROBOTIS-OP3/ROBOTIS-OP3-Demo/op3_demo/data/mp3/Oops.mp3" # play list default: [4, 41, 24, 23, 15, 1, 54, 27, 38] diff --git a/op3_demo/package.xml b/op3_demo/package.xml index 70af22d..85bd36e 100644 --- a/op3_demo/package.xml +++ b/op3_demo/package.xml @@ -1,25 +1,36 @@ op3_demo - 0.1.1 + 0.1.0 - op3 default demo + OP3 default demo It includes three demontrations(soccer demo, vision demo, action script demo) - Apache License 2.0 - kayman + Apache 2.0 + Kayman Pyo - + http://wiki.ros.org/op3_demo + http://emanual.robotis.com/docs/en/platform/op3/introduction/ + https://github.com/ROBOTIS-GIT/ROBOTIS-OP3-Demo + https://github.com/ROBOTIS-GIT/ROBOTIS-OP3-Demo/issues catkin roscpp roslib + std_msgs sensor_msgs - ball_detector + geometry_msgs robotis_controller_msgs op3_walking_module_msgs op3_action_module_msgs cmake_modules robotis_math + ball_detector + boost eigen yaml-cpp + op3_manager + op3_camera_setting_tool + op3_web_setting_tool + ros_madplay_player + diff --git a/op3_demo/script/action_script.yaml b/op3_demo/script/action_script.yaml deleted file mode 100644 index 077e820..0000000 --- a/op3_demo/script/action_script.yaml +++ /dev/null @@ -1,23 +0,0 @@ -# combination action page number and mp3 file path -action_and_sound: - 4 : "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Thank you.mp3" - 41: "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Introduction.mp3" - 24: "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Wow.mp3" - 23: "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Yes go.mp3" - 15: "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Sit down.mp3" - 1: "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Stand up.mp3" - 54: "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Clap please.mp3" - 27: "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Oops.mp3" - 38: "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Bye bye.mp3" -# 101 : "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Oops.mp3" - 110 : "" - 111 : "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Intro01.mp3" - 115 : "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Intro02.mp3" - 118 : "/home/robotis/catkin_ws/src/ROBOTIS-OP3-Demo/op3_demo/Data/mp3/Intro03.mp3" - -# play list -prev_default: [4, 41, 24, 23, 15, 1, 54, 27, 38] -default: [4, 110, 111, 115, 118, 24, 54, 27, 38] - -# example of play list -#certification: [101] \ No newline at end of file diff --git a/op3_demo/src/action/action_demo.cpp b/op3_demo/src/action/action_demo.cpp index 4f14679..660390c 100644 --- a/op3_demo/src/action/action_demo.cpp +++ b/op3_demo/src/action/action_demo.cpp @@ -31,7 +31,7 @@ ActionDemo::ActionDemo() ros::NodeHandle nh(ros::this_node::getName()); - std::string default_path = ros::package::getPath("op3_demo") + "/script/action_script.yaml"; + std::string default_path = ros::package::getPath("op3_demo") + "/list/action_script.yaml"; script_path_ = nh.param("action_script", default_path); std::string default_play_list = "default"; diff --git a/op3_demo/src/demo_node.cpp b/op3_demo/src/demo_node.cpp index 8039aff..300a90b 100644 --- a/op3_demo/src/demo_node.cpp +++ b/op3_demo/src/demo_node.cpp @@ -77,7 +77,7 @@ int main(int argc, char **argv) ros::Subscriber buttuon_sub = nh.subscribe("/robotis/open_cr/button", 1, buttonHandlerCallback); ros::Subscriber mode_command_sub = nh.subscribe("/robotis/mode_command", 1, demoModeCommandCallback); - default_mp3_path = ros::package::getPath("op3_demo") + "/Data/mp3/"; + default_mp3_path = ros::package::getPath("op3_demo") + "/data/mp3/"; ros::start(); diff --git a/op3_demo/src/soccer/ball_tracker.cpp b/op3_demo/src/soccer/ball_tracker.cpp index cbd4e87..355a21c 100644 --- a/op3_demo/src/soccer/ball_tracker.cpp +++ b/op3_demo/src/soccer/ball_tracker.cpp @@ -59,7 +59,7 @@ BallTracker::~BallTracker() } -void BallTracker::ballPositionCallback(const ball_detector::circleSetStamped::ConstPtr &msg) +void BallTracker::ballPositionCallback(const ball_detector::CircleSetStamped::ConstPtr &msg) { for (int idx = 0; idx < msg->circles.size(); idx++) { diff --git a/op3_demo/src/test/button_test.cpp b/op3_demo/src/test/button_test.cpp index 415d182..7a78c6a 100644 --- a/op3_demo/src/test/button_test.cpp +++ b/op3_demo/src/test/button_test.cpp @@ -33,7 +33,7 @@ ButtonTest::ButtonTest() boost::thread queue_thread = boost::thread(boost::bind(&ButtonTest::callbackThread, this)); boost::thread process_thread = boost::thread(boost::bind(&ButtonTest::processThread, this)); - default_mp3_path_ = ros::package::getPath("op3_demo") + "/Data/mp3/test/"; + default_mp3_path_ = ros::package::getPath("op3_demo") + "/data/mp3/test/"; } ButtonTest::~ButtonTest() diff --git a/op3_demo/src/test/mic_test.cpp b/op3_demo/src/test/mic_test.cpp index e1f6757..4e56954 100644 --- a/op3_demo/src/test/mic_test.cpp +++ b/op3_demo/src/test/mic_test.cpp @@ -36,8 +36,8 @@ MicTest::MicTest() boost::thread queue_thread = boost::thread(boost::bind(&MicTest::callbackThread, this)); boost::thread process_thread = boost::thread(boost::bind(&MicTest::processThread, this)); - recording_file_name_ = ros::package::getPath("op3_demo") + "/Data/mp3/test/mic-test.wav"; - default_mp3_path_ = ros::package::getPath("op3_demo") + "/Data/mp3/test/"; + recording_file_name_ = ros::package::getPath("op3_demo") + "/data/mp3/test/mic-test.wav"; + default_mp3_path_ = ros::package::getPath("op3_demo") + "/data/mp3/test/"; start_time_ = ros::Time::now(); } diff --git a/op3_demo/src/test_node.cpp b/op3_demo/src/test_node.cpp index 259ea96..8d4768d 100644 --- a/op3_demo/src/test_node.cpp +++ b/op3_demo/src/test_node.cpp @@ -84,7 +84,7 @@ int main(int argc, char **argv) ros::Subscriber buttuon_sub = nh.subscribe("/robotis/open_cr/button", 1, buttonHandlerCallback); ros::Subscriber mode_command_sub = nh.subscribe("/robotis/mode_command", 1, demoModeCommandCallback); - default_mp3_path = ros::package::getPath("op3_demo") + "/Data/mp3/"; + default_mp3_path = ros::package::getPath("op3_demo") + "/data/mp3/"; ros::start(); diff --git a/robotis_op3_demo/CHANGELOG.rst b/robotis_op3_demo/CHANGELOG.rst new file mode 100644 index 0000000..b65724b --- /dev/null +++ b/robotis_op3_demo/CHANGELOG.rst @@ -0,0 +1,12 @@ +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +Changelog for package robotis_op3_demo +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +0.1.0 (2018-03-30) +------------------ +* first release +* added launch files in order to move the camera setting to op3_camera_setting package +* added missing package in find_package() +* refacoring to release +* splited repositoryfrom ROBOTIS-OP3 +* Contributors: Kayman, Zerom, Yoshimaru Tanaka, Pyo diff --git a/robotis_op3_demo/CMakeLists.txt b/robotis_op3_demo/CMakeLists.txt index d88f653..b7e8eeb 100644 --- a/robotis_op3_demo/CMakeLists.txt +++ b/robotis_op3_demo/CMakeLists.txt @@ -1,4 +1,4 @@ cmake_minimum_required(VERSION 2.8.3) project(robotis_op3_demo) find_package(catkin REQUIRED) -catkin_metapackage() \ No newline at end of file +catkin_metapackage() diff --git a/robotis_op3_demo/package.xml b/robotis_op3_demo/package.xml index bba5f7c..7cf0810 100644 --- a/robotis_op3_demo/package.xml +++ b/robotis_op3_demo/package.xml @@ -1,24 +1,19 @@ - + robotis_op3_demo 0.1.0 ROS packages for the robotis_op3_demo (meta package) - - Apache License 2.0 + Apache 2.0 Kayman Pyo - - - - - + http://wiki.ros.org/robotis_op3_demo + http://emanual.robotis.com/docs/en/platform/op3/introduction/ + https://github.com/ROBOTIS-GIT/ROBOTIS-OP3-Demo + https://github.com/ROBOTIS-GIT/ROBOTIS-OP3-Demo/issues catkin - ball_detector - op3_demo - - - - + ball_detector + op3_demo + From b627f131b9db84d97e16cb3b61749a9d41d84673 Mon Sep 17 00:00:00 2001 From: Kayman Date: Tue, 17 Apr 2018 17:03:28 +0900 Subject: [PATCH 14/18] updated CMakeLists.txt and package.xml of op3_bringup --- op3_bringup/CMakeLists.txt | 213 ++++++------------------------------- op3_bringup/package.xml | 71 +++---------- 2 files changed, 47 insertions(+), 237 deletions(-) diff --git a/op3_bringup/CMakeLists.txt b/op3_bringup/CMakeLists.txt index 403e6d6..b171b00 100644 --- a/op3_bringup/CMakeLists.txt +++ b/op3_bringup/CMakeLists.txt @@ -1,195 +1,42 @@ +################################################################################ +# Set minimum required version of cmake, project name and compile options +################################################################################ cmake_minimum_required(VERSION 2.8.3) project(op3_bringup) -## Compile as C++11, supported in ROS Kinetic and newer -# add_compile_options(-std=c++11) - -## Find catkin macros and libraries -## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) -## is used, also find other catkin packages +################################################################################ +# Find catkin packages and libraries for catkin and system dependencies +################################################################################ find_package(catkin REQUIRED) -## System dependencies are found with CMake's conventions -# find_package(Boost REQUIRED COMPONENTS system) - - -## Uncomment this if the package has a setup.py. This macro ensures -## modules and global scripts declared therein get installed -## See http://ros.org/doc/api/catkin/html/user_guide/setup_dot_py.html -# catkin_python_setup() - -################################################ -## Declare ROS messages, services and actions ## -################################################ - -## To declare and build messages, services or actions from within this -## package, follow these steps: -## * Let MSG_DEP_SET be the set of packages whose message types you use in -## your messages/services/actions (e.g. std_msgs, actionlib_msgs, ...). -## * In the file package.xml: -## * add a build_depend tag for "message_generation" -## * add a build_depend and a run_depend tag for each package in MSG_DEP_SET -## * If MSG_DEP_SET isn't empty the following dependency has been pulled in -## but can be declared for certainty nonetheless: -## * add a run_depend tag for "message_runtime" -## * In this file (CMakeLists.txt): -## * add "message_generation" and every package in MSG_DEP_SET to -## find_package(catkin REQUIRED COMPONENTS ...) -## * add "message_runtime" and every package in MSG_DEP_SET to -## catkin_package(CATKIN_DEPENDS ...) -## * uncomment the add_*_files sections below as needed -## and list every .msg/.srv/.action file to be processed -## * uncomment the generate_messages entry below -## * add every package in MSG_DEP_SET to generate_messages(DEPENDENCIES ...) - -## Generate messages in the 'msg' folder -# add_message_files( -# FILES -# Message1.msg -# Message2.msg -# ) - -## Generate services in the 'srv' folder -# add_service_files( -# FILES -# Service1.srv -# Service2.srv -# ) +################################################################################ +# Setup for python modules and scripts +################################################################################ -## Generate actions in the 'action' folder -# add_action_files( -# FILES -# Action1.action -# Action2.action -# ) +################################################################################ +# Declare ROS messages, services and actions +################################################################################ -## Generate added messages and services with any dependencies listed here -# generate_messages( -# DEPENDENCIES -# std_msgs # Or other packages containing msgs -# ) +################################################################################ +# Declare ROS dynamic reconfigure parameters +################################################################################ -################################################ -## Declare ROS dynamic reconfigure parameters ## -################################################ +################################################################################ +# Declare catkin specific configuration to be passed to dependent projects +################################################################################ +catkin_package() -## To declare and build dynamic reconfigure parameters within this -## package, follow these steps: -## * In the file package.xml: -## * add a build_depend and a run_depend tag for "dynamic_reconfigure" -## * In this file (CMakeLists.txt): -## * add "dynamic_reconfigure" to -## find_package(catkin REQUIRED COMPONENTS ...) -## * uncomment the "generate_dynamic_reconfigure_options" section below -## and list every .cfg file to be processed +################################################################################ +# Build +################################################################################ -## Generate dynamic reconfigure parameters in the 'cfg' folder -# generate_dynamic_reconfigure_options( -# cfg/DynReconf1.cfg -# cfg/DynReconf2.cfg -# ) - -################################### -## catkin specific configuration ## -################################### -## The catkin_package macro generates cmake config files for your package -## Declare things to be passed to dependent projects -## INCLUDE_DIRS: uncomment this if your package contains header files -## LIBRARIES: libraries you create in this project that dependent projects also need -## CATKIN_DEPENDS: catkin_packages dependent projects also need -## DEPENDS: system dependencies of this project that dependent projects also need -catkin_package( -# INCLUDE_DIRS include -# LIBRARIES op3_bringup -# CATKIN_DEPENDS other_catkin_pkg -# DEPENDS system_lib -) - -########### -## Build ## -########### - -## Specify additional locations of header files -## Your package locations should be listed before other locations -include_directories( -# include -# ${catkin_INCLUDE_DIRS} +################################################################################ +# Install +################################################################################ +install(DIRECTORY launch rviz + DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} ) -## Declare a C++ library -# add_library(${PROJECT_NAME} -# src/${PROJECT_NAME}/op3_bringup.cpp -# ) - -## Add cmake target dependencies of the library -## as an example, code may need to be generated before libraries -## either from message generation or dynamic reconfigure -# add_dependencies(${PROJECT_NAME} ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) - -## Declare a C++ executable -## With catkin_make all packages are built within a single CMake context -## The recommended prefix ensures that target names across packages don't collide -# add_executable(${PROJECT_NAME}_node src/op3_bringup_node.cpp) - -## Rename C++ executable without prefix -## The above recommended prefix causes long target names, the following renames the -## target back to the shorter version for ease of user use -## e.g. "rosrun someones_pkg node" instead of "rosrun someones_pkg someones_pkg_node" -# set_target_properties(${PROJECT_NAME}_node PROPERTIES OUTPUT_NAME node PREFIX "") - -## Add cmake target dependencies of the executable -## same as for the library above -# add_dependencies(${PROJECT_NAME}_node ${${PROJECT_NAME}_EXPORTED_TARGETS} ${catkin_EXPORTED_TARGETS}) - -## Specify libraries to link a library or executable target against -# target_link_libraries(${PROJECT_NAME}_node -# ${catkin_LIBRARIES} -# ) - -############# -## Install ## -############# - -# all install targets should use catkin DESTINATION variables -# See http://ros.org/doc/api/catkin/html/adv_user_guide/variables.html - -## Mark executable scripts (Python etc.) for installation -## in contrast to setup.py, you can choose the destination -# install(PROGRAMS -# scripts/my_python_script -# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -# ) - -## Mark executables and/or libraries for installation -# install(TARGETS ${PROJECT_NAME} ${PROJECT_NAME}_node -# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} -# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} -# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} -# ) - -## Mark cpp header files for installation -# install(DIRECTORY include/${PROJECT_NAME}/ -# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION} -# FILES_MATCHING PATTERN "*.h" -# PATTERN ".svn" EXCLUDE -# ) - -## Mark other files for installation (e.g. launch and bag files, etc.) -# install(FILES -# # myfile1 -# # myfile2 -# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION} -# ) - -############# -## Testing ## -############# - -## Add gtest based cpp test target and link libraries -# catkin_add_gtest(${PROJECT_NAME}-test test/test_op3_bringup.cpp) -# if(TARGET ${PROJECT_NAME}-test) -# target_link_libraries(${PROJECT_NAME}-test ${PROJECT_NAME}) -# endif() - -## Add folders to be run by python nosetests -# catkin_add_nosetests(test) +################################################################################ +# Test +################################################################################ \ No newline at end of file diff --git a/op3_bringup/package.xml b/op3_bringup/package.xml index 21f0087..a185bc1 100644 --- a/op3_bringup/package.xml +++ b/op3_bringup/package.xml @@ -1,59 +1,22 @@ op3_bringup - 0.0.0 - The op3_bringup package - - - - - robotis - - - - - - TODO - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + 0.0.1 + + This package is a demo for first time users. + There is an example in the demo where you can run and visualize the robot. + + Apache 2.0 + Kayman + Pyo + http://wiki.ros.org/op3_bringup + http://emanual.robotis.com/docs/en/platform/op3/introduction/ + https://github.com/ROBOTIS-GIT/ROBOTIS-OP3-Demo + https://github.com/ROBOTIS-GIT/ROBOTIS-OP3-Demo/issues catkin - - - - - - - + op3_manager + usb_cam + joint_state_publisher + robot_state_publisher + rviz From 454128b19917dd950ab0299078e43000baeaac75 Mon Sep 17 00:00:00 2001 From: Kayman Date: Wed, 18 Apr 2018 11:32:12 +0900 Subject: [PATCH 15/18] changed the package name from ball_detector to op3_ball_detector --- .../CHANGELOG.rst | 0 .../CMakeLists.txt | 2 +- .../cfg/DetectorParams.cfg | 2 +- .../cfg/DetectorParamsBlue.cfg | 2 +- .../cfg/DetectorParamsRed.cfg | 2 +- .../config/ball_detector_params.yaml | 0 .../config/ball_detector_params_default.yaml | 0 .../config/ball_detector_params_op.yaml | 0 .../op3_ball_detector}/ball_detector.h | 23 +++++++++---------- .../op3_ball_detector}/ball_detector_config.h | 0 .../launch/ball_detector.launch | 4 ++-- .../launch/ball_detector_from_usb_cam.launch | 2 +- .../launch/ball_detector_from_uvc.launch | 2 +- .../msg/BallDetectorParams.msg | 0 .../msg/CircleSetStamped.msg | 0 .../package.xml | 2 +- .../rviz/ball_detector.rviz | 0 .../src/ball_detector.cpp | 14 +++++------ .../src/ball_detector_node.cpp | 2 +- .../srv/GetParameters.srv | 0 .../srv/SetParameters.srv | 0 op3_demo/CMakeLists.txt | 4 ++-- op3_demo/include/op3_demo/ball_follower.h | 2 +- op3_demo/include/op3_demo/ball_tracker.h | 4 ++-- op3_demo/launch/demo.launch | 2 +- op3_demo/launch/self_test.launch | 2 +- op3_demo/package.xml | 2 +- op3_demo/src/soccer/ball_tracker.cpp | 2 +- 28 files changed, 37 insertions(+), 38 deletions(-) rename {ball_detector => op3_ball_detector}/CHANGELOG.rst (100%) rename {ball_detector => op3_ball_detector}/CMakeLists.txt (99%) rename {ball_detector => op3_ball_detector}/cfg/DetectorParams.cfg (98%) mode change 100755 => 100644 rename {ball_detector => op3_ball_detector}/cfg/DetectorParamsBlue.cfg (98%) rename {ball_detector => op3_ball_detector}/cfg/DetectorParamsRed.cfg (98%) rename {ball_detector => op3_ball_detector}/config/ball_detector_params.yaml (100%) rename {ball_detector => op3_ball_detector}/config/ball_detector_params_default.yaml (100%) rename {ball_detector => op3_ball_detector}/config/ball_detector_params_op.yaml (100%) rename {ball_detector/include/ball_detector => op3_ball_detector/include/op3_ball_detector}/ball_detector.h (83%) rename {ball_detector/include/ball_detector => op3_ball_detector/include/op3_ball_detector}/ball_detector_config.h (100%) rename {ball_detector => op3_ball_detector}/launch/ball_detector.launch (64%) rename {ball_detector => op3_ball_detector}/launch/ball_detector_from_usb_cam.launch (94%) rename {ball_detector => op3_ball_detector}/launch/ball_detector_from_uvc.launch (92%) rename {ball_detector => op3_ball_detector}/msg/BallDetectorParams.msg (100%) rename {ball_detector => op3_ball_detector}/msg/CircleSetStamped.msg (100%) rename {ball_detector => op3_ball_detector}/package.xml (97%) rename {ball_detector => op3_ball_detector}/rviz/ball_detector.rviz (100%) rename {ball_detector => op3_ball_detector}/src/ball_detector.cpp (97%) rename {ball_detector => op3_ball_detector}/src/ball_detector_node.cpp (96%) rename {ball_detector => op3_ball_detector}/srv/GetParameters.srv (100%) rename {ball_detector => op3_ball_detector}/srv/SetParameters.srv (100%) diff --git a/ball_detector/CHANGELOG.rst b/op3_ball_detector/CHANGELOG.rst similarity index 100% rename from ball_detector/CHANGELOG.rst rename to op3_ball_detector/CHANGELOG.rst diff --git a/ball_detector/CMakeLists.txt b/op3_ball_detector/CMakeLists.txt similarity index 99% rename from ball_detector/CMakeLists.txt rename to op3_ball_detector/CMakeLists.txt index d2acc5e..d57df9d 100644 --- a/ball_detector/CMakeLists.txt +++ b/op3_ball_detector/CMakeLists.txt @@ -2,7 +2,7 @@ # Set minimum required version of cmake, project name and compile options ################################################################################ cmake_minimum_required(VERSION 2.8.3) -project(ball_detector) +project(op3_ball_detector) ################################################################################ # Find catkin packages and libraries for catkin and system dependencies diff --git a/ball_detector/cfg/DetectorParams.cfg b/op3_ball_detector/cfg/DetectorParams.cfg old mode 100755 new mode 100644 similarity index 98% rename from ball_detector/cfg/DetectorParams.cfg rename to op3_ball_detector/cfg/DetectorParams.cfg index 1d3e29c..e627907 --- a/ball_detector/cfg/DetectorParams.cfg +++ b/op3_ball_detector/cfg/DetectorParams.cfg @@ -1,5 +1,5 @@ #!/usr/bin/env python -PACKAGE='ball_detector' +PACKAGE='op3_ball_detector' from dynamic_reconfigure.parameter_generator_catkin import * diff --git a/ball_detector/cfg/DetectorParamsBlue.cfg b/op3_ball_detector/cfg/DetectorParamsBlue.cfg similarity index 98% rename from ball_detector/cfg/DetectorParamsBlue.cfg rename to op3_ball_detector/cfg/DetectorParamsBlue.cfg index b9bd967..391e99f 100644 --- a/ball_detector/cfg/DetectorParamsBlue.cfg +++ b/op3_ball_detector/cfg/DetectorParamsBlue.cfg @@ -1,5 +1,5 @@ #!/usr/bin/env python -PACKAGE='ball_detector' +PACKAGE='op3_ball_detector' from dynamic_reconfigure.parameter_generator_catkin import * diff --git a/ball_detector/cfg/DetectorParamsRed.cfg b/op3_ball_detector/cfg/DetectorParamsRed.cfg similarity index 98% rename from ball_detector/cfg/DetectorParamsRed.cfg rename to op3_ball_detector/cfg/DetectorParamsRed.cfg index 79d08a2..6d8dbad 100644 --- a/ball_detector/cfg/DetectorParamsRed.cfg +++ b/op3_ball_detector/cfg/DetectorParamsRed.cfg @@ -1,5 +1,5 @@ #!/usr/bin/env python -PACKAGE='ball_detector' +PACKAGE='op3_ball_detector' from dynamic_reconfigure.parameter_generator_catkin import * diff --git a/ball_detector/config/ball_detector_params.yaml b/op3_ball_detector/config/ball_detector_params.yaml similarity index 100% rename from ball_detector/config/ball_detector_params.yaml rename to op3_ball_detector/config/ball_detector_params.yaml diff --git a/ball_detector/config/ball_detector_params_default.yaml b/op3_ball_detector/config/ball_detector_params_default.yaml similarity index 100% rename from ball_detector/config/ball_detector_params_default.yaml rename to op3_ball_detector/config/ball_detector_params_default.yaml diff --git a/ball_detector/config/ball_detector_params_op.yaml b/op3_ball_detector/config/ball_detector_params_op.yaml similarity index 100% rename from ball_detector/config/ball_detector_params_op.yaml rename to op3_ball_detector/config/ball_detector_params_op.yaml diff --git a/ball_detector/include/ball_detector/ball_detector.h b/op3_ball_detector/include/op3_ball_detector/ball_detector.h similarity index 83% rename from ball_detector/include/ball_detector/ball_detector.h rename to op3_ball_detector/include/op3_ball_detector/ball_detector.h index 96a9981..c429222 100644 --- a/ball_detector/include/ball_detector/ball_detector.h +++ b/op3_ball_detector/include/op3_ball_detector/ball_detector.h @@ -36,13 +36,12 @@ #include #include -#include "ball_detector/DetectorParamsConfig.h" +#include "op3_ball_detector/ball_detector_config.h" -#include "ball_detector/ball_detector_config.h" - -#include "ball_detector/CircleSetStamped.h" -#include "ball_detector/GetParameters.h" -#include "ball_detector/SetParameters.h" +#include "op3_ball_detector/DetectorParamsConfig.h" +#include "op3_ball_detector/CircleSetStamped.h" +#include "op3_ball_detector/GetParameters.h" +#include "op3_ball_detector/SetParameters.h" namespace robotis_op { @@ -74,12 +73,12 @@ class BallDetector //callbacks to camera info subscription void cameraInfoCallback(const sensor_msgs::CameraInfo & msg); - void dynParamCallback(ball_detector::DetectorParamsConfig &config, uint32_t level); + void dynParamCallback(op3_ball_detector::DetectorParamsConfig &config, uint32_t level); void enableCallback(const std_msgs::Bool::ConstPtr &msg); void paramCommandCallback(const std_msgs::String::ConstPtr &msg); - bool setParamCallback(ball_detector::SetParameters::Request &req, ball_detector::SetParameters::Response &res); - bool getParamCallback(ball_detector::GetParameters::Request &req, ball_detector::GetParameters::Response &res); + bool setParamCallback(op3_ball_detector::SetParameters::Request &req, op3_ball_detector::SetParameters::Response &res); + bool getParamCallback(op3_ball_detector::GetParameters::Request &req, op3_ball_detector::GetParameters::Response &res); void resetParameter(); void publishParam(); @@ -115,7 +114,7 @@ class BallDetector int not_found_count_; //circle set publisher - ball_detector::CircleSetStamped circles_msg_; + op3_ball_detector::CircleSetStamped circles_msg_; ros::Publisher circles_pub_; //camera info subscriber @@ -157,8 +156,8 @@ class BallDetector cv::Mat in_image_; cv::Mat out_image_; - dynamic_reconfigure::Server param_server_; - dynamic_reconfigure::Server::CallbackType callback_fnc_; + dynamic_reconfigure::Server param_server_; + dynamic_reconfigure::Server::CallbackType callback_fnc_; }; } // namespace robotis_op diff --git a/ball_detector/include/ball_detector/ball_detector_config.h b/op3_ball_detector/include/op3_ball_detector/ball_detector_config.h similarity index 100% rename from ball_detector/include/ball_detector/ball_detector_config.h rename to op3_ball_detector/include/op3_ball_detector/ball_detector_config.h diff --git a/ball_detector/launch/ball_detector.launch b/op3_ball_detector/launch/ball_detector.launch similarity index 64% rename from ball_detector/launch/ball_detector.launch rename to op3_ball_detector/launch/ball_detector.launch index 34a12ba..35f57d9 100644 --- a/ball_detector/launch/ball_detector.launch +++ b/op3_ball_detector/launch/ball_detector.launch @@ -1,9 +1,9 @@ - + - + diff --git a/ball_detector/launch/ball_detector_from_usb_cam.launch b/op3_ball_detector/launch/ball_detector_from_usb_cam.launch similarity index 94% rename from ball_detector/launch/ball_detector_from_usb_cam.launch rename to op3_ball_detector/launch/ball_detector_from_usb_cam.launch index 44ecad5..7f3ae14 100644 --- a/ball_detector/launch/ball_detector_from_usb_cam.launch +++ b/op3_ball_detector/launch/ball_detector_from_usb_cam.launch @@ -23,5 +23,5 @@ - + diff --git a/ball_detector/launch/ball_detector_from_uvc.launch b/op3_ball_detector/launch/ball_detector_from_uvc.launch similarity index 92% rename from ball_detector/launch/ball_detector_from_uvc.launch rename to op3_ball_detector/launch/ball_detector_from_uvc.launch index 5946129..636caaa 100644 --- a/ball_detector/launch/ball_detector_from_uvc.launch +++ b/op3_ball_detector/launch/ball_detector_from_uvc.launch @@ -25,6 +25,6 @@ - + diff --git a/ball_detector/msg/BallDetectorParams.msg b/op3_ball_detector/msg/BallDetectorParams.msg similarity index 100% rename from ball_detector/msg/BallDetectorParams.msg rename to op3_ball_detector/msg/BallDetectorParams.msg diff --git a/ball_detector/msg/CircleSetStamped.msg b/op3_ball_detector/msg/CircleSetStamped.msg similarity index 100% rename from ball_detector/msg/CircleSetStamped.msg rename to op3_ball_detector/msg/CircleSetStamped.msg diff --git a/ball_detector/package.xml b/op3_ball_detector/package.xml similarity index 97% rename from ball_detector/package.xml rename to op3_ball_detector/package.xml index 2f2acf3..a65ef7f 100644 --- a/ball_detector/package.xml +++ b/op3_ball_detector/package.xml @@ -1,6 +1,6 @@ - ball_detector + op3_ball_detector 0.1.0 This package implements a circle-like shape detector of the input image. diff --git a/ball_detector/rviz/ball_detector.rviz b/op3_ball_detector/rviz/ball_detector.rviz similarity index 100% rename from ball_detector/rviz/ball_detector.rviz rename to op3_ball_detector/rviz/ball_detector.rviz diff --git a/ball_detector/src/ball_detector.cpp b/op3_ball_detector/src/ball_detector.cpp similarity index 97% rename from ball_detector/src/ball_detector.cpp rename to op3_ball_detector/src/ball_detector.cpp index 7dbba3c..871a1e8 100644 --- a/ball_detector/src/ball_detector.cpp +++ b/op3_ball_detector/src/ball_detector.cpp @@ -18,7 +18,7 @@ #include -#include "ball_detector/ball_detector.h" +#include "op3_ball_detector/ball_detector.h" namespace robotis_op { @@ -71,7 +71,7 @@ BallDetector::BallDetector() //sets publishers image_pub_ = it_.advertise("image_out", 100); - circles_pub_ = nh_.advertise("circle_set", 100); + circles_pub_ = nh_.advertise("circle_set", 100); camera_info_pub_ = nh_.advertise("camera_info", 100); //sets subscribers @@ -87,7 +87,7 @@ BallDetector::BallDetector() param_server_.setCallback(callback_fnc_); // web setting - param_pub_ = nh_.advertise("current_params", 1); + param_pub_ = nh_.advertise("current_params", 1); param_command_sub_ = nh_.subscribe("param_command", 1, &BallDetector::paramCommandCallback, this); set_param_client_ = nh_.advertiseService("set_param", &BallDetector::setParamCallback, this); get_param_client_ = nh_.advertiseService("get_param", &BallDetector::getParamCallback, this); @@ -233,7 +233,7 @@ void BallDetector::imageCallback(const sensor_msgs::ImageConstPtr & msg) return; } -void BallDetector::dynParamCallback(ball_detector::DetectorParamsConfig &config, uint32_t level) +void BallDetector::dynParamCallback(op3_ball_detector::DetectorParamsConfig &config, uint32_t level) { params_config_.gaussian_blur_size = config.gaussian_blur_size; params_config_.gaussian_blur_sigma = config.gaussian_blur_sigma; @@ -296,7 +296,7 @@ void BallDetector::paramCommandCallback(const std_msgs::String::ConstPtr &msg) } } -bool BallDetector::setParamCallback(ball_detector::SetParameters::Request &req, ball_detector::SetParameters::Response &res) +bool BallDetector::setParamCallback(op3_ball_detector::SetParameters::Request &req, op3_ball_detector::SetParameters::Response &res) { params_config_.gaussian_blur_size = req.params.gaussian_blur_size; params_config_.gaussian_blur_sigma = req.params.gaussian_blur_sigma; @@ -321,7 +321,7 @@ bool BallDetector::setParamCallback(ball_detector::SetParameters::Request &req, return true; } -bool BallDetector:: getParamCallback(ball_detector::GetParameters::Request &req, ball_detector::GetParameters::Response &res) +bool BallDetector:: getParamCallback(op3_ball_detector::GetParameters::Request &req, op3_ball_detector::GetParameters::Response &res) { res.returns.gaussian_blur_size = params_config_.gaussian_blur_size; res.returns.gaussian_blur_sigma = params_config_.gaussian_blur_sigma; @@ -396,7 +396,7 @@ void BallDetector::resetParameter() void BallDetector::publishParam() { - ball_detector::BallDetectorParams params; + op3_ball_detector::BallDetectorParams params; params.gaussian_blur_size = params_config_.gaussian_blur_size; params.gaussian_blur_sigma = params_config_.gaussian_blur_sigma; diff --git a/ball_detector/src/ball_detector_node.cpp b/op3_ball_detector/src/ball_detector_node.cpp similarity index 96% rename from ball_detector/src/ball_detector_node.cpp rename to op3_ball_detector/src/ball_detector_node.cpp index 5560d56..117127d 100644 --- a/ball_detector/src/ball_detector_node.cpp +++ b/op3_ball_detector/src/ball_detector_node.cpp @@ -16,7 +16,7 @@ /* Author: Kayman Jung */ -#include "ball_detector/ball_detector.h" +#include "op3_ball_detector/ball_detector.h" //node main int main(int argc, char **argv) diff --git a/ball_detector/srv/GetParameters.srv b/op3_ball_detector/srv/GetParameters.srv similarity index 100% rename from ball_detector/srv/GetParameters.srv rename to op3_ball_detector/srv/GetParameters.srv diff --git a/ball_detector/srv/SetParameters.srv b/op3_ball_detector/srv/SetParameters.srv similarity index 100% rename from ball_detector/srv/SetParameters.srv rename to op3_ball_detector/srv/SetParameters.srv diff --git a/op3_demo/CMakeLists.txt b/op3_demo/CMakeLists.txt index 42445a0..381f872 100644 --- a/op3_demo/CMakeLists.txt +++ b/op3_demo/CMakeLists.txt @@ -18,7 +18,7 @@ find_package(catkin REQUIRED COMPONENTS op3_action_module_msgs cmake_modules robotis_math - ball_detector + op3_ball_detector ) find_package(Boost REQUIRED COMPONENTS thread) @@ -71,7 +71,7 @@ catkin_package( op3_action_module_msgs cmake_modules robotis_math - ball_detector + op3_ball_detector DEPENDS Boost EIGEN3 ) diff --git a/op3_demo/include/op3_demo/ball_follower.h b/op3_demo/include/op3_demo/ball_follower.h index 7ec1d46..283d842 100644 --- a/op3_demo/include/op3_demo/ball_follower.h +++ b/op3_demo/include/op3_demo/ball_follower.h @@ -29,7 +29,7 @@ #include #include "robotis_controller_msgs/JointCtrlModule.h" -#include "ball_detector/CircleSetStamped.h" +#include "op3_ball_detector/CircleSetStamped.h" #include "op3_walking_module_msgs/WalkingParam.h" #include "op3_walking_module_msgs/GetWalkingParam.h" diff --git a/op3_demo/include/op3_demo/ball_tracker.h b/op3_demo/include/op3_demo/ball_tracker.h index 5461494..e5fe9ff 100644 --- a/op3_demo/include/op3_demo/ball_tracker.h +++ b/op3_demo/include/op3_demo/ball_tracker.h @@ -29,7 +29,7 @@ #include #include "robotis_controller_msgs/JointCtrlModule.h" -#include "ball_detector/CircleSetStamped.h" +#include "op3_ball_detector/CircleSetStamped.h" #include "op3_walking_module_msgs/WalkingParam.h" #include "op3_walking_module_msgs/GetWalkingParam.h" @@ -79,7 +79,7 @@ class BallTracker const int WAITING_THRESHOLD; const bool DEBUG_PRINT; - void ballPositionCallback(const ball_detector::CircleSetStamped::ConstPtr &msg); + void ballPositionCallback(const op3_ball_detector::CircleSetStamped::ConstPtr &msg); void ballTrackerCommandCallback(const std_msgs::String::ConstPtr &msg); void publishHeadJoint(double pan, double tilt); void scanBall(); diff --git a/op3_demo/launch/demo.launch b/op3_demo/launch/demo.launch index 2b5281c..d6d26b4 100644 --- a/op3_demo/launch/demo.launch +++ b/op3_demo/launch/demo.launch @@ -4,7 +4,7 @@ - + diff --git a/op3_demo/launch/self_test.launch b/op3_demo/launch/self_test.launch index 623004e..00c9acb 100644 --- a/op3_demo/launch/self_test.launch +++ b/op3_demo/launch/self_test.launch @@ -5,7 +5,7 @@ - + diff --git a/op3_demo/package.xml b/op3_demo/package.xml index 85bd36e..1a0785c 100644 --- a/op3_demo/package.xml +++ b/op3_demo/package.xml @@ -24,7 +24,7 @@ op3_action_module_msgs cmake_modules robotis_math - ball_detector + op3_ball_detector boost eigen yaml-cpp diff --git a/op3_demo/src/soccer/ball_tracker.cpp b/op3_demo/src/soccer/ball_tracker.cpp index 355a21c..e90bb54 100644 --- a/op3_demo/src/soccer/ball_tracker.cpp +++ b/op3_demo/src/soccer/ball_tracker.cpp @@ -59,7 +59,7 @@ BallTracker::~BallTracker() } -void BallTracker::ballPositionCallback(const ball_detector::CircleSetStamped::ConstPtr &msg) +void BallTracker::ballPositionCallback(const op3_ball_detector::CircleSetStamped::ConstPtr &msg) { for (int idx = 0; idx < msg->circles.size(); idx++) { From fd57628bc573a6a1aed14c84986df049ef0d13c6 Mon Sep 17 00:00:00 2001 From: Kayman Date: Wed, 18 Apr 2018 11:37:01 +0900 Subject: [PATCH 16/18] fixed package.xml --- robotis_op3_demo/package.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/robotis_op3_demo/package.xml b/robotis_op3_demo/package.xml index 7cf0810..c49be14 100644 --- a/robotis_op3_demo/package.xml +++ b/robotis_op3_demo/package.xml @@ -13,7 +13,7 @@ https://github.com/ROBOTIS-GIT/ROBOTIS-OP3-Demo https://github.com/ROBOTIS-GIT/ROBOTIS-OP3-Demo/issues catkin - ball_detector + op3_ball_detector op3_demo From 13a60409cc93d6da2d3b837484c52c0206b5dcc2 Mon Sep 17 00:00:00 2001 From: Kayman Date: Wed, 18 Apr 2018 13:11:08 +0900 Subject: [PATCH 17/18] Changing file permissions --- op3_ball_detector/cfg/DetectorParams.cfg | 0 op3_ball_detector/cfg/DetectorParamsBlue.cfg | 0 op3_ball_detector/cfg/DetectorParamsRed.cfg | 0 3 files changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 op3_ball_detector/cfg/DetectorParams.cfg mode change 100644 => 100755 op3_ball_detector/cfg/DetectorParamsBlue.cfg mode change 100644 => 100755 op3_ball_detector/cfg/DetectorParamsRed.cfg diff --git a/op3_ball_detector/cfg/DetectorParams.cfg b/op3_ball_detector/cfg/DetectorParams.cfg old mode 100644 new mode 100755 diff --git a/op3_ball_detector/cfg/DetectorParamsBlue.cfg b/op3_ball_detector/cfg/DetectorParamsBlue.cfg old mode 100644 new mode 100755 diff --git a/op3_ball_detector/cfg/DetectorParamsRed.cfg b/op3_ball_detector/cfg/DetectorParamsRed.cfg old mode 100644 new mode 100755 From de45d7d080c848ae1d79e506ed18089fc8669de5 Mon Sep 17 00:00:00 2001 From: Kayman Date: Thu, 19 Apr 2018 11:45:31 +0900 Subject: [PATCH 18/18] changed rviz config file --- op3_bringup/rviz/op3_bringup.rviz | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/op3_bringup/rviz/op3_bringup.rviz b/op3_bringup/rviz/op3_bringup.rviz index 7a00cca..cffe130 100644 --- a/op3_bringup/rviz/op3_bringup.rviz +++ b/op3_bringup/rviz/op3_bringup.rviz @@ -281,6 +281,15 @@ Visualization Manager: {} Update Interval: 0 Value: true + - Alpha: 0.200000003 + Class: rviz_plugin_tutorials/Imu + Color: 204; 51; 204 + Enabled: true + History Length: 1 + Name: Imu + Topic: /robotis/open_cr/imu + Unreliable: false + Value: true Enabled: true Global Options: Background Color: 48; 48; 48 @@ -306,7 +315,7 @@ Visualization Manager: Views: Current: Class: rviz/Orbit - Distance: 1.0015856 + Distance: 2.32116389 Enable Stereo Rendering: Stereo Eye Separation: 0.0599999987 Stereo Focal Distance: 1 @@ -321,10 +330,10 @@ Visualization Manager: Invert Z Axis: false Name: Current View Near Clip Distance: 0.00999999978 - Pitch: 0.425398082 + Pitch: 0.275397927 Target Frame: Value: Orbit (rviz) - Yaw: 5.78858471 + Yaw: 5.68858385 Saved: ~ Window Geometry: Displays: