ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
Going with your strategy, you could perhaps get that information from the obstacle layer of say, the local costmap. This link might help you to access a particular plugin like obstacle_layer. I haven't done so yet, but i believe obstacles would be reflected in this layer's data and would possibly give a more specific dataset to compare in the pre and post obstacle scenarios.
Alternatively, since you are already using TEB, you might be familiar with the costmap converter. You could use that (costmap converter package) to base your node and issue messages when any obstacle populate it.