RobotecAI / RobotecAI/rai

`/rai_whoami_documentation_service` does not return a response upon call

Open
#565 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Python
Stars
589
Forks
76
Avg merge
1d 13h
Merged PRs (30d)
3

Description

Describe the bug
The /rai_whoami_documentation_service does not return a response upon call. Additionally, if the call command is aborted before receiving a response, the service throws an exception:

Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 294, in spin
self.spin_once()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 806, in spin_once
self._spin_once_impl(timeout_sec)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 803, in _spin_once_impl
future.result()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/task.py", line 105, in result
raise self.exception()
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/task.py", line 254, in call
self._handler.send(None)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 447, in handler
await call_coroutine(entity, arg)
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 401, in _execute_service
response = await await_or_execute(srv.callback, request, srv.srv_type.Response())
File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 107, in await_or_execute
return callback(*args)
File "/home/user/Work/Robotec/rai/src/rai_whoami/rai_whoami/agents/ros2/vector_store_retrieval_agent.py", line 74, in service_callback
response.scores = [result[1] for result in vdb_results]
File "/home/user/Work/Robotec/rai/install/rai_interfaces/local/lib/python3.10/dist-packages/rai_interfaces/srv/_vector_store_retrieval.py", line 325, in scores
assert
AssertionError: The 'scores' field must be a set or sequence and each value of type 'float' and each float in [-340282346600000016151267322115014000640.000000, 340282346600000016151267322115014000640.000000]

To Reproduce
Steps to reproduce the behavior:

  1. Configure the robot's identity according to the Robot's identity within RAI tutorial
  2. Run the RAI Whomai service: python src/rai_whoami/rai_whoami/scripts/ros2_vector_store_retrieval_service.py panda/
  3. Call the service: ros2 service call /rai_whoami_documentation_service rai_interfaces/srv/VectorStoreRetrieval "query: 'maximum load'"
  4. The service will not return a response. If the service call is aborted, an exception is thrown within the src/rai_whoami/rai_whoami/scripts/ros2_vector_store_retrieval_service.py service

Expected behavior
The /rai_whoami_documentation_service should return a response, an error or timeout. Additionally, the service should not crash when the service call is aborted.

Screenshots
None

Platform

  • OS: Ubuntu 22.04
  • ROS 2 Version: Humble

Version
commit 0e12297a468eab719b25228f5e273877605cbdfd

Additional context
None

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with src/rai_whoami/rai_whoami/agents/ros2/vector_store_retrieval_agent.py around the service_callback response.scores assignment, then reproduce the call using the documented service command and ros2_vector_store_retrieval_service.py. Done means the service returns a response, error, or timeout for the query and does not crash when the call is aborted.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend-api-design, robotics
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.