This page documents the sentiment analysis plugin in fp_perception_driver_sentiment.
Class: fp_perception::SentimentDriver (REST-based sentiment inference)
- Accepts
sentiment_requestviaanalyze(). - Sends a JSON request to the configured endpoint (Hugging Face style:
inputs: <text>). - Parses a Hugging Face-style response and returns
(label, score)insentiment_result.
driver.sentiment.SentimentDriver.name(string)
REST base parameters:
driver.sentiment.SentimentDriver.rest.uridriver.sentiment.SentimentDriver.rest.methoddriver.sentiment.SentimentDriver.rest.ssl_verifydriver.sentiment.SentimentDriver.rest.auth_type
Environment:
- Requires
HUGGINGFACE_API_KEYto be set.
- The server offers
fp_perception_msgs/srv/PerceptionSentiment. - If
use_device_audio=true, the server transcribes device audio first and then runs sentiment on the transcription. - Otherwise, it runs sentiment directly on the request text.
- If
use_diagnostics=true, the driver publishes request health on/diagnosticsviadiagnostic_updater.