A ROS 2 Wrapper for Florence-2: Multi-Mode Local Vision-Language Inference for Robotic Systems
Abstract
Foundation vision-language models are becoming increasingly relevant to robotics because they can provide richer semantic perception than narrow task-specific pipelines. However, their practical adoption in robot software stacks still depends on reproducible middleware integrations rather than on model quality alone. Florence-2 is especially attractive in this regard because it unifies captioning, optical character recognition, open-vocabulary detection, grounding and related vision-language tasks within a comparatively manageable model size. This article presents a ROS 2 wrapper for Florence-2 that exposes the model through three complementary interaction modes: continuous topic-driven processing, synchronous service calls and asynchronous actions. The wrapper is designed for local execution and supports both native installation and Docker container deployment. It also combines generic JSON outputs with standard ROS 2 message bindings for detection-oriented tasks. A functional validation is reported together with a throughput study on several GPUs, showing that local deployment is feasible with consumer grade hardware. The repository is publicly available here: https://github.com/JEDominguezVidal/florence2_ros2_wrapper
Figures & tables
| Interface | Type | Direction | Purpose |
|---|---|---|---|
| /camera/image_raw (configurable) | Topic | Input | Source image stream for continuous or on-demand inference |
| ~/execute_task | Service | In/Out | Synchronous task execution with direct response |
| ~/execute_task_action | Action | In/Out | Asynchronous task execution with feedback and result |
| ~/results_json | Topic | Output | Generic structured result serialised as JSON |
| ~/detections | Topic | Output | Standard vision_msgs/Detection2DArray output for box-based tasks |
| ~/annotated_image | Topic | Output | Visualisation of detection-style outputs over the input image |
| Graphic Card | FPS (min. / avg. / max.) | |
|---|---|---|
| Base model | Large model | |
| GTX 1060 Mobile (80 W) | 5.50 - 5.81 - 5.99 | 2.44 - 2.50 - 2.56 |
| RTX 3060 Mobile (80 W) | 9.23 - 9.75 - 10.1 | 4.05 - 4.21 - 4.29 |
| RTX 3080 Ti Desktop | 25.3 - 26.6 - 27.5 | 11.1 - 11.5 - 11.7 |
VLMs for Robotics
Vision-language models for robotics connect visual and linguistic understanding to grounded navigation, manipulation, and robot control.
See all 657 papers