Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
tutorials:intermediate:bullet_world [2019/07/08 17:04] – [Moving the robot in the Bullet world] gkazhoya | tutorials:intermediate:bullet_world [2019/07/08 17:25] – [Moving the robot in the Bullet world] gkazhoya | ||
---|---|---|---|
Line 522: | Line 522: | ||
+ | |||
+ | ==== Using TF in the Bullet world ==== | ||
+ | |||
+ | Per default, the TF listener is not set up in the REPL, when you are working with the Bullet world. | ||
+ | To have it running, we need a TF context. It is possible to create it manually, but to not overcomplicate this tutorial, | ||
+ | we will use the environment provided by the '' | ||
+ | |||
+ | For example, the following does not work (unless you have a real robot running in your ROS ecosystem): | ||
+ | <code lisp> | ||
+ | BTW-TUT> (cl-tf: | ||
+ | </ | ||
+ | and the following does: | ||
+ | <code lisp> | ||
+ | BTW-TUT> (pr2-proj: | ||
+ | | ||
+ | </ | ||
+ | Here, ''" | ||
==== Moving the robot in the Bullet world ==== | ==== Moving the robot in the Bullet world ==== | ||
Line 576: | Line 593: | ||
</ | </ | ||
+ | < | ||
+ | To execute any plan in CRAM, we need a top-level context. Besides that we also use a macro to specify that the demo should be executed in simulation, not on the real robot. Putting your plan under '' | ||
+ | We can execute some movements in parallel, if they use different joints of the robot. That's what '' | ||
+ | We have used a simple call to low level methods to achieve motions like move to the ''? | ||
+ | --></ | ||
- | To execute any plan in CRAM, we need a top-level context. Besides that we also use a macro to specify that the demo should be executed in simulation, not on the real robot. Putting your plan under '' | + | Putting all these together we end up with the following: |
<code lisp> | <code lisp> | ||
BTW-TUT> | BTW-TUT> | ||
(pr2-proj: | (pr2-proj: | ||
- | | + | (pr2-proj:: |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | (pr2-proj:: |
- | (pr2-proj:: | + | (pr2-proj:: |
- | (pr2-proj:: | + | </ |
+ | As some of the functions in '' | ||
+ | |||
+ | The function '' | ||
+ | <code lisp> | ||
+ | (prolog: | ||
</ | </ | ||
- | We can execute some movements in parallel, if they use different joints of the robot. That's what ''cpl:par'' | + | '' |
- | To grasp the bottle we need to have its pose in the room. Therefore, we first perceive | + | Now, let us finally |
<code lisp> | <code lisp> | ||
BTW-TUT> | BTW-TUT> | ||
Line 610: | Line 637: | ||
</ | </ | ||
- | With that resulting perceived object we perform the picking up action. With the torso so far down we might not be able to reach for the bottle, so we need to also push the torso up: | + | With that resulting perceived object we could perform the picking up action. With the torso so far down we might not be able to reach the bottle, so we need to push the torso up: |
<code lisp> | <code lisp> | ||
Line 619: | Line 646: | ||
As there is no atomic motion for picking up an object, in fact, picking up is comprised of multiple move-arm motions, | As there is no atomic motion for picking up an object, in fact, picking up is comprised of multiple move-arm motions, | ||
- | so pick up is implemented within a plan and called by performing an action designator. | + | pick up is implemented within a plan and called by performing an action designator. |