|
1 | | -# Capture Image |
| 1 | +# Realsense Camera |
2 | 2 |
|
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 |
4 | 74 |
|
5 | 75 | In this example, we will review a Python script that captures an image from the [RealSense camera](https://www.intelrealsense.com/depth-camera-d435i/). |
6 | 76 |
|
|
0 commit comments