Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| interact_with_knowrob_via_ros [2012/12/01 12:51] – created tenorth | interact_with_knowrob_via_ros [2014/06/05 11:38] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Interact with KnowRob via ROS ====== | + | #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() | + | |
| - | + | ||
| - | </ | + | |
| - | + | ||

