Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

Commit

Permalink
rename realsense_examples as realsense_node
Browse files Browse the repository at this point in the history
Signed-off-by: Xiaojun <[email protected]>
  • Loading branch information
xhuan28 committed Aug 29, 2019
1 parent 8678ee8 commit cc6f2fe
Show file tree
Hide file tree
Showing 14 changed files with 251 additions and 119 deletions.
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt → realsense_node/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(realsense_examples)
project(realsense_node)

# Default to C99
if(NOT CMAKE_C_STANDARD)
Expand Down
4 changes: 2 additions & 2 deletions examples/package.xml → realsense_node/package.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>realsense_examples</name>
<name>realsense_node</name>
<version>0.0.1</version>
<description>Examples for ROS2 realsense package</description>
<description>ROS2 realsense node</description>
<maintainer email="[email protected]">Xiaojun Huang</maintainer>
<license>Apache License 2.0</license>

Expand Down
File renamed without changes.
File renamed without changes.
45 changes: 22 additions & 23 deletions realsense_ros/config/d415.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
/d415:
camera:
ros__parameters:
serial_no: 725112060212 # d415
align_depth: true
enable_pointcloud: true
#base_frame_id:
color0:
enabled: true
resolution: [640,480]
fps: 30
depth0:
enabled: true
resolution: [640,480]
fps: 30
infra1:
enabled: true
resolution: [640,480]
fps: 30
infra2:
enabled: true
resolution: [640,480]
fps: 30
camera:
ros__parameters:
serial_no: 725112060212 # d415
align_depth: false
enable_pointcloud: false
#base_frame_id:
color0:
enabled: true
resolution: [640,480]
fps: 30
depth0:
enabled: true
resolution: [640,480]
fps: 30
infra1:
enabled: true
resolution: [640,480]
fps: 30
infra2:
enabled: true
resolution: [640,480]
fps: 30
45 changes: 22 additions & 23 deletions realsense_ros/config/d435.yaml
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
/d435:
camera:
ros__parameters:
serial_no: 727212071015 # d435
align_depth: true
enable_pointcloud: true
#base_frame_id:
color0:
enabled: true
resolution: [640,480]
fps: 30
depth0:
enabled: true
resolution: [640,480]
fps: 30
infra1:
enabled: true
resolution: [640,480]
fps: 30
infra2:
enabled: true
resolution: [640,480]
fps: 30
camera:
ros__parameters:
serial_no: 727212071015 # d435
align_depth: false
enable_pointcloud: false
#base_frame_id:
color0:
enabled: true
resolution: [640,480]
fps: 30
depth0:
enabled: true
resolution: [640,480]
fps: 30
infra1:
enabled: true
resolution: [640,480]
fps: 30
infra2:
enabled: true
resolution: [640,480]
fps: 30
53 changes: 26 additions & 27 deletions realsense_ros/config/d435i.yaml
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
/d435i:
camera:
ros__parameters:
serial_no: 843112073259 # d435i
align_depth: true
enable_pointcloud: true
#base_frame_id:
color0:
enabled: true
resolution: [640,480]
fps: 30
depth0:
enabled: true
resolution: [640,480]
fps: 30
infra1:
enabled: true
resolution: [640,480]
fps: 30
infra2:
enabled: true
resolution: [640,480]
fps: 30
accel0:
enabled: true
gyro0:
enabled: true
camera:
ros__parameters:
serial_no: 843112073259 # d435i
align_depth: false
enable_pointcloud: false
#base_frame_id:
color0:
enabled: true
resolution: [640,480]
fps: 30
depth0:
enabled: true
resolution: [640,480]
fps: 30
infra1:
enabled: true
resolution: [640,480]
fps: 30
infra2:
enabled: true
resolution: [640,480]
fps: 30
accel0:
enabled: true
gyro0:
enabled: true
37 changes: 18 additions & 19 deletions realsense_ros/config/t265.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
/t265:
camera:
ros__parameters:
serial_no: 845412110563 # t265
#base_frame_id
fisheye1:
enabled: true
resolution: [848,800]
fps: 30
fisheye2:
enabled: true
resolution: [848,800]
fps: 30
accel0:
enabled: true
gyro0:
enabled: true
pose0:
enabled: true
camera:
ros__parameters:
serial_no: 845412110563 # t265
#base_frame_id
fisheye1:
enabled: true
resolution: [848,800]
fps: 30
fisheye2:
enabled: true
resolution: [848,800]
fps: 30
accel0:
enabled: true
gyro0:
enabled: true
pose0:
enabled: true
1 change: 1 addition & 0 deletions realsense_ros/include/realsense/rs_constants.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ namespace realsense

const bool ALIGN_DEPTH = false;
const bool ENABLE_POINTCLOUD = false;
const bool DEFAULT_ENABLE_STREAM = true;

const std::vector<int> DEFAULT_IMAGE_RESOLUTION = {640, 480};
const std::vector<int> FISHEYE_RESOLUTION = {848, 800};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,38 +19,19 @@
from ament_index_python.packages import get_package_share_directory

def generate_launch_description():
t265_param = os.path.join(get_package_share_directory('realsense_ros'), 'config', 't265.yaml')
d435_param = os.path.join(get_package_share_directory('realsense_ros'), 'config', 'd435.yaml')
d435i_param = os.path.join(get_package_share_directory('realsense_ros'), 'config', 'd435i.yaml')
container = ComposableNodeContainer(
node_name='realsense_container',
d435_container = ComposableNodeContainer(
node_name='d435_container',
node_namespace='',
package='rclcpp_components',
node_executable='component_container',
composable_node_descriptions=[
# ComposableNode(
# package='realsense_ros',
# node_plugin='realsense::RealSenseNodeFactory',
# node_namespace='/t265',
# node_name='camera',
# parameters=[t265_param,
# {'serial_no':'845412110563'}],),
# ComposableNode(
# package='realsense_ros',
# node_plugin='realsense::RealSenseNodeFactory',
# node_namespace='/d435i',
# node_name='camera',
# parameters=[d435i_param,
# {'serial_no':'843112073259'}],),
ComposableNode(
package='realsense_ros',
node_plugin='realsense::RealSenseNodeFactory',
node_namespace='/d435',
node_name='camera',
parameters=[d435_param,
{'serial_no':'727212071015'}],),
parameters= [{'serial_no':'727212071015'}]),
],
output='screen',
)

return launch.LaunchDescription([container])
return launch.LaunchDescription([d435_container])
37 changes: 37 additions & 0 deletions realsense_ros/launch/d435i.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright (c) 2019 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import launch
from launch_ros.actions import ComposableNodeContainer
from launch_ros.descriptions import ComposableNode
from ament_index_python.packages import get_package_share_directory

def generate_launch_description():
d435i_container = ComposableNodeContainer(
node_name='d435_container',
node_namespace='',
package='rclcpp_components',
node_executable='component_container',
composable_node_descriptions=[
ComposableNode(
package='realsense_ros',
node_plugin='realsense::RealSenseNodeFactory',
node_namespace='/d435i',
node_name='camera',
parameters=[{'serial_no':'843112073259'}]),
],
output='screen',
)
return launch.LaunchDescription([d435i_container])
37 changes: 37 additions & 0 deletions realsense_ros/launch/t265.launch.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Copyright (c) 2019 Intel Corporation
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import launch
from launch_ros.actions import ComposableNodeContainer
from launch_ros.descriptions import ComposableNode
from ament_index_python.packages import get_package_share_directory

def generate_launch_description():
t265_container = ComposableNodeContainer(
node_name='t265_container',
node_namespace='',
package='rclcpp_components',
node_executable='component_container',
composable_node_descriptions=[
ComposableNode(
package='realsense_ros',
node_plugin='realsense::RealSenseNodeFactory',
node_namespace='/t265',
node_name='camera',
parameters=[{'serial_no':'845412110563'}]),
],
output='screen',
)
return launch.LaunchDescription([t265_container])
Loading

0 comments on commit cc6f2fe

Please sign in to comment.