ROS Package bob_face
ROS 2 package for facial animation playback and sentiment-driven color orchestration.
Features
Animation Engine (C++): Blended playback of
MarkerArrayface geometry from rosbag2.Sentiment Logic (Python): VADER-based sentiment analysis mapped to Matplotlib colormaps.
Marker Colorizer (C++): Real-time RGBA override for visualization markers.
Sequence GUI (Python): PyQt5 interface for triggering and managing animation sequences.
Components
bag (Node)
Playback engine for facial geometry.
Subscribes: N/A
Publishes:
face_marker_array(visualization_msgs/MarkerArray)Services:
set_sequence(bob_msgs/SetSequence)
face_marker (Node)
Applies sentiment color to incoming markers.
Subscribes:
marker_array_in(visualization_msgs/MarkerArray),face_color_override(std_msgs/ColorRGBA)Publishes:
marker_array_out(visualization_msgs/MarkerArray)
sentiment (Node)
Text-to-color mapping.
Subscribes:
analize(std_msgs/String)Publishes:
face_color_override(std_msgs/ColorRGBA),sentiment_score(std_msgs/Float32)
motion_manager (Node)
Automation of facial states (Speaking/Idle).
Subscribes:
spoken_text(std_msgs/String),speaking_flag(std_msgs/Bool)Services:
set_sequence(Client: calls thebagnode)
face_gui (Node)
Interactive sequence editor and manual control.
Services:
set_sequence(Client)Files: Reads/Writes
config/sequences.yaml
Configuration (face.yaml)
Standard integration flow:
bag (out: marker_array_raw) -> face_marker (in: marker_array_raw, out: marker_array) -> face_gui & RViz.
Parameters
Node |
Parameter |
Default |
Env Var |
Description |
|---|---|---|---|---|
|
|
|
|
Matplotlib colormap |
|
|
|
|
Global scale override |
|
|
|
|
Frame ID override |
|
|
|
|
Heuristic for speaking duration |
|
|
|
- |
Comma-separated idle sequence names |
|
|
|
- |
Comma-separated speaking sequence names |
Requirements
Python:
vaderSentiment,matplotlib,PyQt5,PyYAMLROS 2:
rclcpp,rclpy,visualization_msgs,bob_msgs
Quick Start
# Install Python deps
pip install -r requirements.txt
# Launch system
ros2 launch bob_launch generic.launch.py config:=face.yaml
# Test Sentiment
ros2 topic pub /bob/analize std_msgs/msg/String "{data: 'Excellent work'}" -1