mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-08 05:47:45 +08:00
Update OrbbecSDK_ROS2 to v2.3.0
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
# Net_camera
|
||||
|
||||
> This section describes how to use Net camera in OrbbecSDK_ROS2.Currently, only Femto_Mega devices are supported, and other Net devices will be supported in the near future.
|
||||
|
||||
## Parameter Introduction
|
||||
|
||||
Network device settings: default `enumerate_net_device` is set to true, which will automatically enumerate network devices.
|
||||
|
||||
If you do not want to automatically enumerate network devices,you can set `enumerate_net_device` to false, `net_device_ip` to the device's IP address, and `net_device_port` to the default value of 8090.
|
||||
|
||||
* `enumerate_net_device` : Enable automatically enumerate network devices.
|
||||
|
||||
* `net_device_ip` : Setting net device's IP address.
|
||||
|
||||
* `net_device_port` : Setting net device's port.Usually, you can set it to 8090.
|
||||
|
||||
## Single Net camera
|
||||
|
||||
For [femto_mega.launch.py](../../launch/femto_mega.launch.py) as an example:
|
||||
|
||||
### automatically enumerate network devices:
|
||||
|
||||
```bash
|
||||
ros2 launch orbbec_camera femto_mega.launch.py enumerate_net_device:=true
|
||||
```
|
||||
|
||||
### Specify IP address to start the device:
|
||||
|
||||
Note: `net_device_ip` needs to be changed to the IP address of the device, here it is 192.168.1.10
|
||||
|
||||
```bash
|
||||
ros2 launch orbbec_camera femto_mega.launch.py enumerate_net_device:=false net_device_ip:=192.168.1.10 net_device_port:=8090
|
||||
```
|
||||
|
||||
## Multi Net camera
|
||||
|
||||
For [multi_net_camera.launch.py](./multi_net_camera.launch.py) as an example:
|
||||
|
||||
```bash
|
||||
ros2 launch orbbec_camera multi_net_camera.launch.py
|
||||
```
|
||||
@@ -0,0 +1,52 @@
|
||||
from launch import LaunchDescription
|
||||
from launch.actions import (
|
||||
DeclareLaunchArgument,
|
||||
IncludeLaunchDescription,
|
||||
GroupAction,
|
||||
ExecuteProcess,
|
||||
)
|
||||
from launch.launch_description_sources import PythonLaunchDescriptionSource
|
||||
from launch_ros.actions import Node
|
||||
from ament_index_python.packages import get_package_share_directory
|
||||
import os
|
||||
|
||||
|
||||
def generate_launch_description():
|
||||
# Include launch files
|
||||
package_dir = get_package_share_directory("orbbec_camera")
|
||||
launch_file_dir = os.path.join(package_dir, "launch")
|
||||
launch1_include = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(launch_file_dir, "femto_mega.launch.py")
|
||||
),
|
||||
launch_arguments={
|
||||
"camera_name": "camera_01",
|
||||
"net_device_ip": "192.168.2.10",
|
||||
"net_device_port": "8090",
|
||||
"sync_mode": "standalone",
|
||||
}.items(),
|
||||
)
|
||||
|
||||
launch2_include = IncludeLaunchDescription(
|
||||
PythonLaunchDescriptionSource(
|
||||
os.path.join(launch_file_dir, "femto_mega.launch.py")
|
||||
),
|
||||
launch_arguments={
|
||||
"camera_name": "camera_02",
|
||||
"net_device_ip": "192.168.1.11",
|
||||
"net_device_port": "8090",
|
||||
"sync_mode": "standalone",
|
||||
}.items(),
|
||||
)
|
||||
|
||||
# If you need more cameras, just add more launch_include here, and change the usb_port and device_num
|
||||
|
||||
# Launch description
|
||||
ld = LaunchDescription(
|
||||
[
|
||||
GroupAction([launch1_include]),
|
||||
GroupAction([launch2_include]),
|
||||
]
|
||||
)
|
||||
|
||||
return ld
|
||||
Reference in New Issue
Block a user