Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add realsense depth module exposure to d435i launchers #138

Open
wants to merge 1 commit into
base: humble
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions stretch_core/launch/d435i_basic.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
{'name': 'depth_module.profile', 'default': '848x480x15', 'description': 'depth module profile'},
{'name': 'depth_module.depth_profile', 'default': '848x480x15', 'description': 'depth module profile'},
{'name': 'depth_module.infra_profile', 'default': '848x480x15', 'description': 'depth module profile'},
{'name': 'depth_module.exposure', 'default': '8500', 'description': 'depth module exposure'},
{'name': 'enable_depth', 'default': 'true', 'description': 'enable depth stream'},
{'name': 'rgb_camera.profile', 'default': '1280x720x15', 'description': 'color image width'},
{'name': 'rgb_camera.color_profile', 'default': '1280x720x15', 'description': 'color image width'},
Expand Down
8 changes: 6 additions & 2 deletions stretch_core/launch/stretch_realsense.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
configurable_parameters = [{'name': 'resolution', 'default': 'high', 'description': 'resolution of the color/depth images low or high'},
{'name': 'publish_frustum_viz', 'default': 'false', 'description': 'whether to pub viz of camera frustums'},
{'name': 'publish_upright_img', 'default': 'true', 'description': 'whether to pub rotated upright color image'},
{'name': 'depth_module_exposure', 'default': '8500', 'description': 'depth module exposure'}
]

def declare_configurable_parameters(parameters):
Expand All @@ -20,19 +21,22 @@ def generate_launch_description():
publish_frustum_viz = LaunchConfiguration('publish_frustum_viz')
publish_upright_img = LaunchConfiguration('publish_upright_img')
resolution = LaunchConfiguration('resolution')
depth_module_exposure = LaunchConfiguration('depth_module_exposure')

d435i_high_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource([os.path.join(
get_package_share_directory('stretch_core'), 'launch'),
'/d435i_high_resolution.launch.py']),
condition=LaunchConfigurationEquals('resolution', 'high')
condition=LaunchConfigurationEquals('resolution', 'high'),
launch_arguments={'depth_module.exposure': depth_module_exposure}.items()
)

d435i_low_launch = IncludeLaunchDescription(
PythonLaunchDescriptionSource([os.path.join(
get_package_share_directory('stretch_core'), 'launch'),
'/d435i_low_resolution.launch.py']),
condition=LaunchConfigurationEquals('resolution', 'low')
condition=LaunchConfigurationEquals('resolution', 'low'),
launch_arguments={'depth_module.exposure': depth_module_exposure}.items()
)

d435i_configure = Node(
Expand Down