Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
interact_with_knowrob_via_ros [2013/01/09 21:12] – [Interact with KnowRob via ROS] tenorth | interact_with_knowrob_via_ros [2013/04/22 08:36] – admin | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Use KnowRob from your program ====== | + | #REDIRECT doc:interact_with_knowrob_via_ros |
- | + | ||
- | The interactive Prolog shell that [[http:// | + | |
- | + | ||
- | You can run the // | + | |
- | < | + | |
- | rosrun json_prolog json_prolog ias_semantic_map | + | |
- | </ | + | |
- | + | ||
- | ===== Client libraries ===== | + | |
- | The communication with the // | + | |
- | + | ||
- | <code python> | + | |
- | + | ||
- | #!/ | + | |
- | + | ||
- | import roslib; roslib.load_manifest(' | + | |
- | + | ||
- | import rospy | + | |
- | import json_prolog | + | |
- | + | ||
- | if __name__ == ' | + | |
- | rospy.init_node(' | + | |
- | prolog = json_prolog.Prolog() | + | |
- | query = prolog.query(" | + | |
- | for solution in query.solutions(): | + | |
- | print 'Found solution. A = %s, B = %s' % (solution[' | + | |
- | query.finish() | + | |
- | + | ||
- | </ | + | |
- | + |