kas-lab / rosa

A knowledge-based framework for Robot Self-adaptation (ROSA)
https://kas-lab.github.io/rosa/
Apache License 2.0
0 stars 0 forks source link

BUG #19

Closed Rezenders closed 1 year ago

Rezenders commented 1 year ago
Error with match query! Exception retrieved:  java.lang.NullPointerException: Cannot invoke "java.util.Set.add(Object)" because the return value of "java.util.Map.get(Object)" is null
[ERROR] [1689354810.166993528] [metacontrol_kb_traceback_logger]: Traceback (most recent call last):
  File "/home/gus/exp_metacontrol_ws/build/metacontrol_kb/metacontrol_kb/metacontrol_kb_typedb.py", line 120, in main
    executor.spin()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 279, in spin
    self.spin_once()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 764, in spin_once
    self._spin_once_impl(timeout_sec)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 761, in _spin_once_impl
    future.result()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/task.py", line 94, in result
    raise self.exception()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/task.py", line 239, in __call__
    self._handler.send(None)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 418, in handler
    await call_coroutine(entity, arg)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 372, 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/gus/exp_metacontrol_ws/build/metacontrol_kb/metacontrol_kb/metacontrol_kb_typedb.py", line 97, in task_selectable_cb
    selectable_tasks = self.typedb_interface.get_selectable_tasks()
  File "/home/gus/exp_metacontrol_ws/build/metacontrol_kb/metacontrol_kb/typedb_model_interface.py", line 85, in get_selectable_tasks
    return [r.get('task-name').get_value() for r in query_result]
TypeError: 'NoneType' object is not iterable

Traceback (most recent call last):
  File "/home/gus/exp_metacontrol_ws/install/metacontrol_kb/lib/metacontrol_kb/metacontrol_kb_typedb", line 33, in <module>
    sys.exit(load_entry_point('metacontrol-kb', 'console_scripts', 'metacontrol_kb_typedb')())
  File "/home/gus/exp_metacontrol_ws/build/metacontrol_kb/metacontrol_kb/metacontrol_kb_typedb.py", line 125, in main
    raise exception
  File "/home/gus/exp_metacontrol_ws/build/metacontrol_kb/metacontrol_kb/metacontrol_kb_typedb.py", line 120, in main
    executor.spin()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 279, in spin
    self.spin_once()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 764, in spin_once
    self._spin_once_impl(timeout_sec)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 761, in _spin_once_impl
    future.result()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/task.py", line 94, in result
    raise self.exception()
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/task.py", line 239, in __call__
    self._handler.send(None)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 418, in handler
    await call_coroutine(entity, arg)
  File "/opt/ros/humble/local/lib/python3.10/dist-packages/rclpy/executors.py", line 372, 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/gus/exp_metacontrol_ws/build/metacontrol_kb/metacontrol_kb/metacontrol_kb_typedb.py", line 97, in task_selectable_cb
    selectable_tasks = self.typedb_interface.get_selectable_tasks()
  File "/home/gus/exp_metacontrol_ws/build/metacontrol_kb/metacontrol_kb/typedb_model_interface.py", line 85, in get_selectable_tasks
    return [r.get('task-name').get_value() for r in query_result]
TypeError: 'NoneType' object is not iterable
The following exception was never retrieved: cannot use Destroyable because destruction was requested
[ros2run]: Process exited with failure 1
Rezenders commented 1 year ago

I think this is not happening anymore