File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change 1414 DesignatorExecutionStart ,
1515 DesignatorExecutionFinished
1616)
17+ from knowrob_ros .knowrob_ros_lib import KnowRobRosLib
18+ from knowrob_ros .knowrob_ros_lib import get_default_modalframe
19+
20+ def testQueryDesig ():
21+ know = KnowRobRosLib ()
22+ know .init_clients () # After rospy.init_node()
23+
24+ query = "triple(?d, rdf:type, soma:PyCramDesignator)"
25+ rospy .loginfo (f"asking [{ query } ] ..." )
26+ result = know .ask_one (query , get_default_modalframe ())
27+ rospy .loginfo (f"response: [{ result } ]" )
1728
1829def main ():
1930 rospy .init_node ('knowrob_designator_topic_client' )
@@ -145,6 +156,9 @@ def main():
145156 exec_finished_msg .json_designator = resolved_designator
146157 rospy .loginfo ("Publishing DesignatorExecutionFinished..." )
147158 exec_finished_pub .publish (exec_finished_msg )
159+
160+ # Finally do some testing queries with KnowRob
161+ testQueryDesig ()
148162
149163if __name__ == '__main__' :
150164 main ()
You can’t perform that action at this time.
0 commit comments