updated with dependencies
This commit is contained in:
parent
3c49096d39
commit
7e8d3fb2a8
66
README.md
66
README.md
@ -4,17 +4,52 @@ This repository contains code for detecting heat pipes in the greenhouse as well
|
||||
|
||||
Platform: ROS 2, Humble, Ubuntu 22.04
|
||||
|
||||
## How to build the workspace?
|
||||
## How to install dependencies??
|
||||
- Install `git`
|
||||
```
|
||||
$ sudo apt install git
|
||||
```
|
||||
-
|
||||
- Install `ROS 2 Humble` on `Ubuntu 22.04` by following https://docs.ros.org/en/foxy/Installation/Ubuntu-Install-Debians.html
|
||||
- Install `colcon build` by following https://docs.ros.org/en/foxy/Tutorials/Beginner-CLI-Tools/Configuring-ROS2-Environment.html
|
||||
```
|
||||
$ sudo apt install python3-colcon-common-extensions
|
||||
```
|
||||
- Instal `pip` for python packages
|
||||
```
|
||||
$ sudo apt install python3-pip
|
||||
```
|
||||
- Now clone the repository
|
||||
```
|
||||
$ git clone https://tea.der-space.de/apoorva/greenhouse.git
|
||||
```
|
||||
## How to install dependencies??
|
||||
- Install `ultralytics` for yolov3 package
|
||||
```
|
||||
|
||||
sudo apt-get install ros-humble-$(PACKAGE_NAME)
|
||||
|
||||
$ pip install ultralytics
|
||||
```
|
||||
|
||||
- For `yolov3_ros`, there are a bunch of other requirements. Go to `yolov3` folder and install using following commands:
|
||||
```
|
||||
$ cd ~/greenhouse/yolov3
|
||||
$ pip install -r requirements.txt
|
||||
```
|
||||
- Go to `ros2_ws` inside `greenhouse`. Make sure you only have `src` folder.
|
||||
```
|
||||
$ cd ~/greenhouse/ros2_ws
|
||||
$ ls
|
||||
src
|
||||
```
|
||||
- Inside `ros2_ws` folder, start building individual packages in the below sequence to avoid errors.
|
||||
```
|
||||
$ colcon build --packages-select pipe_msgs
|
||||
$ colcon build –packages-select pcl_ros
|
||||
$ colcon build –allow-overriding pcl_ros
|
||||
$ colcon build –packages-select pcl_conversions
|
||||
$ colcon build –allow-overriding pcl_conversions
|
||||
$ colcon build --packages-select find-pose
|
||||
$ colcon build –packages-select yolov3_ros
|
||||
. install/setup.bash
|
||||
```
|
||||
- The code should be ready to launch as explained in [How to run Live Detection?](#how-to-run-live-detection)
|
||||
This section explains what each module is responsible for.
|
||||
## perception_pcl
|
||||
This module is responsible for providing `pcl_conversions` and `pcl_ros` modules in `ros 2`.
|
||||
@ -189,21 +224,22 @@ $ ros2 bag play bag-folder/bag-name.db3
|
||||
- Once you have updated the launch file, build the code again using `colcon build --packages-select yolov3_ros` and proceedas mentioned below.
|
||||
|
||||
Steps to run:
|
||||
1. Open a terminal.
|
||||
2. Run `$ cd greenhouse/ros2_ws/` and `$ . install/setup.bash`.
|
||||
3. Launch node for object detection:
|
||||
- Open a terminal.
|
||||
- Run `$ cd greenhouse/ros2_ws/` and `$ . install/setup.bash`.
|
||||
- Launch node for object detection:
|
||||
```
|
||||
$ ros2 launch yolov3_ros pipe_detection.launch.py
|
||||
```
|
||||
This node will output two topics: `/bboxes` and `/detection_image`.
|
||||
4. Launch node for pose estimation:
|
||||
Make sure that you run this launch file from `greenhouse/ros2_ws/` folder since the path of weights is relative (`/src/pipe_weights.pt`) inside the launch file.
|
||||
- Launch node for pose estimation:
|
||||
```
|
||||
$ ros2 launch find-pose find-pose-node.launch.py
|
||||
```
|
||||
This node will output TF topics between `/camera_link` and `/${detected_object_name}`.
|
||||
5. Open RVIZ by running `$ rviz2`. Change `fixed frame` from `map` to `camera_link`.
|
||||
5a. Go to `Add` button. Under `By Display type`, select `tf`. Once tf is added, select required frames like `camera_link` and `l_trail` to see the tfs.
|
||||
5b. To see the current image with detected object, Go to `Add` Button. Under `By Topic`, select topci called `detection_image`.
|
||||
- Open RVIZ by running `$ rviz2`. Change `fixed frame` from `map` to `camera_link`.
|
||||
-- Go to `Add` button. Under `By Display type`, select `tf`. Once tf is added, select required frames like `camera_link` and `l_trail` to see the tfs.
|
||||
-- To see the current image with detected object, Go to `Add` Button. Under `By Topic`, select topci called `detection_image`.
|
||||
You can add other topics as per the need and topic names.
|
||||
6. You can open launch files to update/remap topic name if different camera is being used.
|
||||
7. You can also update ros parameter from launch file. Currently, the `pipe_weights.pt` file is the one used. This file can be changed and you can update the parameter name `best_weights` inside the `pipe_detection.launch.py` file.
|
||||
- You can open launch files to update/remap topic name if different camera is being used.
|
||||
- You can also update ros parameter from launch file. Currently, the `pipe_weights.pt` file is the one used. This file can be changed and you can update the parameter name `best_weights` inside the `pipe_detection.launch.py` file.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user