Skip to content

Commit

Permalink
Added README.md for image_tools - [Clean] (#596)
Browse files Browse the repository at this point in the history
* Added README.md for image_tools with supplementary info in README.md for easier references.

Signed-off-by: Bey Hao Yun <[email protected]>
  • Loading branch information
cardboardcode authored Jan 27, 2023
1 parent f4ca3cb commit a343171
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions image_tools/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
## **What Is This?**

This demo provides simple utilities to connect to a workstation default camera device and display it in a window like below:

![](img/result.png)

## **Build**

```bash
colcon build --packages-select image_tools
```

## **Run**

In `image_tools` ROS 2 package, two executables are provided, namely `cam2image` and `showimage` with different functions.

## **1 - cam2image**
Running this executable connects to your workstation's default camera device's video stream and publishes the images on '/image' and '/flipimage' topics using a ROS 2 publisher.

```bash
# Open new terminal
ros2 run image_tools cam2image
```

Note that `cam2image` provides many useful command-line options. Run `ros2 run image_tools cam2image --help` to see the list of options available.
>
> Eg. If a camera device is not available, run `ros2 run image_tools cam2image --ros-args -p burger_mode:=true`.
## **2 - showimage**
Running this executable creates a ROS 2 node, `showimage`, which subscribes to the `sensor_msg/msg/Image` topic, `/image` and displays the images in a window.

```bash
# Open new terminal
# Run showimage ROS 2 node to display the cam2image sensor_msg/msg/Image messages.
ros2 run image_tools showimage
```
Binary file added image_tools/img/result.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit a343171

Please sign in to comment.