mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-09-13 19:40:19 +08:00
Add the enable switch function for network device enumeration.
This commit is contained in:
@@ -335,6 +335,8 @@ The following are the launch parameters available:
|
|||||||
- `gyro_range` : The range of the gyroscope, the optional values
|
- `gyro_range` : The range of the gyroscope, the optional values
|
||||||
are `16dps`,`31dps`,`62dps`,`125dps`,`250dps`,`500dps`,`1000dps`,`2000dps`. The specific value depends on the current
|
are `16dps`,`31dps`,`62dps`,`125dps`,`250dps`,`500dps`,`1000dps`,`2000dps`. The specific value depends on the current
|
||||||
camera.
|
camera.
|
||||||
|
- `enumerate_net_device` : Whether to enable the function of enumerating network devices. True means enabled, false means disabled.
|
||||||
|
This feature is only supported by Femto Mega and Gemini 2 XL devices. When accessing these devices through the network, the IP address of the device needs to be configured in advance. The enable switch needs to be set to true.
|
||||||
|
|
||||||
## Depth work mode switch
|
## Depth work mode switch
|
||||||
- Before starting the camera, depth work mode (depth_work_mode) can be configured for the corresponding xxx.launch.py file's support.
|
- Before starting the camera, depth work mode (depth_work_mode) can be configured for the corresponding xxx.launch.py file's support.
|
||||||
|
|||||||
@@ -322,6 +322,8 @@ ros2 launch orbbec_camera multi_camera.launch.py
|
|||||||
`100hz`,`200hz`,`500hz`,`1khz`,`2khz`,`4khz`,`8khz`,`16khz`,`32khz`。具体的值取决于当前的相机型号。
|
`100hz`,`200hz`,`500hz`,`1khz`,`2khz`,`4khz`,`8khz`,`16khz`,`32khz`。具体的值取决于当前的相机型号。
|
||||||
- `gyro_range` : 陀螺仪的量程, 可选值为`16dps`,`31dps`,`62dps`,`125dps`,`250dps`,`500dps`,`1000dps`,`2000dps`
|
- `gyro_range` : 陀螺仪的量程, 可选值为`16dps`,`31dps`,`62dps`,`125dps`,`250dps`,`500dps`,`1000dps`,`2000dps`
|
||||||
。具体的值取决于当前的相机型号。
|
。具体的值取决于当前的相机型号。
|
||||||
|
- `enumerate_net_device` : 是否开启枚举网络设备的功能,true为开启,false为关闭,仅Femto mega和Gemini 2 XL设备支持。
|
||||||
|
当通过网络方式访问以上设备时,需提前配置好设备的IP地址,使能开关需要配置成true。
|
||||||
|
|
||||||
## 深度模式切换:
|
## 深度模式切换:
|
||||||
- 启动相机前,可通过配置对应相继的xxx.launch.py的深度模式(depth_work_mode)支持。
|
- 启动相机前,可通过配置对应相继的xxx.launch.py的深度模式(depth_work_mode)支持。
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ def generate_launch_description():
|
|||||||
DeclareLaunchArgument('tf_publish_rate', default_value='10.0'),
|
DeclareLaunchArgument('tf_publish_rate', default_value='10.0'),
|
||||||
DeclareLaunchArgument('ir_info_url', default_value=''),
|
DeclareLaunchArgument('ir_info_url', default_value=''),
|
||||||
DeclareLaunchArgument('color_info_url', default_value=''),
|
DeclareLaunchArgument('color_info_url', default_value=''),
|
||||||
|
DeclareLaunchArgument('enumerate_net_device', default_value='false'),
|
||||||
DeclareLaunchArgument('log_level', default_value='none'),
|
DeclareLaunchArgument('log_level', default_value='none'),
|
||||||
DeclareLaunchArgument('enable_publish_extrinsic', default_value='false'),
|
DeclareLaunchArgument('enable_publish_extrinsic', default_value='false'),
|
||||||
DeclareLaunchArgument('enable_d2c_viewer', default_value='false'),
|
DeclareLaunchArgument('enable_d2c_viewer', default_value='false'),
|
||||||
|
|||||||
@@ -67,6 +67,7 @@ def generate_launch_description():
|
|||||||
DeclareLaunchArgument('tf_publish_rate', default_value='10.0'),
|
DeclareLaunchArgument('tf_publish_rate', default_value='10.0'),
|
||||||
DeclareLaunchArgument('ir_info_url', default_value=''),
|
DeclareLaunchArgument('ir_info_url', default_value=''),
|
||||||
DeclareLaunchArgument('color_info_url', default_value=''),
|
DeclareLaunchArgument('color_info_url', default_value=''),
|
||||||
|
DeclareLaunchArgument('enumerate_net_device', default_value='false'),
|
||||||
DeclareLaunchArgument('log_level', default_value='none'),
|
DeclareLaunchArgument('log_level', default_value='none'),
|
||||||
DeclareLaunchArgument('enable_publish_extrinsic', default_value='false'),
|
DeclareLaunchArgument('enable_publish_extrinsic', default_value='false'),
|
||||||
DeclareLaunchArgument('enable_d2c_viewer', default_value='false'),
|
DeclareLaunchArgument('enable_d2c_viewer', default_value='false'),
|
||||||
|
|||||||
@@ -88,6 +88,8 @@ void OBCameraNodeDriver::init() {
|
|||||||
serial_number_ = declare_parameter<std::string>("serial_number", "");
|
serial_number_ = declare_parameter<std::string>("serial_number", "");
|
||||||
device_num_ = static_cast<int>(declare_parameter<int>("device_num", 1));
|
device_num_ = static_cast<int>(declare_parameter<int>("device_num", 1));
|
||||||
usb_port_ = declare_parameter<std::string>("usb_port", "");
|
usb_port_ = declare_parameter<std::string>("usb_port", "");
|
||||||
|
auto enumerate_net_device_ = declare_parameter<bool>("enumerate_net_device", "false");
|
||||||
|
ctx_->enableNetDeviceEnumeration(enumerate_net_device_);
|
||||||
ctx_->setDeviceChangedCallback([this](const std::shared_ptr<ob::DeviceList> &removed_list,
|
ctx_->setDeviceChangedCallback([this](const std::shared_ptr<ob::DeviceList> &removed_list,
|
||||||
const std::shared_ptr<ob::DeviceList> &added_list) {
|
const std::shared_ptr<ob::DeviceList> &added_list) {
|
||||||
(void)added_list;
|
(void)added_list;
|
||||||
|
|||||||
Reference in New Issue
Block a user