{
 "cells": [
  {
   "metadata": {},
   "cell_type": "code",
   "source": "from demo import setup_demo",
   "id": "3b9982c01e068fa0",
   "outputs": [],
   "execution_count": null
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": [
    "%%bash --bg\n",
    "rviz -d /home/jovyan/giskard_examples/launch/rvizweb_config/bmp.rviz"
   ],
   "id": "73c15d57b8ad1bb"
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": "prolog = setup_demo()",
   "id": "b1c7e3fba7e5e8fd"
  },
  {
   "metadata": {},
   "cell_type": "code",
   "outputs": [],
   "execution_count": null,
   "source": [
    "results = list(prolog.query(\n",
    "                            'taskRequest(Request, StateChange).'\n",
    "                            ))\n",
    "\n",
    "for result in results:\n",
    "    print(result)\n",
    "print(len(results))"
   ],
   "id": "f5262e6772445fff"
  },
  {
   "metadata": {},
   "cell_type": "code",
   "source": [
    "results = list(prolog.query(\n",
    "                            'taskRequest(X, StateChange),'\n",
    "                            'causes(Motion, StateChange, MotionParam).'\n",
    "                            ))\n",
    "\n",
    "for result in results:\n",
    "    print(result)\n",
    "print(len(results))"
   ],
   "id": "28695f59ae25d00b",
   "outputs": [],
   "execution_count": null
  },
  {
   "metadata": {},
   "cell_type": "code",
   "source": [
    "results = list(prolog.query(\n",
    "                            'taskRequest(Request, StateChange), '\n",
    "                            'causes(Motion, StateChange, MotionParam),'\n",
    "                            'canPerform(Robot, Motion, MotionParam).'\n",
    "                            ))\n",
    "\n",
    "for result in results:\n",
    "    print(result)\n",
    "print(len(results))"
   ],
   "id": "7ab61065ece4ffb8",
   "outputs": [],
   "execution_count": null
  },
  {
   "metadata": {
    "ExecuteTime": {
     "end_time": "2025-03-04T15:36:56.665055Z",
     "start_time": "2025-03-04T15:36:56.652733Z"
    }
   },
   "cell_type": "code",
   "source": "",
   "id": "60065b29aaf79cba",
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "execution_count": 21
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 2
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython2",
   "version": "2.7.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}