diff --git a/orbbec_camera/CMakeLists.txt b/orbbec_camera/CMakeLists.txt index 2d5ad886..58f3aa05 100644 --- a/orbbec_camera/CMakeLists.txt +++ b/orbbec_camera/CMakeLists.txt @@ -302,19 +302,19 @@ rclcpp_components_register_node( ${PROJECT_NAME} PLUGIN "orbbec_camera::OBCameraNodeDriver" EXECUTABLE orbbec_camera_node ) -add_library(gige_action_command_component SHARED src/gige_action_command_node.cpp) -target_include_directories(gige_action_command_component PUBLIC ${COMMON_INCLUDE_DIRS}) -target_link_directories(gige_action_command_component PRIVATE ${ORBBEC_LIBS_DIR}) -target_link_libraries(gige_action_command_component +add_library(action_command_component SHARED src/action_command_node.cpp) +target_include_directories(action_command_component PUBLIC ${COMMON_INCLUDE_DIRS}) +target_link_directories(action_command_component PRIVATE ${ORBBEC_LIBS_DIR}) +target_link_libraries(action_command_component ${orbbec_camera_msgs_TARGETS} OrbbecSDK rclcpp::rclcpp ) -orbbec_target_dependencies(gige_action_command_component rclcpp_components) +orbbec_target_dependencies(action_command_component rclcpp_components) rclcpp_components_register_node( - gige_action_command_component - PLUGIN "orbbec_camera::GigEActionCommandNode" - EXECUTABLE gige_action_command_node + action_command_component + PLUGIN "orbbec_camera::ActionCommandNode" + EXECUTABLE action_command_node ) # Add nodes using the macro @@ -408,7 +408,7 @@ rclcpp_components_register_node( ) # Install rules -install(TARGETS ${PROJECT_NAME} gige_action_command_component frame_latency start_benchmark +install(TARGETS ${PROJECT_NAME} action_command_component frame_latency start_benchmark multi_save_rgbir ARCHIVE DESTINATION lib LIBRARY DESTINATION lib RUNTIME DESTINATION bin ) diff --git a/orbbec_camera/examples/README.MD b/orbbec_camera/examples/README.MD index 118ed5e0..19236c73 100644 --- a/orbbec_camera/examples/README.MD +++ b/orbbec_camera/examples/README.MD @@ -13,7 +13,7 @@ For command-line maintenance and diagnostic utilities, see the official | Source | Purpose | Experience Level | Usage Guide | | :---: | --- | :---: | --- | | [Multi-camera network](./multi_net_camera) | Launch multiple supported Orbbec network cameras. | ⭐️ | [EN](https://orbbec.github.io/OrbbecSDK_ROS2/en/source/camera_devices/5_advanced_guide/configuration/net_camera.html) / [中文](https://orbbec.github.io/OrbbecSDK_ROS2/zh/source/camera_devices/5_advanced_guide/configuration/net_camera.html) | -| [GigE Action Command](./gige_action_command) | Configure and trigger a Gemini 335Le camera group over GVCP. | ⭐️⭐️ | [EN](https://orbbec.github.io/OrbbecSDK_ROS2/en/source/camera_devices/5_advanced_guide/multi_camera/gige_action_command.html) / [中文](https://orbbec.github.io/OrbbecSDK_ROS2/zh/source/camera_devices/5_advanced_guide/multi_camera/gige_action_command.html) | +| [Action Command](./action_command) | Configure and trigger a Gemini 335Le camera group over GVCP. | ⭐️⭐️ | [EN](https://orbbec.github.io/OrbbecSDK_ROS2/en/source/camera_devices/5_advanced_guide/multi_camera/action_command.html) / [中文](https://orbbec.github.io/OrbbecSDK_ROS2/zh/source/camera_devices/5_advanced_guide/multi_camera/action_command.html) | | [GMSL camera](./gmsl_multi_camera_sync) | Synchronize two GMSL-connected Gemini 330 Series cameras. | ⭐️⭐️ | [EN](https://orbbec.github.io/OrbbecSDK_ROS2/en/source/camera_devices/5_advanced_guide/multi_camera/gmsl_camera.html) / [中文](https://orbbec.github.io/OrbbecSDK_ROS2/zh/source/camera_devices/5_advanced_guide/multi_camera/gmsl_camera.html) | | [Shared component container](./multi_camera_shared_container) | Load multiple Gemini 330 Series cameras into one component container. | ⭐️⭐️ | [EN](https://orbbec.github.io/OrbbecSDK_ROS2/en/source/camera_devices/5_advanced_guide/performance/efficient_intra_process_communication.html) / [中文](https://orbbec.github.io/OrbbecSDK_ROS2/zh/source/camera_devices/5_advanced_guide/performance/efficient_intra_process_communication.html) | | [AE/AWB lock test](./ae_awb_lock) | Verify AE/AWB convergence, frame-metadata capture, and manual lock-in through ROS 2. | ⭐️⭐️ | [EN](https://orbbec.github.io/OrbbecSDK_ROS2/en/source/camera_devices/4_application_guide/examples/ae_awb_lock.html) / [中文](https://orbbec.github.io/OrbbecSDK_ROS2/zh/source/camera_devices/4_application_guide/examples/ae_awb_lock.html) | diff --git a/orbbec_camera/examples/action_command/README.md b/orbbec_camera/examples/action_command/README.md new file mode 100644 index 00000000..3f0b866b --- /dev/null +++ b/orbbec_camera/examples/action_command/README.md @@ -0,0 +1,17 @@ +# Action Command + +This example starts two Gemini 335Le cameras in Group Actions synchronization mode and one host-side Action Command sender. + +## Before running + +Use Gemini 335Le firmware 1.8.24 or later and Orbbec SDK 2.10.2 or later. Connect both cameras and the host to the same network, then set the two `net_device_ip` values in `multi_action_command.launch.py` to the camera IP addresses. + +## Run + +```bash +ros2 launch orbbec_camera multi_action_command.launch.py +``` + +## Full guide + +[Action Command (English)](https://orbbec.github.io/OrbbecSDK_ROS2/en/source/camera_devices/5_advanced_guide/multi_camera/action_command.html) · [中文指南](https://orbbec.github.io/OrbbecSDK_ROS2/zh/source/camera_devices/5_advanced_guide/multi_camera/action_command.html) diff --git a/orbbec_camera/examples/gige_action_command/multi_gige_action_command.launch.py b/orbbec_camera/examples/action_command/multi_action_command.launch.py similarity index 95% rename from orbbec_camera/examples/gige_action_command/multi_gige_action_command.launch.py rename to orbbec_camera/examples/action_command/multi_action_command.launch.py index 686f16b0..77d221b3 100644 --- a/orbbec_camera/examples/gige_action_command/multi_gige_action_command.launch.py +++ b/orbbec_camera/examples/action_command/multi_action_command.launch.py @@ -41,8 +41,8 @@ def generate_launch_description(): action_command_node = Node( package="orbbec_camera", - executable="gige_action_command_node", - name="gige_action_command_node", + executable="action_command_node", + name="action_command_node", output="screen", ) diff --git a/orbbec_camera/examples/gige_action_command/README.md b/orbbec_camera/examples/gige_action_command/README.md deleted file mode 100644 index 2883f016..00000000 --- a/orbbec_camera/examples/gige_action_command/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# GigE Action Command - -This example starts two Gemini 335Le cameras in Group Actions synchronization mode and one host-side Action Command sender. - -## Before running - -Use Gemini 335Le firmware 1.8.24 or later and Orbbec SDK 2.10.2 or later. Connect both cameras and the host to the same network, then set the two `net_device_ip` values in `multi_gige_action_command.launch.py` to the camera IP addresses. - -## Run - -```bash -ros2 launch orbbec_camera multi_gige_action_command.launch.py -``` - -## Full guide - -[GigE Action Command (English)](https://orbbec.github.io/OrbbecSDK_ROS2/en/source/camera_devices/5_advanced_guide/multi_camera/gige_action_command.html) · [中文指南](https://orbbec.github.io/OrbbecSDK_ROS2/zh/source/camera_devices/5_advanced_guide/multi_camera/gige_action_command.html) diff --git a/orbbec_camera/include/orbbec_camera/gige_action_command_node.h b/orbbec_camera/include/orbbec_camera/action_command_node.h similarity index 90% rename from orbbec_camera/include/orbbec_camera/gige_action_command_node.h rename to orbbec_camera/include/orbbec_camera/action_command_node.h index e7768790..e4dc97b1 100644 --- a/orbbec_camera/include/orbbec_camera/gige_action_command_node.h +++ b/orbbec_camera/include/orbbec_camera/action_command_node.h @@ -25,9 +25,9 @@ namespace orbbec_camera { -class GigEActionCommandNode : public rclcpp::Node { +class ActionCommandNode : public rclcpp::Node { public: - explicit GigEActionCommandNode(const rclcpp::NodeOptions& node_options = rclcpp::NodeOptions()); + explicit ActionCommandNode(const rclcpp::NodeOptions& node_options = rclcpp::NodeOptions()); private: void sendActionCommandCallback( diff --git a/orbbec_camera/src/gige_action_command_node.cpp b/orbbec_camera/src/action_command_node.cpp similarity index 91% rename from orbbec_camera/src/gige_action_command_node.cpp rename to orbbec_camera/src/action_command_node.cpp index 6cc0dbbb..d85c7473 100644 --- a/orbbec_camera/src/gige_action_command_node.cpp +++ b/orbbec_camera/src/action_command_node.cpp @@ -14,7 +14,7 @@ * limitations under the License. *******************************************************************************/ -#include "orbbec_camera/gige_action_command_node.h" +#include "orbbec_camera/action_command_node.h" #include #include @@ -54,16 +54,16 @@ bool getSystemTimeMilliseconds(uint64_t* milliseconds, std::string* error_messag } // namespace -GigEActionCommandNode::GigEActionCommandNode(const rclcpp::NodeOptions& node_options) - : Node("gige_action_command_node", node_options), context_(std::make_unique()) { +ActionCommandNode::ActionCommandNode(const rclcpp::NodeOptions& node_options) + : Node("action_command_node", node_options), context_(std::make_unique()) { context_->enableNetDeviceEnumeration(true); send_action_command_service_ = create_service( - "~/send_action_command", std::bind(&GigEActionCommandNode::sendActionCommandCallback, this, + "~/send_action_command", std::bind(&ActionCommandNode::sendActionCommandCallback, this, std::placeholders::_1, std::placeholders::_2)); - RCLCPP_INFO(get_logger(), "GigE Action Command service is ready"); + RCLCPP_INFO(get_logger(), "Action Command service is ready"); } -void GigEActionCommandNode::sendActionCommandCallback( +void ActionCommandNode::sendActionCommandCallback( const std::shared_ptr request, std::shared_ptr response) { if (!request) { @@ -169,4 +169,4 @@ void GigEActionCommandNode::sendActionCommandCallback( } // namespace orbbec_camera -RCLCPP_COMPONENTS_REGISTER_NODE(orbbec_camera::GigEActionCommandNode) +RCLCPP_COMPONENTS_REGISTER_NODE(orbbec_camera::ActionCommandNode)