refactor: rename and replace GigE Action Command with Action Command functionality

This commit is contained in:
ob-yalian
2026-09-29 15:08:39 +08:00
parent db5404d1fe
commit dfb47e6ee4
7 changed files with 38 additions and 38 deletions
+9 -9
View File
@@ -302,19 +302,19 @@ rclcpp_components_register_node(
${PROJECT_NAME} PLUGIN "orbbec_camera::OBCameraNodeDriver" EXECUTABLE orbbec_camera_node ${PROJECT_NAME} PLUGIN "orbbec_camera::OBCameraNodeDriver" EXECUTABLE orbbec_camera_node
) )
add_library(gige_action_command_component SHARED src/gige_action_command_node.cpp) add_library(action_command_component SHARED src/action_command_node.cpp)
target_include_directories(gige_action_command_component PUBLIC ${COMMON_INCLUDE_DIRS}) target_include_directories(action_command_component PUBLIC ${COMMON_INCLUDE_DIRS})
target_link_directories(gige_action_command_component PRIVATE ${ORBBEC_LIBS_DIR}) target_link_directories(action_command_component PRIVATE ${ORBBEC_LIBS_DIR})
target_link_libraries(gige_action_command_component target_link_libraries(action_command_component
${orbbec_camera_msgs_TARGETS} ${orbbec_camera_msgs_TARGETS}
OrbbecSDK OrbbecSDK
rclcpp::rclcpp rclcpp::rclcpp
) )
orbbec_target_dependencies(gige_action_command_component rclcpp_components) orbbec_target_dependencies(action_command_component rclcpp_components)
rclcpp_components_register_node( rclcpp_components_register_node(
gige_action_command_component action_command_component
PLUGIN "orbbec_camera::GigEActionCommandNode" PLUGIN "orbbec_camera::ActionCommandNode"
EXECUTABLE gige_action_command_node EXECUTABLE action_command_node
) )
# Add nodes using the macro # Add nodes using the macro
@@ -408,7 +408,7 @@ rclcpp_components_register_node(
) )
# Install rules # 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 multi_save_rgbir ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib RUNTIME DESTINATION bin LIBRARY DESTINATION lib RUNTIME DESTINATION bin
) )
+1 -1
View File
@@ -13,7 +13,7 @@ For command-line maintenance and diagnostic utilities, see the official
| Source | Purpose | Experience Level | Usage Guide | | 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) | | [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) | | [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) | | [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) | | [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) |
@@ -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)
@@ -41,8 +41,8 @@ def generate_launch_description():
action_command_node = Node( action_command_node = Node(
package="orbbec_camera", package="orbbec_camera",
executable="gige_action_command_node", executable="action_command_node",
name="gige_action_command_node", name="action_command_node",
output="screen", output="screen",
) )
@@ -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)
@@ -25,9 +25,9 @@
namespace orbbec_camera { namespace orbbec_camera {
class GigEActionCommandNode : public rclcpp::Node { class ActionCommandNode : public rclcpp::Node {
public: public:
explicit GigEActionCommandNode(const rclcpp::NodeOptions& node_options = rclcpp::NodeOptions()); explicit ActionCommandNode(const rclcpp::NodeOptions& node_options = rclcpp::NodeOptions());
private: private:
void sendActionCommandCallback( void sendActionCommandCallback(
@@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*******************************************************************************/ *******************************************************************************/
#include "orbbec_camera/gige_action_command_node.h" #include "orbbec_camera/action_command_node.h"
#include <chrono> #include <chrono>
#include <cstdint> #include <cstdint>
@@ -54,16 +54,16 @@ bool getSystemTimeMilliseconds(uint64_t* milliseconds, std::string* error_messag
} // namespace } // namespace
GigEActionCommandNode::GigEActionCommandNode(const rclcpp::NodeOptions& node_options) ActionCommandNode::ActionCommandNode(const rclcpp::NodeOptions& node_options)
: Node("gige_action_command_node", node_options), context_(std::make_unique<ob::Context>()) { : Node("action_command_node", node_options), context_(std::make_unique<ob::Context>()) {
context_->enableNetDeviceEnumeration(true); context_->enableNetDeviceEnumeration(true);
send_action_command_service_ = create_service<orbbec_camera_msgs::srv::SendActionCommand>( send_action_command_service_ = create_service<orbbec_camera_msgs::srv::SendActionCommand>(
"~/send_action_command", std::bind(&GigEActionCommandNode::sendActionCommandCallback, this, "~/send_action_command", std::bind(&ActionCommandNode::sendActionCommandCallback, this,
std::placeholders::_1, std::placeholders::_2)); 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<orbbec_camera_msgs::srv::SendActionCommand::Request> request, const std::shared_ptr<orbbec_camera_msgs::srv::SendActionCommand::Request> request,
std::shared_ptr<orbbec_camera_msgs::srv::SendActionCommand::Response> response) { std::shared_ptr<orbbec_camera_msgs::srv::SendActionCommand::Response> response) {
if (!request) { if (!request) {
@@ -169,4 +169,4 @@ void GigEActionCommandNode::sendActionCommandCallback(
} // namespace orbbec_camera } // namespace orbbec_camera
RCLCPP_COMPONENTS_REGISTER_NODE(orbbec_camera::GigEActionCommandNode) RCLCPP_COMPONENTS_REGISTER_NODE(orbbec_camera::ActionCommandNode)