object_with_region is a ROS 2 package that enriches 3D object detections with semantic region information. This node takes three-dimensional object detections and assigns them to the spatial region where they are located (e.g., "kitchen", "living room", "bedroom"), facilitating semantic navigation and spatial reasoning in mobile robotics.
- 3D Detection Integration: Processes
vision_msgs/Detection3DArraymessages to add region context. - Semantic Region Querying: Uses a semantic navigation service to determine which region each detected object is in.
- Label Resolution: Converts numeric class IDs to human-readable class names.
- Configurable Mode: Allows enabling/disabling region querying via parameters.
- TF2 Transformation Support: Handles transformations between different reference frames.
The node acts as an intermediary between a 3D object detector and high-level reasoning systems:
┌────────────────────┐ ┌──────────────────────┐ ┌─────────────────────┐
│ 3D Detector │────────▶│ object_with_region │────────▶│ High-Level │
│ (Detection3DArray)│ │ Node │ │ System │
└────────────────────┘ └──────────────────────┘ └─────────────────────┘
│
│ (service call)
▼
┌──────────────────────┐
│ Region Service │
│ (GetRegionName) │
└──────────────────────┘
rclcpp: ROS 2 C++ client libraryvision_msgs: Standard vision messages for ROSstd_msgs: Standard ROS messagesgeometry_msgs: Geometry messagestf2_ros: Transformation librarytf2_geometry_msgs: Geometry conversions for TF2tf2_sensor_msgs: Sensor message conversions for TF2nav2_util/nav2_ros_common: Nav2 utilities (depending on ROS version)semantic_navigation_msgs: Custom messages for semantic navigation
- Navigate to your ROS 2 workspace:
cd ~/colcon_ws/src- Clone the repository (if you haven't already):
git clone https://github.com/grupo-avispa/object_with_region.git- Install dependencies:
cd ~/colcon_ws
rosdep install --from-paths src --ignore-src -r -y- Build the package:
colcon build --packages-select object_with_region --symlink-install- Source the environment:
source install/setup.bashTo launch the node with default configuration:
ros2 launch object_with_region default.launch.pyThe node accepts the following parameters (defined in params/params.yaml):
| Parameter | Type | Default Value | Description |
|---|---|---|---|
detections_3d_topic |
string | /object_detection/detections_3d |
Input topic with 3D detections |
label_info_topic |
string | /smarthome/object_detection/label_info |
Topic with class label information |
objects_with_region_topic |
string | /object_detection/objects_with_region |
Output topic with objects enriched with region information |
get_region_name_service |
string | /get_region_name |
Service name to get the region from a position |
get_region_enabled |
bool | true |
Enable/disable region querying (useful for debugging) |
-
detections_3d_topic(vision_msgs/Detection3DArray)- 3D object detections from a detector
-
label_info_topic(vision_msgs/LabelInfo)- Meta-information about object classes (ID to name mapping)
objects_with_region_topic(object_with_region/ObjectRegion3DArray)- Object detections enriched with semantic region information
get_region_name_service(semantic_navigation_msgs/GetRegionName)- Service used to query the region name given a 3D position
Represents a detected object with its associated region:
std_msgs/Header header
vision_msgs/Detection3D object
string region
Array of objects with regions:
std_msgs/Header header
ObjectRegion3D[] objects
This package is licensed under the Apache 2.0 license. See the LICENSE file for more details.
- Óscar Pons Fernández - @opfernandez
- Grupo Avispa, DTE, Universidad de Málaga
- vision_msgs: Standard vision messages for ROS 2
- Nav2: Navigation framework for ROS 2
- TF2: ROS 2 transformation system