srs_public: srs_arm_navigation_tests | srs_assisted_arm_navigation | srs_assisted_detection | srs_decision_making | srs_decision_making_interface | srs_env_model | srs_env_model_msgs | srs_env_model_percp | srs_environments | srs_grasping | srs_human_sensing | srs_interaction_primitives | srs_knowledge | srs_leg_detector | srs_likelihood_calculation | srs_msgs | srs_object_verification | srs_pellet | srs_people_tracking_filter | srs_scenarios | srs_states | srs_symbolic_grounding | srs_ui_but

Package Summary

srs_knowledge is a ros package handling the task planning at the symbolic level in the srs project.

INSTALL

To be able to compile it, rosjava_jni is needed here (although rosjava can be considered in future due to the fact that rosjava_jni is unsupported in future).

Also, JAVA_HOME should be set. Put the line below in .bashrc (if under Ubuntu 11.04. For other systems, the path should be changed accordingly).

export JAVA_HOME=/usr/lib/jvm/java-6-openjdk

ROS API

Implementation of ros service for a semantic database using Java (rosjava_jni) and Jena/pellet.

knowledge_srs_node

knowledge_srs_node

Services

task_request (srs_knowledge/TaskRequest)
  • When there is a new task, send this request. A new session id will be generated used for following action generation
plan_next_action (srs_knowledge/PlanNextAction)
  • To get the next action that the robot needs to execute
query_sparql (srs_knowledge/QuerySparQL)
  • To send a sparql query directly to the database and return the result in JSON format (mainly for testing purpose)
get_objects_on_map (srs_knowledge/GetObjectsOnMap)
  • To query in SDB for all movable or graspable objects, such as MilkBox0. All object names are unique and case sensitive as defined in the owl file.
get_workspace_on_map (srs_knowledge/GetWorkspaceOnMap)
  • To query in SDB for all workspace or furniture objects, such as table, fridge. All object names are unique and case sensitive as defined in the owl file
get_rooms_on_map (srs_knowledge/GetRoomsOnMap)
  • To query in SDB for all rooms. All names are unique and case sensitive as defined in the owl file
get_predefined_poses (srs_knowledge/GetPredefinedPoses)
  • To query in SDB for all poses that are predefined, such as home, charging_position, etc.
get_workspace_for_object (srs_knowledge/GetWorkspaceForObject)
  • To query in SDB for all possible workspaces or furniture pieces that could store a particular object. E.g. book_shelf and desk could be the workspace for a book.

Types of objects

Two types of objects are defined here. Graspable or movable objects, and Workspace or furniture objects.

grasp or movable objects

possible actions:

  • move - move to the furniture which holds the object
  • grasp - grasp the object

query in SDB: get_objects_on_map

Using this service for relevant information about objects, the following information can be obtained:

  objects: ['MilkBox0']       #object name

  classesOfObjects: ['MilkBox']    #object class
  spatialRelation: ['spatiallyRelated']   
  spatialRelatedObject: ['Dishwasher0']   # furniture which hold the object 
  houseHoldId: ['1']   # ID in HHDB

Furniture objects

Similarly, furniture objects are considered not movable (though can be updated in the database as well, but having different actions accordingly)

Possible actions

  • move - move to the furniture
  • search - search objects on furniture
  • environment_update - update the pose information of the targeted object

query in SDB: get_workspace_on_map

Using this service for relevant information about objects, the following information can be obtained:

objects: ['Oven0', 'Sink0', 'Stove0', 'Fridge0', 'Sofa0', 'Dishwasher0', 'Table0']

 #For each of the objects you have

  “l, w, h” is the bounding box.
  - 
    l: 0.600000023842
    w: 0.600000023842
    h: 0.850000023842
    pose: 
      position:   # the origin
        x: -3.20000004768
        y: 0.159999996424
        z: 0.425000011921
      orientation: 
        x: 0.0
        y: 0.0
        z: 0.0
        w: 1.0


   houseHoldId: ['-1']   #the related id in HHDB ( -1 as the default value showing there is no associated model in HHDB (for the moment)).
  • Real coordinate from IPA kitchen is used for furnitures in Semantic DB

  • Additional information, such as 2D projection of the furnitures information should be retrieved from HHDB.

Usage/Examples

This package is included in the launch file in package srs_scenario. To start the service individually, run

rosrun srs_knowledge knowledgeEngine

and an example script how to test it

rosrun srs_knowledge demoplanaction.py 

or

rosrun srs_knowledge testRosJavaService.py 

Mainly, this package is used with srs_decision_making together.

rosrun srs_decision_making srs_actions_server.py

Wiki: srs_knowledge (last edited 2012-05-24 11:29:29 by jizecn)