ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Tutorials on cram_designator

asked 2012-11-22 01:31:39 -0600

ZiyangLI gravatar image

updated 2012-11-22 01:51:44 -0600

Hi, are there better tutorials on how to use designators with cram_designator?

I have checked http://ros.org/wiki/cram_designators but the following part is really unclear for me

(def-fact-group navigation-action-designator (action-desig)
  (<- (action-desig ?designator ?goal)
    (desig-prop ?designator (type navigation))
    (desig-prop ?designator (goal ?goal))))

How do I interpret these codes?

  • What are those things with question mark? Are they temporal variables?
  • What is action-desig? In this case I think it is an action-designator type input instead of a function. So what does (action-desig ?designator ?goal) means?
  • In cram_pr2 process module, I can find even more definitions like these but quite hard to understand the meaning. Do I need to learn some prolog?

Looking forward to reply!

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2012-11-22 02:19:04 -0600

Lorenz gravatar image

The code above is Prolog code for the Lisp-based Prolog interpreter CRAM uses. Have a look at cram_reasoning for more information.

All symbols prefixed with a questionmark are variables in the Lisp-Prolog-interpreter. That's actually pretty common syntax in most Lisp-based reasoning systems.

The code you pasted defines a predicate that holds for all designators that contain the properties (type navigation) and (goal <some goal>) and binds a variable to the actual goal.

action-desig? is a predicate that holds only for action designators. The predicate action-desig on the other hand is used by the method reference to resolve the designator.

If you want to use designators and maybe even implement your own, you will definitely have to learn some Prolog.

edit flag offensive delete link more
1

answered 2012-11-22 01:39:51 -0600

makokal gravatar image

The question marks are part of Lisp syntax, perhaps you could start by going over the basics of CRAM to understand what designators mean. A good starting point is http://ros.org/wiki/cram_language, and http://www.ros.org/wiki/cram_pl/InternalTutorials

edit flag offensive delete link more

Comments

Note that the internal tutorials might be pretty outdated and wrong at some points.

Lorenz gravatar image Lorenz  ( 2012-11-22 02:12:12 -0600 )edit

Could you give some pointers as to which (parts of the) tutorials are outdated?

Loy gravatar image Loy  ( 2012-11-22 08:35:16 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2012-11-22 01:31:39 -0600

Seen: 573 times

Last updated: Nov 22 '12