Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LifeCycle_Preview created #19

Merged
merged 7 commits into from
Jul 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 22 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,35 @@ Packages that infer and react to the presence of obstacles from sensor inputs.

A ROS 2 node that subscribes to `LaserScan` messages and publishes obstacles to `/rmf_obstacles`.

The node is implemented as an`rclcpp::lifecycle_node` node where upon activation, it calibrates the surroundings based on the range values in the initial few `LaserScan` messages.
The node is implemented as an [`rclcpp::lifecycle_node`](https://github.com/ros2/demos/tree/rolling/lifecycle) node where upon activation, it calibrates the surroundings based on the range values in the initial few `LaserScan` messages.
This essentially becomes the "obstacle-free" configuration.
Subsequently, any changes to the surroundings is detected as an obstacle.
Subsequently, any changes to the surroundings are detected as an obstacle.

To run
```
ros2 run rmf_obstacle_detector_laserscan laserscan_detector
```
To configure and Activate
```
#to configure
ros2 lifecycle set /laserscan_obstacle_detector configure
```
```
#to activate
ros2 lifecycle set /laserscan_obstacle_detector activate
```


>Note: The node can also be loaded into a ROS 2 component container as a plugin (`LaserscanDetector`)

The node accepts the following parameters
| Parameter Name | Description | Default Value |
| --- | --- | --- |
| `scan_topic_name` | The topic over which `LaserScan` messages are published. It is strongly recommended to [filter the scan](http://wiki.ros.org/laser_filters) to remove out-of-range rays before passing it to this node. | `/lidar/scan` |
| `range_threshold` | For each ray, if the difference in range measurement between the latest `LaserScan` and the calibrated one is grater than this value, a new obstacle is assumed. | `1.0` meter |
| `min_obstacle_size` | The minimum perceived size of an object for it to be considered an obstacle. | `0.75` meter |
| `range_threshold` | For each ray, if the difference in range measurement between the latest `LaserScan` and the calibrated one is greater than this value, a new obstacle is assumed. | `1.0` meter |
| `min_obstacle_size` | The minimum perceived size of an object to be considered an obstacle. | `0.75` meter |
| `level_name` | The level(floor) name on which the scanner exists. | `L1` |
| `calibration_sample_count` | The number of initial `LaserScan` messages to use for calibrating the "obstacle-free" configuration. | `10` |
| `calibration_sample_count` | The number of initial `LaserScan` messages to cailbrate the "obstacle-free" configuration. | `10` |

## rmf_human_detector_oakd
![](../media/rmf_human_detector_oakd.gif)
Expand All @@ -47,8 +58,8 @@ To launch as a standalone node,
ros2 launch rmf_human_detector_oakd human_detection.launch.xml blob_path:=<PATH_TO_MOBILENET-SSD_BLOB>
```

THe node has several configurable parameters documented in the [launch file](rmf_human_detector_oakd/launch/human_detector.launch.xml).
The most important of which is `blob_path` as it holds the absolute path to the NN model for inference. See `depthai` documentation for more information on how the various pre-trained models can be obtained.
The node has several configurable parameters documented in the [launch file](rmf_human_detector_oakd/launch/human_detector.launch.xml).
The most important is `blob_path` as it holds the absolute path to the NN model for inference. See `depthai` documentation for more information on how the various pre-trained models can be obtained.
It is recommended to use the [blobconverter](https://github.com/luxonis/blobconverter/) tool to obtain the `mobilenet-ssd_openvino_2021.4_6shave.blob` blob for inference.


Expand All @@ -72,8 +83,10 @@ ros2 launch rmf_human_detector human_detector_launch.py
## rmf_obstacle_ros2
The `rmf_obstacle_ros2` package contains ROS 2 nodes that react to the presence of obstacles.

At present the `lane_blocker_node` is available which subscribes to `/rmf_obstacles`, checks whether
any of the obstacles intersects with any of the lanes across fleet navigation graphs.

At present the `lane_blocker_node` is available which subscribes to `/rmf_obstacles`, and checks whether
any of the obstacles intersect with any of the lanes across fleet navigation graphs.

If a new intersection is determined, the lanes for the corresponding fleets are closed.
Previously closed lanes are also opened once the obstacles no longer intersect with the lanes.

Expand Down