Skip to content
Open
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -209,3 +209,10 @@ cython_debug/
marimo/_static/
marimo/_lsp/
__marimo__/

# model files
*.pt
*.pth
*.onnx
*.engine
*.ts
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ ROS2 perception stack for generalist robotics.
## Packages

- **track_anything** - EdgeTAM tracking + 3D segmentation with RGBD
- **detect_anything** - YOLO-E detection node and utilities
- **semantic_mapping** - placeholder for future mapping components (currently empty)
- **vector_perception_utils** - Image and point cloud utilities

## Installation
Expand All @@ -21,6 +23,7 @@ pip install -r requirements.txt
# Build
source /opt/ros/jazzy/setup.bash
colcon build
```



Expand Down
47 changes: 47 additions & 0 deletions detect_anything/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
cmake_minimum_required(VERSION 3.10)
project(detect_anything)

find_package(ament_cmake REQUIRED)
find_package(rclpy REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(std_msgs REQUIRED)
find_package(vision_msgs REQUIRED)
find_package(cv_bridge REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(Python3 REQUIRED COMPONENTS Interpreter)

rosidl_generate_interfaces(${PROJECT_NAME}
"msg/DetectionResult.msg"
DEPENDENCIES std_msgs sensor_msgs
)

set(PYTHON_INSTALL_DIR "lib/python${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}/site-packages")

install(
DIRECTORY detect_anything
DESTINATION ${PYTHON_INSTALL_DIR}
)

install(
PROGRAMS
scripts/detection_node
DESTINATION lib/${PROJECT_NAME}
)

install(
FILES resource/detect_anything
DESTINATION share/${PROJECT_NAME}/resource
)

install(
DIRECTORY config
DESTINATION share/${PROJECT_NAME}
)

set(ENV_HOOK "${CMAKE_CURRENT_SOURCE_DIR}/env-hooks/venv_pythonpath.sh.in")
set(ENV_HOOK_OUT "${CMAKE_CURRENT_BINARY_DIR}/ament_cmake_environment_hooks/venv_pythonpath.sh")
configure_file(${ENV_HOOK} ${ENV_HOOK_OUT} @ONLY)
ament_environment_hooks(${ENV_HOOK_OUT})

ament_export_dependencies(rosidl_default_runtime)
ament_package()
28 changes: 28 additions & 0 deletions detect_anything/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# detect_anything

YOLO-E detection node that publishes `DetectionResult` with cropped masks and an annotated overlay topic.

## What’s inside
- `detect_anything/detection.py`: detection results container and Ultralytics parsing helpers.
- `detect_anything/yoloe.py`: YOLO-E wrapper with prompt support and basic filtering.
- `detect_anything/detection_node.py`: ROS2 node wiring the detector to `DetectionResult`.
- `msg/DetectionResult.msg`: compressed image + cropped mask array.

## Quick start
```bash
source ~/vector_venv/bin/activate
source /opt/ros/jazzy/setup.bash
colcon build --packages-select detect_anything
source install/setup.bash

ros2 run detect_anything detection_node \
--ros-args -p model_path:=/path/to/yoloe/models \
-p model_name:=yoloe-11s-seg-pf.pt \
-p conf:=0.6 \
-p max_area_ratio:=0.3 \
-p image_topic:=/camera/image
```

Topics:
- Publishes `/detection_result` (`detect_anything/DetectionResult`) and `/annotated_image_detection` (`sensor_msgs/Image`).
- Subscribes to `/camera/image` (or `/camera/image/compressed` if `use_compressed:=true`).
46 changes: 46 additions & 0 deletions detect_anything/config/objects.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Simple list of object names for prompting YOLO-E
- chair
- desk
- tv_monitor
- sofa
- unknown
- printer
- coffee machine
- refrigerator
- trash can
- shoe
- sink
- table
- oven
- bed
- painting
- bulletin board
- plant
- vase
- cabinet
- shelf
- book
- cup
- sculpture
- keyboard
- mouse
- clock
- phone
- toilet
- bathtub
- microwave oven
- pan
- suitcase
- light
- curtain
- whiteboard
- shower knob
- bottle
- water dispenser
- vending machine
- laptop
- bag
- locker
- picture
- cardboard
- extinguisher
1 change: 1 addition & 0 deletions detect_anything/detect_anything/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
"""detect_anything package."""
Loading