open-rmf / rmf_obstacle

Packages that infer the presence of obstacles from sensor inputs.
Apache License 2.0
6 stars 9 forks source link

[Bug]: Lanes not re-opened after obstacle is removed #32

Closed Jerrybaoyilei closed 7 months ago

Jerrybaoyilei commented 7 months ago

Before proceeding, is there an existing issue or discussion for this?

OS and version

Ubuntu 22.04

Open-RMF installation type

Binaries

Other Open-RMF installation methods

No response

Open-RMF version or commit hash

2.1.2

ROS distribution

Iron

ROS installation type

Binaries

Other ROS installation methods

No response

Package or library, if applicable

rmf_obstacle_ros2

Description of the bug

When I place an obstacle in the simulation, the lanes are blocked, and robot rerouting happens. But when the obstacle is removed form the simulation, the lanes are not re-opened. I have already lowered the lane_closure_threshold to 0.6 and speed_limit_threshold to 0.05.

Steps to reproduce the bug

  1. Run the ign to ros bridge for lidar/scan and /clock topics
  2. run the static transform publisher from fixed frame "map" to lidar model
  3. set the publisher in the last step to use sim time by running ros2 param set /lidar_0_tf_publisher use_sim_time true
  4. Run a static transform publisher from lidar model to obstacles ros2 run tf2_ros static_transform_publisher 0 0 0 0 0 0 1 VelodyneHDL-32/top/gpu_lidar VelodyneHDL-32/top/gpu_lidar_obstacles
  5. Run the demo office simulation . install/setup.bash ros2 launch rmf_demos_gz office.launch.xml
  6. Run and configure the laserscan detector . install/setup.bash ros2 run rmf_obstacle_detector_laserscan laserscan_detector
  7. Configure and activate the laserscan detector node ros2 lifecycle set /laserscan_obstacle_detector configure ros2 lifecycle set /laserscan_obstacle_detector activate
  8. Run the lane blocker node . install/setup.bash ros2 run rmf_obstacle_ros2 lane_blocker_node
  9. Place an obstacle (for example, a box) in the simulation, and remove it after a couple of seconds

Expected behavior

When the obstacle is removed, lanes should no longer be greyed out

Actual behavior

The lanes are still greyed out without the obstacles

Additional information or screenshots

Below is when there is no obstacle in the simulation: image Below is after the obstacle is placed in the simulation: image Below is after the obstacle is removed from the simulation: image

Jerrybaoyilei commented 7 months ago

Update: The lane_closure_threshold and lane_closing_threshold are counts of obstacles for each lane, so they should be larger than 1. That was the reason (I changed them to smaller than 1 earlier) the lanes were not closing. Also, increasing the cull rate (fo example, to 10) helps with reopening the lanes faster.