Skip to content

Commit 725aaa9

Browse files
authored
update realsense example (#44)
* update realsense example * added stretch_realsense_visualizer.py --help output
1 parent d8578dc commit 725aaa9

3 files changed

Lines changed: 72 additions & 2 deletions

File tree

images/realsense_D405.png

1.65 MB
Loading

images/realsense_D435i.png

1.57 MB
Loading

ros2/realsense_camera.md

Lines changed: 72 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,76 @@
1-
# Capture Image
1+
# Realsense Camera
22

3-
## Example 7
3+
## Quick Hardware Check (No ROS 2 Required)
4+
5+
Stretch includes a standalone visualization tool for debugging RealSense cameras without launching ROS 2.
6+
7+
To view the head D435i camera:
8+
9+
```bash
10+
stretch_realsense_visualizer.py
11+
```
12+
<div align="center">
13+
<img src="../images/realsense_D435i.png" alt="base" width="500"/>
14+
</div>
15+
16+
It opens a live window showing the RGB image on the left and the color-mapped depth image on the right.
17+
By default, it uses the head D435i, or the wrist D405 when launched with `--d405`.
18+
19+
To view the gripper D405 camera:
20+
21+
```bash
22+
stretch_realsense_visualizer.py --d405
23+
```
24+
<div align="center">
25+
<img src="../images/realsense_D405.png" alt="base" width="500"/>
26+
</div>
27+
28+
You can also adjust exposure settings using the `--exposure` flag. For example, to modify exposure on the D405:
29+
30+
```bash
31+
stretch_realsense_visualizer.py --d405 --exposure low
32+
```
33+
34+
The `--exposure` option supports `auto`, `low`, `medium`, or a manual integer value in the range `[0, 165000]`.
35+
36+
!!! note
37+
Exposure settings applied via this tool are temporary and only affect the running session. They do not persist and will not carry over to ROS 2 camera nodes.
38+
39+
40+
To see all available options, run:
41+
42+
```bash
43+
stretch_realsense_visualizer.py --help
44+
```
45+
46+
```bash
47+
$ stretch_realsense_visualizer.py --help
48+
For use with S T R E T C H (R) from Hello Robot Inc.
49+
---------------------------------------------------------------------
50+
51+
usage: stretch_realsense_visualizer.py [-h] [--no_gui] [--colormap COLORMAP]
52+
[--save [SAVE]]
53+
[--save_limit SAVE_LIMIT] [--d405]
54+
[--exposure EXPOSURE]
55+
56+
Tool to test the Realsense D435i Camera.
57+
58+
options:
59+
-h, --help show this help message and exit
60+
--no_gui Show no GUI while reading images.
61+
--colormap COLORMAP Valid OpenCV colormaps at 'https://docs.opencv.org/mas
62+
ter/d3/d50/group__imgproc__colormap.html'.
63+
--save [SAVE] Save as .avi video to given filepath at end of script.
64+
--save_limit SAVE_LIMIT
65+
The number of minutes of data to save.
66+
--d405 By default, this tool shows the D435if head camera
67+
imagery. Setting this flag causes the tool to instead
68+
show the D405 wrist imagery.
69+
--exposure EXPOSURE Set the D405 exposure to ['low', 'medium', 'auto'] or
70+
an integer in the range [0, 165000]
71+
```
72+
73+
## Capture Image
474
575
In this example, we will review a Python script that captures an image from the [RealSense camera](https://www.intelrealsense.com/depth-camera-d435i/).
676

0 commit comments

Comments
 (0)