lasr_rasa
The lasr_rasa package
This package is maintained by:
Prerequisites
This package depends on the following ROS packages:
- catkin (buildtool)
- catkin_virtualenv (build)
- rospy (build)
- std_msgs (build)
- rospy (exec)
- std_msgs (exec)
This packages requires Python 3.10 to be present.
This package has 150 Python dependencies:
Usage
This package provides the /lasr_rasa/parse
service which uses the Rasa
service definition from lasr_rasa
.
from lasr_rasa.srv import Rasa, RasaRequest
# create service proxy
rasa_service = rospy.ServiceProxy('/lasr_rasa/parse', Rasa)
# create request
request = RasaRequest("hello")
# send request
response = rasa_service(request)
# .. use request.json_response, if request.success
Example
Create a Rasa assistant.
roscd lasr_rasa
mkdir -p assistants/my_new_assistant
cd assistants/my_new_assistant
rosrun lasr_rasa rasa initCreate a NLU dataset, by defining training examples in
/lasr_rasa/assistants/my_new_assistant/data/nlu.yml
, for more information see the Rasa docs.Train the NLU assistant.
rosrun lasr_rasa rasa train nlu
This will produce a
.tar.gz
file inlasr_rasa/assistants/my_new_assistant/models
.Run Rasa as an API with our newly trained assistant.
rosrun lasr_rasa rasa run --enable-api
The API is run on
localhost:5005
by default, but you can change the port using the-p
argument. The endpoint that we are interested in is/model/parse
.Test the API is up and running.
curl 'localhost:5005/model/parse' -d '{"text" : "Hello"}'
Start ROS master if not started already.
roscore &
Run the service
rosrun lasr_rasa service [PORT]
Make a call to the service.
rosservice call /lasr_rasa/parse "text: 'hello'"
Technical Overview
Ask the package maintainer to write a doc/TECHNICAL.md
for their package!
ROS Definitions
Launch Files
rasa
No description provided.
Argument | Default | Description |
---|---|---|
model |
Messages
This package has no messages.
Services
Rasa
Request
Field | Type | Description |
---|---|---|
text | string |
Response
Field | Type | Description |
---|---|---|
json_response | string | |
success | bool |
Actions
This package has no actions.