greenhouse/README.md

94 lines
2.8 KiB
Markdown
Raw Normal View History

2022-12-11 00:34:20 -08:00
# find-object
2018-10-24 05:58:11 +12:00
2022-12-11 00:34:20 -08:00
<table>
<tbody>
<tr>
<td>Linux</td>
<td><a href="https://github.com/introlab/find-object/actions/workflows/cmake.yml"><img src="https://github.com/introlab/find-object/actions/workflows/cmake.yml/badge.svg" alt="Build Status"/> <br> <a href="https://github.com/introlab/find-object/actions/workflows/ros1.yml"><img src="https://github.com/introlab/find-object/actions/workflows/ros1.yml/badge.svg" alt="Build Status"/> <br> <a href="https://github.com/introlab/find-object/actions/workflows/ros2.yml"><img src="https://github.com/introlab/find-object/actions/workflows/ros2.yml/badge.svg" alt="Build Status"/>
</td>
</tr>
<tr>
<td>Windows</td>
<td><a href="https://ci.appveyor.com/project/matlabbe/find-object/branch/master"><img src="https://ci.appveyor.com/api/projects/status/hn51r6p5c0peqctb/branch/master?svg=true" alt="Build Status"/>
</td>
</tr>
</tbody>
</table>
## Standalone
2015-05-20 14:50:25 -04:00
Find-Object project, visit the [home page](http://introlab.github.io/find-object/) for more information.
2022-12-11 00:34:20 -08:00
## ROS1: find_object_2d
2015-05-20 14:50:25 -04:00
### Install
2015-05-20 17:09:45 -04:00
Binaries:
```bash
2022-12-11 00:34:20 -08:00
sudo apt-get install ros-$ROS_DISTRO-find-object-2d
2015-05-20 17:09:45 -04:00
```
Source:
2017-08-07 18:59:47 -04:00
2022-12-11 00:34:20 -08:00
* To include `xfeatures2d` and/or `nonfree` modules of OpenCV, to avoid conflicts with `cv_bridge`, build same OpenCV version that is used by `cv_bridge`. Install it in `/usr/local` (default).
2017-08-07 18:59:47 -04:00
2015-05-20 14:50:25 -04:00
```bash
2022-12-11 00:34:20 -08:00
cd ~/catkin_ws
git clone https://github.com/introlab/find-object.git src/find_object_2d
catkin_make
2015-05-20 14:50:25 -04:00
```
### Run
```bash
2022-12-11 00:34:20 -08:00
roscore
2015-08-06 09:40:54 -04:00
# Launch your preferred usb camera driver
2022-12-11 00:34:20 -08:00
rosrun uvc_camera uvc_camera_node
rosrun find_object_2d find_object_2d image:=image_raw
2015-05-20 14:50:25 -04:00
```
See [find_object_2d](http://wiki.ros.org/find_object_2d) for more information.
2022-12-10 23:39:35 -08:00
2022-12-11 00:34:20 -08:00
## ROS2: find_object_2d
2022-12-10 23:39:35 -08:00
### Install
Binaries:
```bash
To come...
```
Source:
```bash
# Install ROS Foxy/Galactic/Humble (colcon build):
2022-12-11 00:34:20 -08:00
cd ~/ros2_ws
git clone https://github.com/introlab/find-object.git src/find_object_2d
colcon build
2022-12-10 23:39:35 -08:00
```
### Run
```bash
# Launch your preferred usb camera driver
2022-12-11 00:34:20 -08:00
ros2 launch realsense2_camera rs_launch.py
2022-12-10 23:39:35 -08:00
# Launch find_object_2d node:
2022-12-11 00:34:20 -08:00
ros2 launch find_object_2d find_object_2d.launch.py image:=/camera/color/image_raw
2022-12-10 23:39:35 -08:00
# Draw objects detected on an image:
2022-12-11 00:34:20 -08:00
ros2 run find_object_2d print_objects_detected --ros-args -r image:=/camera/color/image_raw
2022-12-10 23:39:35 -08:00
```
#### 3D Pose (TF)
A RGB-D camera is required. Example with Realsense D400 camera:
```bash
# Launch your preferred usb camera driver
ros2 launch realsense2_camera rs_launch.py align_depth.enable:=true
# Launch find_object_2d node:
2022-12-11 00:34:20 -08:00
ros2 launch find_object_2d find_object_3d.launch.py \
rgb_topic:=/camera/color/image_raw \
depth_topic:=/camera/aligned_depth_to_color/image_raw \
camera_info_topic:=/camera/color/camera_info
2022-12-10 23:39:35 -08:00
# Show 3D pose in camera frame:
2022-12-11 00:34:20 -08:00
ros2 run find_object_2d tf_example
2022-12-10 23:39:35 -08:00
```