[Fawkes Git] branch/thofmann/rcll-crossover-challenge: created (0.5.0-3117-g72ba5d4)

Tim Niemueller niemueller at kbsg.rwth-aachen.de
Tue Jul 12 09:52:10 CEST 2016


Changes have been pushed for the project "Fawkes Robotics Software Framework".

Gitweb: http://git.fawkesrobotics.org/fawkes.git
Trac:   http://trac.fawkesrobotics.org

The branch, thofmann/rcll-crossover-challenge has been created
        at  72ba5d495e85d1b259db185bc9b206cda68890c9 (commit)

http://git.fawkesrobotics.org/fawkes.git/thofmann/rcll-crossover-challenge

- *Log* ---------------------------------------------------------------
commit c9c362ebdf23cabeeef8d9ad213438a7b72b2b13
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Wed Jun 8 18:30:19 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Wed Jun 8 18:30:19 2016 +0200

    add skill

http://git.fawkesrobotics.org/fawkes.git/commit/c9c362e
http://trac.fawkesrobotics.org/changeset/c9c362e

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit a78ed0a09dfb421340b1b81c96857a45f18f023e
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Fri Jun 10 14:40:58 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Fri Jun 10 14:41:39 2016 +0200

    make position of the product on the belt parameterized

http://git.fawkesrobotics.org/fawkes.git/commit/a78ed0a
http://trac.fawkesrobotics.org/changeset/a78ed0a

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit a20a6c6408f255710a9d58e1f82d7b2213d30b67
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Fri Jun 10 14:44:01 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Fri Jun 10 14:44:01 2016 +0200

    switch to separate model for the product

http://git.fawkesrobotics.org/fawkes.git/commit/a20a6c6
http://trac.fawkesrobotics.org/changeset/a20a6c6

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit e8326e8885d0124501f7d8b12767de911e9aa347
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Fri Jun 10 14:44:38 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Fri Jun 10 14:44:38 2016 +0200

    adapt to newer version of libkindrv

http://git.fawkesrobotics.org/fawkes.git/commit/e8326e8
http://trac.fawkesrobotics.org/changeset/e8326e8

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 50f492f377cffcc1725baa4fed033c238519f3ed
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Fri Jun 10 14:45:29 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Fri Jun 10 14:45:29 2016 +0200

    add parantheses to fix GCC warning

http://git.fawkesrobotics.org/fawkes.git/commit/50f492f
http://trac.fawkesrobotics.org/changeset/50f492f

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit b8130bc38d23d162bb75822a05efd488c12b27e9
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Fri Jun 10 14:56:23 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Fri Jun 10 14:56:23 2016 +0200

    add RCLL openrave models

http://git.fawkesrobotics.org/fawkes.git/commit/b8130bc
http://trac.fawkesrobotics.org/changeset/b8130bc

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 5d7ff45fb38df4658d4b6834c9fd041ec974b305
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Fri Jun 10 16:35:36 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Fri Jun 10 16:35:36 2016 +0200

    If hover over the belt fails, try to hover closer to the belt
    
    Instead of trying to hover even higher, try to hover closer to the belt.
    Usually hovering fails because the arm cannot be moved so high; going
    even higher does not solve anything.

http://git.fawkesrobotics.org/fawkes.git/commit/5d7ff45
http://trac.fawkesrobotics.org/changeset/5d7ff45

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 19d07cd43c7dbe4fe44a0be78f5acce0162ce02b
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Fri Jun 10 16:51:35 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Fri Jun 10 16:51:35 2016 +0200

    rcll robot model: add min/max heights

http://git.fawkesrobotics.org/fawkes.git/commit/19d07cd
http://trac.fawkesrobotics.org/changeset/19d07cd

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit e5d250a5e9f6cdac94efad68ef211c51bb7e52ac
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Fri Jun 10 16:56:46 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Fri Jun 10 16:56:46 2016 +0200

    parameterize drop position

http://git.fawkesrobotics.org/fawkes.git/commit/e5d250a
http://trac.fawkesrobotics.org/changeset/e5d250a

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 89b18c0b1f0f16cae224895ce7c6453b36647497
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Wed Jun 15 13:05:25 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Wed Jun 15 13:05:25 2016 +0200

    split gripper close and obj attachment in two states, check grab
    
    Also add a stage on the retract branch to make sure the arm doesn't hit
    the arm while retracting.

http://git.fawkesrobotics.org/fawkes.git/commit/89b18c0
http://trac.fawkesrobotics.org/changeset/89b18c0

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 16eee25ecfe9fc8d7846ee0f4814be965735cef1
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Wed Jun 15 13:07:24 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Wed Jun 15 13:07:24 2016 +0200

    parameterize more jaco arm positions
    
    Add constants instead of hard-coding the values.

http://git.fawkesrobotics.org/fawkes.git/commit/16eee25
http://trac.fawkesrobotics.org/changeset/16eee25

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 293102b8eaadef5c0b0976f8cad6ee364cdecfbd
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Wed Jun 15 13:08:05 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Wed Jun 15 13:08:05 2016 +0200

    only close two fingers during the grab

http://git.fawkesrobotics.org/fawkes.git/commit/293102b
http://trac.fawkesrobotics.org/changeset/293102b

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 095508f730b60c7c23270c67db2aeb1b76d1961d
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Wed Jun 15 18:31:56 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Wed Jun 15 18:44:30 2016 +0200

    adapt to new arm position mounted on the left of the MPS

http://git.fawkesrobotics.org/fawkes.git/commit/095508f
http://trac.fawkesrobotics.org/changeset/095508f

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit ce751a17b138ca370d61cf2936b9c466d02476a2
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Wed Jun 15 18:46:52 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Wed Jun 15 18:46:52 2016 +0200

    add separators to limit the movement of the arm

http://git.fawkesrobotics.org/fawkes.git/commit/ce751a1
http://trac.fawkesrobotics.org/changeset/ce751a1

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 6b1c0e1797e3ffdfed39e04e692d998e91741e5c
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Wed Jun 15 19:02:14 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Wed Jun 15 19:02:14 2016 +0200

    add a box at the drop location

http://git.fawkesrobotics.org/fawkes.git/commit/6b1c0e1
http://trac.fawkesrobotics.org/changeset/6b1c0e1

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 46fc7a808dc998e0504fb824e850f98dead40402
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Thu Jun 23 17:52:20 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Thu Jun 23 17:52:20 2016 +0200

    add model for a simple box where the product is placed
    
    This will be replaced by the actual base of @work.

http://git.fawkesrobotics.org/fawkes.git/commit/46fc7a8
http://trac.fawkesrobotics.org/changeset/46fc7a8

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit b253385c7b7849b9a0d8a4c68e37f82eb591cf5f
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Tue Jun 28 18:17:17 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Tue Jun 28 18:17:17 2016 +0200

    rcll crossover: adapt base of the robot so the arm isn't flying

http://git.fawkesrobotics.org/fawkes.git/commit/b253385
http://trac.fawkesrobotics.org/changeset/b253385

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 4d0240e53767da0f6f2da2ded4e226f69b7484c8
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Tue Jun 28 18:17:56 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Tue Jun 28 18:17:56 2016 +0200

    skill rcll_move_product: give the arm more room
    
    With the current limitations, the arm hits a wall in the initial
    position and therefore cannot move at all.

http://git.fawkesrobotics.org/fawkes.git/commit/4d0240e
http://trac.fawkesrobotics.org/changeset/4d0240e

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 20bb4a24a922dbfc5a48f9146e2066ceb052d337
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Mon Jun 27 18:26:13 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Tue Jun 28 18:22:45 2016 +0200

    product-exchange: add plugin skeleton

http://git.fawkesrobotics.org/fawkes.git/commit/20bb4a2
http://trac.fawkesrobotics.org/changeset/20bb4a2

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 8472fc007e999b375f7e215aac33fb268e805ac3
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Tue Jun 28 11:37:26 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Tue Jun 28 18:22:45 2016 +0200

    product-exchange: read protobuf msg and print out a message
    
    Read the protobuf message that is sent by the refbox, but don't do
    anything yet.

http://git.fawkesrobotics.org/fawkes.git/commit/8472fc0
http://trac.fawkesrobotics.org/changeset/8472fc0

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 87a1dd4ad43b6879c035d2fc6c2f96c07fe09df3
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Tue Jun 28 13:11:45 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Tue Jun 28 18:22:45 2016 +0200

    product-exchange: process requests in loop() by starting the resp skill
    
    Requests are added to the queue asynchronously but processed in loop.
    Always process one request at a time and only start processing a request
    if the skiller is currently idle. Otherwise, we would cancel the
    currently running skill.

http://git.fawkesrobotics.org/fawkes.git/commit/87a1dd4
http://trac.fawkesrobotics.org/changeset/87a1dd4

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 4f53c8b1cce0da7202d9a85bf6e3a8aa0ab325ad
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Tue Jun 28 14:19:15 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Tue Jun 28 18:22:45 2016 +0200

    product-exchange: check the result of the skiller
    
    During the loop, first check if there is a current request and if the
    Skiller already finished running the request. Handle success/failure
    depending on the skiller status.

http://git.fawkesrobotics.org/fawkes.git/commit/4f53c8b
http://trac.fawkesrobotics.org/changeset/4f53c8b

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit f3af838890ff56a865e22b45d52a460a84076182
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Tue Jun 28 15:07:39 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Tue Jun 28 18:22:45 2016 +0200

    product-exchange: send a protobuf message after execution
    
    Send the result of the handover as a protobuf message; set completed to
    true iff the skill was successful.

http://git.fawkesrobotics.org/fawkes.git/commit/f3af838
http://trac.fawkesrobotics.org/changeset/f3af838

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 4d5c4da7ef7c8de7df9c2b88081873d9d572ac86
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Tue Jun 28 17:03:45 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Tue Jun 28 18:22:45 2016 +0200

    product-exchange: add optional field success to protobuf message

http://git.fawkesrobotics.org/fawkes.git/commit/4d5c4da
http://trac.fawkesrobotics.org/changeset/4d5c4da

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 3935d29cc684b405d421cc7c225545333816853d
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Tue Jun 28 18:14:41 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Tue Jun 28 18:22:45 2016 +0200

    cfg: fix typo in gazebo config

http://git.fawkesrobotics.org/fawkes.git/commit/3935d29
http://trac.fawkesrobotics.org/changeset/3935d29

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 3ec8ed555ef620f58fb7e518c6e881993c1ddeb6
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Tue Jun 28 18:15:06 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Tue Jun 28 18:22:45 2016 +0200

    cfg: adapt config to rcll crossover challenge

http://git.fawkesrobotics.org/fawkes.git/commit/3ec8ed5
http://trac.fawkesrobotics.org/changeset/3ec8ed5

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 51ced064c680b866126e3d708e30f8fa1bdd7e63
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Tue Jun 28 18:16:23 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Tue Jun 28 18:22:45 2016 +0200

    plugins: build product_exchange plugin

http://git.fawkesrobotics.org/fawkes.git/commit/51ced06
http://trac.fawkesrobotics.org/changeset/51ced06

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 95a7fc4a8834f391f06d18ae859b3ff03bd4a738
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Tue Jun 28 18:39:43 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Tue Jun 28 18:39:43 2016 +0200

    product-exchange: fix path in msgs Makefile

http://git.fawkesrobotics.org/fawkes.git/commit/95a7fc4
http://trac.fawkesrobotics.org/changeset/95a7fc4

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 2ab58ee002cb3bf01fe9037bbdc6100717fca4b7
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Tue Jun 28 22:05:22 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Tue Jun 28 22:05:22 2016 +0200

    skill rcll_move_product: adapt to new construction

http://git.fawkesrobotics.org/fawkes.git/commit/2ab58ee
http://trac.fawkesrobotics.org/changeset/2ab58ee

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 5e15abffcbdfbd2a87c50d54df5dcf364a81045d
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Tue Jun 28 22:08:53 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Tue Jun 28 22:08:53 2016 +0200

    skill rcll_move_product: split open gripper, release obj into 2 states

http://git.fawkesrobotics.org/fawkes.git/commit/5e15abf
http://trac.fawkesrobotics.org/changeset/5e15abf

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 5d41574c3459c6906fb50737be0d3eba8e2cd1b3
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Thu Jun 30 08:52:19 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Thu Jun 30 08:52:19 2016 +0200

    skill rcll_move_product: adapt drop position to actual @work platform

http://git.fawkesrobotics.org/fawkes.git/commit/5d41574
http://trac.fawkesrobotics.org/changeset/5d41574

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 237079ef057b681928e17e7e1d034a1c8230e69e
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Thu Jun 30 09:02:26 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Thu Jun 30 09:02:26 2016 +0200

    rcll crossover: add the correct atwork platform

http://git.fawkesrobotics.org/fawkes.git/commit/237079e
http://trac.fawkesrobotics.org/changeset/237079e

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 312d67d0b70a84a83fe4dc47769eba47d4883ec5
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Thu Jun 30 10:19:47 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Thu Jun 30 10:19:47 2016 +0200

    rcll crossover: add more accurate model of the robot base

http://git.fawkesrobotics.org/fawkes.git/commit/312d67d
http://trac.fawkesrobotics.org/changeset/312d67d

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 682dea8a4ac4c6d7e90ef72df0e53ba5c7290428
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Thu Jun 30 14:47:17 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Thu Jun 30 14:47:17 2016 +0200

    product-exchange: try to reconnect if not connected to the refbox
    
    If the refbox is started after fawkes, the plugin didn't accept any
    requests from the refbox because it tried to connect only once. Now,
    always try to reconnect when the client is currently not connected.

http://git.fawkesrobotics.org/fawkes.git/commit/682dea8
http://trac.fawkesrobotics.org/changeset/682dea8

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 465878a8140d3e8a9365a00c2d142e648cf3b28a
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Thu Jun 30 19:15:14 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Thu Jun 30 19:15:14 2016 +0200

    product-exchange: make refbox hostname and port configurable

http://git.fawkesrobotics.org/fawkes.git/commit/465878a
http://trac.fawkesrobotics.org/changeset/465878a

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
commit 72ba5d495e85d1b259db185bc9b206cda68890c9
Author:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
AuthorDate: Fri Jul 1 22:37:55 2016 +0200
Commit:     Till Hofmann <hofmann at kbsg.rwth-aachen.de>
CommitDate: Fri Jul 1 22:37:55 2016 +0200

    product-exchange: only try to reconnect every 50th loop

http://git.fawkesrobotics.org/fawkes.git/commit/72ba5d4
http://trac.fawkesrobotics.org/changeset/72ba5d4

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -


- *Summary* -----------------------------------------------------------
 cfg/conf.d/gazsim.yaml                             |    2 +-
 cfg/conf.d/jaco.yaml                               |    6 +-
 cfg/conf.d/skiller.yaml                            |   41 +---
 ...ate.kinbody.xml => atwork_platform.kinbody.xml} |    8 +-
 res/openrave/mps_cap.stl                           |  Bin 0 -> 493384 bytes
 res/openrave/rcll.machine.xml                      |   11 +
 .../{cylinder_red.kinbody.xml => rcll.prod.xml}    |    4 +-
 res/openrave/rcll.robot.xml                        |   56 +++++
 .../skills/generic/advanced/rcll_move_product.lua  |  136 +++++++++---
 .../rcll_crossover/init.lua}                       |   19 +-
 src/plugins/Makefile                               |    3 +-
 src/plugins/jaco/arm_kindrv.cpp                    |   10 +-
 src/plugins/jaco/openrave_thread.cpp               |    2 +-
 .../{gazebo/msgs => product_exchange}/Makefile     |   25 ++-
 .../{gazebo => product_exchange}/msgs/Makefile     |    9 +-
 .../product_exchange/msgs/OrderInfo.proto}         |   81 +++++---
 .../product_exchange_plugin.cpp}                   |   28 ++-
 .../product_exchange/product_exchange_thread.cpp   |  230 ++++++++++++++++++++
 .../product_exchange/product_exchange_thread.h     |   82 +++++++
 19 files changed, 610 insertions(+), 143 deletions(-)
 copy res/openrave/{plate.kinbody.xml => atwork_platform.kinbody.xml} (51%)
 create mode 100644 res/openrave/mps_cap.stl
 create mode 100644 res/openrave/rcll.machine.xml
 copy res/openrave/{cylinder_red.kinbody.xml => rcll.prod.xml} (83%)
 create mode 100644 res/openrave/rcll.robot.xml
 copy src/lua/{skiller/skillstati.lua => skills/rcll_crossover/init.lua} (62%)
 copy src/plugins/{gazebo/msgs => product_exchange}/Makefile (51%)
 copy src/plugins/{gazebo => product_exchange}/msgs/Makefile (75%)
 copy src/{libs/protobuf_comm/queue_entry.h => plugins/product_exchange/msgs/OrderInfo.proto} (58%)
 copy src/plugins/{ros/joint_plugin.cpp => product_exchange/product_exchange_plugin.cpp} (58%)
 create mode 100644 src/plugins/product_exchange/product_exchange_thread.cpp
 create mode 100644 src/plugins/product_exchange/product_exchange_thread.h


- *Diffs* -------------------------------------------------------------

- *commit* c9c362ebdf23cabeeef8d9ad213438a7b72b2b13 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Wed Jun 8 18:30:19 2016 +0200
Subject: add skill

 .../skills/generic/advanced/rcll_move_product.lua  |  229 ++++++++++++++++++++
 1 files changed, 229 insertions(+), 0 deletions(-)


- *commit* a78ed0a09dfb421340b1b81c96857a45f18f023e - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Fri Jun 10 14:40:58 2016 +0200
Subject: make position of the product on the belt parameterized

 .../skills/generic/advanced/rcll_move_product.lua  |   24 ++++++++++++++-----
 1 files changed, 17 insertions(+), 7 deletions(-)

_Diff for modified files_:
diff --git a/src/lua/skills/generic/advanced/rcll_move_product.lua b/src/lua/skills/generic/advanced/rcll_move_product.lua
index 443c3c3..e9b6b18 100644
--- a/src/lua/skills/generic/advanced/rcll_move_product.lua
+++ b/src/lua/skills/generic/advanced/rcll_move_product.lua
@@ -46,6 +46,9 @@ local PARK_Z = 0.9
 local PARK_E1 = 1.57
 local PARK_E2 = 3.14
 local PARK_E3 = 3.14
+local PROD_POS_X = 0.25
+local PROD_POS_Y = 0.22
+local PROD_POS_Z = 0.91
 
 -- States
 fsm:define_states{ export_to=_M,
@@ -136,8 +139,9 @@ end
 
 function MOVE_OBJS:init()
   self.args["or_object"] = {
-    move={{name="mps", x=0.25, y=0.3, z=0.0},
-          {name="prod", x=0.25,y=0.4,z=0.84}}}
+    move={{name="mps", x=0.55, y=0.6, z=0},
+          {name="prod", x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z}
+          }}
 end
 
 function INIT_PARK:init()
@@ -150,19 +154,24 @@ function OPEN_GRIPPER:init()
 end
 
 function HOVER_BELT:init()
-  self.args["jaco"] = {x=0.25,y=0.4,z=0.90,e1=1.57,e2=3.14,e3=3.14}
+  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z+0.1,
+                        e1=1.57,e2=3.14,e3=3.14}
 end
 
 function RELAXED_HOVER_BELT:init()
-  self.args["jaco"] = {x=0.25,y=0.4,z=0.95,e1=1.57,e2=3.14,e3=3.14}
+  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z+0.2,
+                        e1=1.57,e2=3.14,e3=3.14}
+
 end
 
 function BELT_GRAB_POS:init()
-  self.args["jaco"] = {x=0.25,y=0.4,z=0.83,e1=1.57,e2=3.14,e3=3.14}
+  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z+0.02,
+                        e1=1.57,e2=3.14,e3=3.14}
 end
 
 function RELAXED_BELT_GRAB_POS:init()
-  self.args["jaco"] = {x=0.25,y=0.4,z=0.87,e1=1.57,e2=3.14,e3=3.14}
+  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z+0.05,
+                        e1=1.57,e2=3.14,e3=3.14}
 end
 
 function GRAB_FROM_BELT:init()
@@ -171,7 +180,8 @@ function GRAB_FROM_BELT:init()
 end
 
 function MOVE_UP_FROM_BELT:init()
-  self.args["jaco"] = {x=0.25, y=0.4, z=0.95,e1=1.57,e2=3.14,e3=3.14}
+  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z+0.1,
+                        e1=1.57,e2=3.14,e3=3.14}
 end
 
 function MOVE_TO_MIDDLE:init()

- *commit* a20a6c6408f255710a9d58e1f82d7b2213d30b67 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Fri Jun 10 14:44:01 2016 +0200
Subject: switch to separate model for the product

 .../skills/generic/advanced/rcll_move_product.lua  |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/lua/skills/generic/advanced/rcll_move_product.lua b/src/lua/skills/generic/advanced/rcll_move_product.lua
index e9b6b18..ecc6947 100644
--- a/src/lua/skills/generic/advanced/rcll_move_product.lua
+++ b/src/lua/skills/generic/advanced/rcll_move_product.lua
@@ -134,7 +134,7 @@ end
 function ADD_OBJS:init()
   self.args["or_object"] = {
     add={ {name="mps", path="rcll.machine.xml"},
-          {name="prod", path="cylinder_red.kinbody.xml"}}}
+          {name="prod", path="rcll.prod.xml"}}}
 end
 
 function MOVE_OBJS:init()

- *commit* e8326e8885d0124501f7d8b12767de911e9aa347 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Fri Jun 10 14:44:38 2016 +0200
Subject: adapt to newer version of libkindrv

 src/plugins/jaco/arm_kindrv.cpp |   10 +++++-----
 1 files changed, 5 insertions(+), 5 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/jaco/arm_kindrv.cpp b/src/plugins/jaco/arm_kindrv.cpp
index 609ecab..e40ecd9 100644
--- a/src/plugins/jaco/arm_kindrv.cpp
+++ b/src/plugins/jaco/arm_kindrv.cpp
@@ -107,7 +107,7 @@ JacoArmKindrv::final()
 
     case TARGET_READY:
       {
-        jaco_retract_mode_t mode = __arm->get_status();
+        jaco_retract_mode_t mode = __arm->get_status().retract;
         __final = (mode == MODE_READY_STANDBY);
 
         if( __final ) {
@@ -122,7 +122,7 @@ JacoArmKindrv::final()
 
     case TARGET_RETRACT:
       {
-        jaco_retract_mode_t mode = __arm->get_status();
+        jaco_retract_mode_t mode = __arm->get_status().retract;
         __final = (mode == MODE_RETRACT_STANDBY);
       }
       if( __final )
@@ -150,7 +150,7 @@ bool
 JacoArmKindrv::initialized()
 {
   if( !__initialized ) {
-    jaco_retract_mode_t mode = __arm->get_status();
+    jaco_retract_mode_t mode = __arm->get_status().retract;
     __initialized = (mode != MODE_NOINIT);
   }
 
@@ -284,7 +284,7 @@ JacoArmKindrv::goto_ready()
   __final = false;
 
   __arm->start_api_ctrl();
-  jaco_retract_mode_t mode = __arm->get_status();
+  jaco_retract_mode_t mode = __arm->get_status().retract;
   switch( mode ) {
     case MODE_RETRACT_TO_READY:
       //2 buttons needed
@@ -321,7 +321,7 @@ JacoArmKindrv::goto_retract()
   __final = false;
 
   __arm->start_api_ctrl();
-  jaco_retract_mode_t mode = __arm->get_status();
+  jaco_retract_mode_t mode = __arm->get_status().retract;
   switch( mode ) {
     case MODE_READY_TO_RETRACT:
       // 2 buttons needed

- *commit* 50f492f377cffcc1725baa4fed033c238519f3ed - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Fri Jun 10 14:45:29 2016 +0200
Subject: add parantheses to fix GCC warning

 src/plugins/jaco/openrave_thread.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/jaco/openrave_thread.cpp b/src/plugins/jaco/openrave_thread.cpp
index 1cd2c5f..cf440d6 100644
--- a/src/plugins/jaco/openrave_thread.cpp
+++ b/src/plugins/jaco/openrave_thread.cpp
@@ -258,7 +258,7 @@ JacoOpenraveThread::loop()
       } else if( (*it)->trajec_state==TRAJEC_SKIP && (*it)->type == TARGET_ANGULAR ) {
         from = *it;
         break;
-      } else if( !(*it)->type==TARGET_GRIPPER ) {
+      } else if( !((*it)->type==TARGET_GRIPPER) ) {
         // A previous target has unknown final configuration. Cannot plan for our target yet. Abort.
         //  TARGET_GRIPPER would be the only one we could skip without problems.
         __arm->target_mutex->unlock();

- *commit* b8130bc38d23d162bb75822a05efd488c12b27e9 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Fri Jun 10 14:56:23 2016 +0200
Subject: add RCLL openrave models

 res/openrave/mps_cap.stl                           |  Bin 0 -> 493384 bytes
 res/openrave/rcll.machine.xml                      |   10 ++++
 .../{cylinder_red.kinbody.xml => rcll.prod.xml}    |    4 +-
 res/openrave/rcll.robot.xml                        |   49 ++++++++++++++++++++
 4 files changed, 61 insertions(+), 2 deletions(-)


- *commit* 5d7ff45fb38df4658d4b6834c9fd041ec974b305 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Fri Jun 10 16:35:36 2016 +0200
Subject: If hover over the belt fails, try to hover closer to the belt

 .../skills/generic/advanced/rcll_move_product.lua  |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

_Diff for modified files_:
diff --git a/src/lua/skills/generic/advanced/rcll_move_product.lua b/src/lua/skills/generic/advanced/rcll_move_product.lua
index ecc6947..1aee75a 100644
--- a/src/lua/skills/generic/advanced/rcll_move_product.lua
+++ b/src/lua/skills/generic/advanced/rcll_move_product.lua
@@ -78,8 +78,8 @@ fsm:define_states{ export_to=_M,
   -- further above the belt.
   -- If the grab fails, open the gripper and retract to parking.
   {"HOVER_BELT", SkillJumpState, final_to="BELT_GRAB_POS",
-    fail_to="RELAXED_HOVER_BELT", skills={{jaco}}},
-  {"RELAXED_HOVER_BELT", SkillJumpState, final_to="BELT_GRAB_POS",
+    fail_to="CLOSE_HOVER_BELT", skills={{jaco}}},
+  {"CLOSE_HOVER_BELT", SkillJumpState, final_to="BELT_GRAB_POS",
     fail_to="FAILED", skills={{jaco}}},
   {"BELT_GRAB_POS", SkillJumpState, final_to="GRAB_FROM_BELT",
     fail_to="RELAXED_BELT_GRAB_POS", skills={{jaco}}},
@@ -158,8 +158,8 @@ function HOVER_BELT:init()
                         e1=1.57,e2=3.14,e3=3.14}
 end
 
-function RELAXED_HOVER_BELT:init()
-  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z+0.2,
+function CLOSE_HOVER_BELT:init()
+  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z+0.05,
                         e1=1.57,e2=3.14,e3=3.14}
 
 end

- *commit* 19d07cd43c7dbe4fe44a0be78f5acce0162ce02b - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Fri Jun 10 16:51:35 2016 +0200
Subject: rcll robot model: add min/max heights

 res/openrave/rcll.robot.xml |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

_Diff for modified files_:
diff --git a/res/openrave/rcll.robot.xml b/res/openrave/rcll.robot.xml
index c8112e3..2bc8b50 100644
--- a/res/openrave/rcll.robot.xml
+++ b/res/openrave/rcll.robot.xml
@@ -2,6 +2,8 @@
 <Robot name="jaco_robot">
 
   <Robot prefix="arm_" file="jaco.kinbody.xml" name="jaco_arm">
+    <!-- min: 0.53
+         max: 0.63 -->
     <Translation> 0 0 0.56</Translation>
     <RotationAxis>0 0 1 270</RotationAxis>
   </Robot>

- *commit* e5d250a5e9f6cdac94efad68ef211c51bb7e52ac - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Fri Jun 10 16:56:46 2016 +0200
Subject: parameterize drop position

 .../skills/generic/advanced/rcll_move_product.lua  |   12 +++++++++---
 1 files changed, 9 insertions(+), 3 deletions(-)

_Diff for modified files_:
diff --git a/src/lua/skills/generic/advanced/rcll_move_product.lua b/src/lua/skills/generic/advanced/rcll_move_product.lua
index 1aee75a..5a022e3 100644
--- a/src/lua/skills/generic/advanced/rcll_move_product.lua
+++ b/src/lua/skills/generic/advanced/rcll_move_product.lua
@@ -49,6 +49,9 @@ local PARK_E3 = 3.14
 local PROD_POS_X = 0.25
 local PROD_POS_Y = 0.22
 local PROD_POS_Z = 0.91
+local DROP_POS_X = -0.1
+local DROP_POS_Y = 0.4
+local DROP_POS_Z = 0.1
 
 -- States
 fsm:define_states{ export_to=_M,
@@ -189,11 +192,13 @@ function MOVE_TO_MIDDLE:init()
 end
 
 function HOVER_GROUND:init()
-  self.args["jaco"] = {x=-0.1, y=0.4, z=0.2,e1=1.57,e2=3.14,e3=3.14}
+  self.args["jaco"] = {x=DROP_POS_X, y=DROP_POS_Y, z=DROP_POS_Z+0.12,
+                       e1=1.57,e2=3.14,e3=3.14}
 end
 
 function DROP_POS:init()
-  self.args["jaco"] = {x=-0.1, y=0.4, z=0.1,e1=1.57,e2=3.14,e3=3.14}
+  self.args["jaco"] = {x=DROP_POS_X, y=DROP_POS_Y, z=DROP_POS_Z+0.02,
+                       e1=1.57,e2=3.14,e3=3.14}
 end
 
 function DROP:init()
@@ -202,7 +207,8 @@ function DROP:init()
 end
 
 function POST_DROP:init()
-  self.args["jaco"] = {x=-0.1, y=0.4, z=0.2,e1=1.57,e2=3.14,e3=3.14}
+  self.args["jaco"] = {x=DROP_POS_X, y=DROP_POS_Y, z=DROP_POS_Z+0.12,
+                       e1=1.57,e2=3.14,e3=3.14}
 end
 
 function PARK:init()

- *commit* 89b18c0b1f0f16cae224895ce7c6453b36647497 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Wed Jun 15 13:05:25 2016 +0200
Subject: split gripper close and obj attachment in two states, check grab

 .../skills/generic/advanced/rcll_move_product.lua  |   33 +++++++++++++++++--
 1 files changed, 29 insertions(+), 4 deletions(-)

_Diff for modified files_:
diff --git a/src/lua/skills/generic/advanced/rcll_move_product.lua b/src/lua/skills/generic/advanced/rcll_move_product.lua
index 5a022e3..8c1f5c9 100644
--- a/src/lua/skills/generic/advanced/rcll_move_product.lua
+++ b/src/lua/skills/generic/advanced/rcll_move_product.lua
@@ -88,8 +88,11 @@ fsm:define_states{ export_to=_M,
     fail_to="RELAXED_BELT_GRAB_POS", skills={{jaco}}},
   {"RELAXED_BELT_GRAB_POS", SkillJumpState, final_to="GRAB_FROM_BELT",
     fail_to="FAILED", skills={{jaco}}},
-  {"GRAB_FROM_BELT", SkillJumpState, final_to="MOVE_UP_FROM_BELT",
-    fail_to="RETRACT_OPEN_GRIPPER", skills={{jaco},{or_object}}},
+  {"GRAB_FROM_BELT", SkillJumpState, final_to="CHECK_GRAB",
+    fail_to="RETRACT_OPEN_GRIPPER", skills={{jaco}}},
+  {"CHECK_GRAB", JumpState},
+  {"ATTACH_PROD", SkillJumpState, final_to="MOVE_UP_FROM_BELT",
+    fail_to="RETRACT_OPEN_GRIPPER", skills={{or_object}}},
   {"MOVE_UP_FROM_BELT", SkillJumpState, final_to="MOVE_TO_MIDDLE",
     fail_to="FAILED", skills={{jaco}}},
   -- intermediate position which is above the drop position
@@ -116,8 +119,10 @@ fsm:define_states{ export_to=_M,
     skills={{jaco}}},
   {"RETRACT_TO_PARK", SkillJumpState, final_to="FAILED",
     fail_to="RETRACT_TO_HOME", skills={{jaco}}},
-  {"RETRACT_OPEN_GRIPPER", SkillJumpState, final_to="RETRACT_TO_PARK",
-    fail_to="RETRACT_TO_PARK", skills={{jaco}}},
+  {"RETRACT_OPEN_GRIPPER", SkillJumpState, final_to="RETRACT_MOVE_UP_FROM_MPS",
+    fail_to="RETRACT_MOVE_UP_FROM_MPS", skills={{jaco}}},
+  {"RETRACT_MOVE_UP_FROM_MPS", SkillJumpState, final_to="RETRACT_TO_PARK",
+    fail_to="FAILED", skills={{jaco}}},
   {"RETRACT_MOVE_UP", SkillJumpState, final_to="RETRACT_TO_PARK",
     fail_to="FAILED", skills={{jaco}}},
   {"RETRY_PARK_INTERMEDIATE", SkillJumpState, final_to="RETRY_PARK",
@@ -128,6 +133,8 @@ fsm:define_states{ export_to=_M,
 
 -- Transitions
 fsm:add_transitions{
+  {"CHECK_GRAB", "ATTACH_PROD", cond="self.success"},
+  {"CHECK_GRAB", "RETRACT_OPEN_GRIPPER", cond=true}
 }
 
 function START:init()
@@ -179,9 +186,22 @@ end
 
 function GRAB_FROM_BELT:init()
   self.args["jaco"] = {gripper="close"}
+end
+
+function ATTACH_PROD:init()
   self.args["or_object"] = {attach={"prod"}}
 end
 
+
+function CHECK_GRAB:init()
+  local f1, f2 = jacoarm:finger1(), jacoarm:finger2()
+  if f1 <= 30 or f1 >= 50 or f2 <= 30 or f2 >= 50 then
+    self.success = false
+  else
+    self.success = true
+  end
+end
+
 function MOVE_UP_FROM_BELT:init()
   self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z+0.1,
                         e1=1.57,e2=3.14,e3=3.14}
@@ -230,6 +250,11 @@ function RETRACT_OPEN_GRIPPER:init()
   self.args["jaco"] = {gripper="open"}
 end
 
+function RETRACT_MOVE_UP_FROM_MPS:init()
+  self.args["jaco"] = {x=PROD_POS_X, y=PROD_POS_Y, z=PROD_POS_Z+0.1,
+                        e1=1.57,e2=3.14,e3=PICK_UP_E3}
+end
+
 function RETRACT_MOVE_UP:init()
   self.args["jaco"] = {x=-0.1, y=0.4, z=0.2,e1=1.57,e2=3.14,e3=3.14}
 end

- *commit* 16eee25ecfe9fc8d7846ee0f4814be965735cef1 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Wed Jun 15 13:07:24 2016 +0200
Subject: parameterize more jaco arm positions

 .../skills/generic/advanced/rcll_move_product.lua  |   42 ++++++++++---------
 1 files changed, 22 insertions(+), 20 deletions(-)

_Diff for modified files_:
diff --git a/src/lua/skills/generic/advanced/rcll_move_product.lua b/src/lua/skills/generic/advanced/rcll_move_product.lua
index 8c1f5c9..4755495 100644
--- a/src/lua/skills/generic/advanced/rcll_move_product.lua
+++ b/src/lua/skills/generic/advanced/rcll_move_product.lua
@@ -3,7 +3,7 @@
 --  rcll_move_product.lua -- Skill to grab a product from the MPS
 --
 --  Created: Tue Jun 07 17:44:42 2016
---  Copyright  2016  Till Hofmann 
+--  Copyright  2016  Till Hofmann
 --
 ----------------------------------------------------------------------------
 
@@ -42,16 +42,18 @@ skillenv.skill_module(_M)
 --local TARGET_REACHED_DISTANCE = 0.8
 local PARK_X = 0.0
 local PARK_Y = 0.4
-local PARK_Z = 0.9
+local PARK_Z = 1.0
 local PARK_E1 = 1.57
 local PARK_E2 = 3.14
 local PARK_E3 = 3.14
 local PROD_POS_X = 0.25
-local PROD_POS_Y = 0.22
+local PROD_POS_Y = 0.20
 local PROD_POS_Z = 0.91
+local PICK_UP_E3 = 3.4
+local PICK_UP_Y_OFFSET = 0.02
 local DROP_POS_X = -0.1
 local DROP_POS_Y = 0.4
-local DROP_POS_Z = 0.1
+local DROP_POS_Z = 0.3
 
 -- States
 fsm:define_states{ export_to=_M,
@@ -164,24 +166,24 @@ function OPEN_GRIPPER:init()
 end
 
 function HOVER_BELT:init()
-  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z+0.1,
-                        e1=1.57,e2=3.14,e3=3.14}
+  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y+PICK_UP_Y_OFFSET,z=PROD_POS_Z+0.1,
+                        e1=1.57,e2=3.14,e3=PICK_UP_E3}
 end
 
 function CLOSE_HOVER_BELT:init()
-  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z+0.05,
-                        e1=1.57,e2=3.14,e3=3.14}
+  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y+PICK_UP_Y_OFFSET,z=PROD_POS_Z+0.05,
+                        e1=1.57,e2=3.14,e3=PICK_UP_E3}
 
 end
 
 function BELT_GRAB_POS:init()
-  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z+0.02,
-                        e1=1.57,e2=3.14,e3=3.14}
+  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y+PICK_UP_Y_OFFSET,z=PROD_POS_Z+0.02,
+                        e1=1.57,e2=3.14,e3=PICK_UP_E3}
 end
 
 function RELAXED_BELT_GRAB_POS:init()
-  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z+0.05,
-                        e1=1.57,e2=3.14,e3=3.14}
+  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y+PICK_UP_Y_OFFSET,z=PROD_POS_Z+0.05,
+                        e1=1.57,e2=3.14,e3=PICK_UP_E3}
 end
 
 function GRAB_FROM_BELT:init()
@@ -203,22 +205,22 @@ function CHECK_GRAB:init()
 end
 
 function MOVE_UP_FROM_BELT:init()
-  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z+0.1,
-                        e1=1.57,e2=3.14,e3=3.14}
+  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y+PICK_UP_Y_OFFSET,z=PROD_POS_Z+0.2,
+                        e1=1.57,e2=3.14,e3=PICK_UP_E3}
 end
 
 function MOVE_TO_MIDDLE:init()
-  self.args["jaco"] = {x=-0.1, y=0.4, z=0.95,e1=1.57,e2=3.14,e3=3.14} 
+  self.args["jaco"] = {x=-0.1, y=0.4, z=0.95,e1=1.57,e2=3.14,e3=PICK_UP_E3}
 end
 
 function HOVER_GROUND:init()
   self.args["jaco"] = {x=DROP_POS_X, y=DROP_POS_Y, z=DROP_POS_Z+0.12,
-                       e1=1.57,e2=3.14,e3=3.14}
+                       e1=1.57,e2=3.14,e3=PICK_UP_E3}
 end
 
 function DROP_POS:init()
   self.args["jaco"] = {x=DROP_POS_X, y=DROP_POS_Y, z=DROP_POS_Z+0.02,
-                       e1=1.57,e2=3.14,e3=3.14}
+                       e1=1.57,e2=3.14,e3=PICK_UP_E3}
 end
 
 function DROP:init()
@@ -228,7 +230,7 @@ end
 
 function POST_DROP:init()
   self.args["jaco"] = {x=DROP_POS_X, y=DROP_POS_Y, z=DROP_POS_Z+0.12,
-                       e1=1.57,e2=3.14,e3=3.14}
+                       e1=1.57,e2=3.14,e3=PICK_UP_E3}
 end
 
 function PARK:init()
@@ -256,11 +258,11 @@ function RETRACT_MOVE_UP_FROM_MPS:init()
 end
 
 function RETRACT_MOVE_UP:init()
-  self.args["jaco"] = {x=-0.1, y=0.4, z=0.2,e1=1.57,e2=3.14,e3=3.14}
+  self.args["jaco"] = {x=-0.1, y=0.4, z=0.2,e1=1.57,e2=3.14,e3=PICK_UP_E3}
 end
 
 function RETRY_PARK_INTERMEDIATE:init()
-  self.args["jaco"] = {x=-0.1, y=0.4, z=0.4,e1=1.57,e2=3.14,e3=3.14}
+  self.args["jaco"] = {x=-0.1, y=0.4, z=0.4,e1=1.57,e2=3.14,e3=PICK_UP_E3}
 end
 
 function RETRY_PARK:init()

- *commit* 293102b8eaadef5c0b0976f8cad6ee364cdecfbd - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Wed Jun 15 13:08:05 2016 +0200
Subject: only close two fingers during the grab

 .../skills/generic/advanced/rcll_move_product.lua  |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/lua/skills/generic/advanced/rcll_move_product.lua b/src/lua/skills/generic/advanced/rcll_move_product.lua
index 4755495..1defbe8 100644
--- a/src/lua/skills/generic/advanced/rcll_move_product.lua
+++ b/src/lua/skills/generic/advanced/rcll_move_product.lua
@@ -187,7 +187,7 @@ function RELAXED_BELT_GRAB_POS:init()
 end
 
 function GRAB_FROM_BELT:init()
-  self.args["jaco"] = {gripper="close"}
+  self.args["jaco"] = {gripper={f1=60,f2=60,f3=20}}
 end
 
 function ATTACH_PROD:init()

- *commit* 095508f730b60c7c23270c67db2aeb1b76d1961d - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Wed Jun 15 18:31:56 2016 +0200
Subject: adapt to new arm position mounted on the left of the MPS

 res/openrave/rcll.machine.xml                      |    1 +
 res/openrave/rcll.robot.xml                        |    8 ++--
 .../skills/generic/advanced/rcll_move_product.lua  |   47 ++++++++++++--------
 3 files changed, 33 insertions(+), 23 deletions(-)

_Diff for modified files_:
diff --git a/res/openrave/rcll.machine.xml b/res/openrave/rcll.machine.xml
index 29f273c..6a5e21a 100644
--- a/res/openrave/rcll.machine.xml
+++ b/res/openrave/rcll.machine.xml
@@ -7,4 +7,5 @@
     
   </Body>
   <translation>0 0 0</translation>
+  <RotationAxis>0 0 1 90</RotationAxis>
 </KinBody> 
diff --git a/res/openrave/rcll.robot.xml b/res/openrave/rcll.robot.xml
index 2bc8b50..6a95fef 100644
--- a/res/openrave/rcll.robot.xml
+++ b/res/openrave/rcll.robot.xml
@@ -4,8 +4,8 @@
   <Robot prefix="arm_" file="jaco.kinbody.xml" name="jaco_arm">
     <!-- min: 0.53
          max: 0.63 -->
-    <Translation> 0 0 0.56</Translation>
-    <RotationAxis>0 0 1 270</RotationAxis>
+    <Translation> 0 0 0.59</Translation>
+    <RotationAxis>0 0 1 90</RotationAxis>
   </Robot>
 
 
@@ -22,9 +22,9 @@
   <KinBody name="body">
     <Body name="main_body" type="dynamic">
       <Geom type="box">
-        <Extents>0.2 0.1 0.28</Extents>
+        <Extents>0.2 0.1 0.20</Extents>
       </Geom>
-      <Translation>0 0 0.28</Translation>
+      <Translation>0 0 0.20</Translation>
     </Body>
     <!--
     <Body name="mount" type="dynamic">
diff --git a/src/lua/skills/generic/advanced/rcll_move_product.lua b/src/lua/skills/generic/advanced/rcll_move_product.lua
index 1defbe8..7c072f2 100644
--- a/src/lua/skills/generic/advanced/rcll_move_product.lua
+++ b/src/lua/skills/generic/advanced/rcll_move_product.lua
@@ -40,20 +40,21 @@ skillenv.skill_module(_M)
 
 -- Constants and variables
 --local TARGET_REACHED_DISTANCE = 0.8
-local PARK_X = 0.0
-local PARK_Y = 0.4
+local PARK_X = 0.2
+local PARK_Y = -0.1
 local PARK_Z = 1.0
 local PARK_E1 = 1.57
 local PARK_E2 = 3.14
-local PARK_E3 = 3.14
-local PROD_POS_X = 0.25
-local PROD_POS_Y = 0.20
-local PROD_POS_Z = 0.91
-local PICK_UP_E3 = 3.4
-local PICK_UP_Y_OFFSET = 0.02
-local DROP_POS_X = -0.1
-local DROP_POS_Y = 0.4
-local DROP_POS_Z = 0.3
+local PARK_E3 = 1.75
+local PROD_POS_X = 0.28
+local PROD_POS_Y = 0.15
+local PROD_POS_Z = 0.915
+local PICK_UP_E3 = 1.75
+local PICK_UP_X_OFFSET = -0.01
+local PICK_UP_Y_OFFSET = 0.00
+local DROP_POS_X = 0.2
+local DROP_POS_Y = -0.2
+local DROP_POS_Z = 0.1
 
 -- States
 fsm:define_states{ export_to=_M,
@@ -96,6 +97,8 @@ fsm:define_states{ export_to=_M,
   {"ATTACH_PROD", SkillJumpState, final_to="MOVE_UP_FROM_BELT",
     fail_to="RETRACT_OPEN_GRIPPER", skills={{or_object}}},
   {"MOVE_UP_FROM_BELT", SkillJumpState, final_to="MOVE_TO_MIDDLE",
+    fail_to="CLOSE_MOVE_UP_FROM_BELT", skills={{jaco}}},
+  {"CLOSE_MOVE_UP_FROM_BELT", SkillJumpState, final_to="MOVE_TO_MIDDLE",
     fail_to="FAILED", skills={{jaco}}},
   -- intermediate position which is above the drop position
   {"MOVE_TO_MIDDLE", SkillJumpState, final_to="HOVER_GROUND",
@@ -146,12 +149,13 @@ end
 function ADD_OBJS:init()
   self.args["or_object"] = {
     add={ {name="mps", path="rcll.machine.xml"},
-          {name="prod", path="rcll.prod.xml"}}}
+          {name="prod", path="rcll.prod.xml"}
+          }}
 end
 
 function MOVE_OBJS:init()
   self.args["or_object"] = {
-    move={{name="mps", x=0.55, y=0.6, z=0},
+    move={{name="mps", x=-0.10, y=0.47, z=0},
           {name="prod", x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z}
           }}
 end
@@ -166,23 +170,23 @@ function OPEN_GRIPPER:init()
 end
 
 function HOVER_BELT:init()
-  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y+PICK_UP_Y_OFFSET,z=PROD_POS_Z+0.1,
+  self.args["jaco"] = {x=PROD_POS_X+PICK_UP_X_OFFSET,y=PROD_POS_Y+PICK_UP_Y_OFFSET,z=PROD_POS_Z+0.1,
                         e1=1.57,e2=3.14,e3=PICK_UP_E3}
 end
 
 function CLOSE_HOVER_BELT:init()
-  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y+PICK_UP_Y_OFFSET,z=PROD_POS_Z+0.05,
+  self.args["jaco"] = {x=PROD_POS_X+PICK_UP_X_OFFSET,y=PROD_POS_Y+PICK_UP_Y_OFFSET,z=PROD_POS_Z+0.05,
                         e1=1.57,e2=3.14,e3=PICK_UP_E3}
 
 end
 
 function BELT_GRAB_POS:init()
-  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y+PICK_UP_Y_OFFSET,z=PROD_POS_Z+0.02,
+  self.args["jaco"] = {x=PROD_POS_X+PICK_UP_X_OFFSET,y=PROD_POS_Y+PICK_UP_Y_OFFSET,z=PROD_POS_Z+0.02,
                         e1=1.57,e2=3.14,e3=PICK_UP_E3}
 end
 
 function RELAXED_BELT_GRAB_POS:init()
-  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y+PICK_UP_Y_OFFSET,z=PROD_POS_Z+0.05,
+  self.args["jaco"] = {x=PROD_POS_X+PICK_UP_X_OFFSET,y=PROD_POS_Y+PICK_UP_Y_OFFSET,z=PROD_POS_Z+0.05,
                         e1=1.57,e2=3.14,e3=PICK_UP_E3}
 end
 
@@ -205,12 +209,17 @@ function CHECK_GRAB:init()
 end
 
 function MOVE_UP_FROM_BELT:init()
-  self.args["jaco"] = {x=PROD_POS_X,y=PROD_POS_Y+PICK_UP_Y_OFFSET,z=PROD_POS_Z+0.2,
+  self.args["jaco"] = {x=PROD_POS_X+PICK_UP_X_OFFSET,y=PROD_POS_Y+PICK_UP_Y_OFFSET,z=PROD_POS_Z+0.1,
+                        e1=1.57,e2=3.14,e3=PICK_UP_E3}
+end
+
+function MOVE_UP_FROM_BELT:init()
+  self.args["jaco"] = {x=PROD_POS_X+PICK_UP_X_OFFSET,y=PROD_POS_Y+PICK_UP_Y_OFFSET,z=PROD_POS_Z+0.05,
                         e1=1.57,e2=3.14,e3=PICK_UP_E3}
 end
 
 function MOVE_TO_MIDDLE:init()
-  self.args["jaco"] = {x=-0.1, y=0.4, z=0.95,e1=1.57,e2=3.14,e3=PICK_UP_E3}
+  self.args["jaco"] = {x=PARK_X, y=PARK_Y, z=PARK_Z,e1=1.57,e2=3.14,e3=PICK_UP_E3}
 end
 
 function HOVER_GROUND:init()

- *commit* ce751a17b138ca370d61cf2936b9c466d02476a2 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Wed Jun 15 18:46:52 2016 +0200
Subject: add separators to limit the movement of the arm

 .../skills/generic/advanced/rcll_move_product.lua  |   23 ++++++++++++++++---
 1 files changed, 19 insertions(+), 4 deletions(-)

_Diff for modified files_:
diff --git a/src/lua/skills/generic/advanced/rcll_move_product.lua b/src/lua/skills/generic/advanced/rcll_move_product.lua
index 7c072f2..f33ecaa 100644
--- a/src/lua/skills/generic/advanced/rcll_move_product.lua
+++ b/src/lua/skills/generic/advanced/rcll_move_product.lua
@@ -61,8 +61,10 @@ fsm:define_states{ export_to=_M,
 
   {"START", SkillJumpState, final_to="ADD_OBJS", fail_to="FAILED",
     skills={{or_object}}},
-  -- add MPS and the product object
-  {"ADD_OBJS", SkillJumpState, final_to="MOVE_OBJS", fail_to="FAILED",
+  -- add MPS, the product object, and separators
+  {"ADD_OBJS", SkillJumpState, final_to="ROTATE_OBJS", fail_to="FAILED",
+    skills={{or_object}}},
+  {"ROTATE_OBJS", SkillJumpState, final_to="MOVE_OBJS", fail_to="FAILED",
     skills={{or_object}}},
   -- stack the product on top of the MPS belt
   {"MOVE_OBJS", SkillJumpState, final_to="INIT_PARK", fail_to="FAILED",
@@ -149,14 +151,27 @@ end
 function ADD_OBJS:init()
   self.args["or_object"] = {
     add={ {name="mps", path="rcll.machine.xml"},
-          {name="prod", path="rcll.prod.xml"}
+          {name="prod", path="rcll.prod.xml"},
+          {name="separator1", path="separator.kinbody.xml"},
+          {name="separator2", path="separator.kinbody.xml"},
+          {name="separator3", path="separator.kinbody.xml"}
           }}
 end
 
+function ROTATE_OBJS:init()
+  self.args["or_object"] = {
+    rotate={--{name="separator1",x=0,y=0,z=1.57}
+            {name="separator2",x=0,y=0,z=1.57}
+           }}
+end
+
 function MOVE_OBJS:init()
   self.args["or_object"] = {
     move={{name="mps", x=-0.10, y=0.47, z=0},
-          {name="prod", x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z}
+          {name="prod", x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z},
+          {name="separator1",x=0.0,y=-0.4,z=0.3},
+          {name="separator2",x=-0.2,y=0,z=0.3},
+          {name="separator3",x=0,y=0.5,z=0.3}
           }}
 end
 

- *commit* 6b1c0e1797e3ffdfed39e04e692d998e91741e5c - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Wed Jun 15 19:02:14 2016 +0200
Subject: add a box at the drop location

 .../skills/generic/advanced/rcll_move_product.lua  |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

_Diff for modified files_:
diff --git a/src/lua/skills/generic/advanced/rcll_move_product.lua b/src/lua/skills/generic/advanced/rcll_move_product.lua
index f33ecaa..7e5962d 100644
--- a/src/lua/skills/generic/advanced/rcll_move_product.lua
+++ b/src/lua/skills/generic/advanced/rcll_move_product.lua
@@ -54,7 +54,7 @@ local PICK_UP_X_OFFSET = -0.01
 local PICK_UP_Y_OFFSET = 0.00
 local DROP_POS_X = 0.2
 local DROP_POS_Y = -0.2
-local DROP_POS_Z = 0.1
+local DROP_POS_Z = 0.11
 
 -- States
 fsm:define_states{ export_to=_M,
@@ -154,7 +154,8 @@ function ADD_OBJS:init()
           {name="prod", path="rcll.prod.xml"},
           {name="separator1", path="separator.kinbody.xml"},
           {name="separator2", path="separator.kinbody.xml"},
-          {name="separator3", path="separator.kinbody.xml"}
+          {name="separator3", path="separator.kinbody.xml"},
+          {name="dropbox", path="dropbox.kinbody.xml"}
           }}
 end
 
@@ -171,7 +172,8 @@ function MOVE_OBJS:init()
           {name="prod", x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z},
           {name="separator1",x=0.0,y=-0.4,z=0.3},
           {name="separator2",x=-0.2,y=0,z=0.3},
-          {name="separator3",x=0,y=0.5,z=0.3}
+          {name="separator3",x=0,y=0.5,z=0.3},
+          {name="dropbox", x=0.2,y=-0.2,z=0}
           }}
 end
 

- *commit* 46fc7a808dc998e0504fb824e850f98dead40402 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Thu Jun 23 17:52:20 2016 +0200
Subject: add model for a simple box where the product is placed

 .../{plate.kinbody.xml => dropbox.kinbody.xml}     |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


- *commit* b253385c7b7849b9a0d8a4c68e37f82eb591cf5f - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Tue Jun 28 18:17:17 2016 +0200
Subject: rcll crossover: adapt base of the robot so the arm isn't flying

 res/openrave/rcll.robot.xml |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

_Diff for modified files_:
diff --git a/res/openrave/rcll.robot.xml b/res/openrave/rcll.robot.xml
index 6a95fef..db61c25 100644
--- a/res/openrave/rcll.robot.xml
+++ b/res/openrave/rcll.robot.xml
@@ -22,9 +22,9 @@
   <KinBody name="body">
     <Body name="main_body" type="dynamic">
       <Geom type="box">
-        <Extents>0.2 0.1 0.20</Extents>
+        <Extents>0.2 0.1 0.295</Extents>
       </Geom>
-      <Translation>0 0 0.20</Translation>
+      <Translation>0 0 0.295</Translation>
     </Body>
     <!--
     <Body name="mount" type="dynamic">

- *commit* 4d0240e53767da0f6f2da2ded4e226f69b7484c8 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Tue Jun 28 18:17:56 2016 +0200
Subject: skill rcll_move_product: give the arm more room

 .../skills/generic/advanced/rcll_move_product.lua  |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/lua/skills/generic/advanced/rcll_move_product.lua b/src/lua/skills/generic/advanced/rcll_move_product.lua
index 7e5962d..e8c39d3 100644
--- a/src/lua/skills/generic/advanced/rcll_move_product.lua
+++ b/src/lua/skills/generic/advanced/rcll_move_product.lua
@@ -171,7 +171,7 @@ function MOVE_OBJS:init()
     move={{name="mps", x=-0.10, y=0.47, z=0},
           {name="prod", x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z},
           {name="separator1",x=0.0,y=-0.4,z=0.3},
-          {name="separator2",x=-0.2,y=0,z=0.3},
+          {name="separator2",x=-0.3,y=0,z=0.3},
           {name="separator3",x=0,y=0.5,z=0.3},
           {name="dropbox", x=0.2,y=-0.2,z=0}
           }}

- *commit* 20bb4a24a922dbfc5a48f9146e2066ceb052d337 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Mon Jun 27 18:26:13 2016 +0200
Subject: product-exchange: add plugin skeleton

 .../{ttmainloop => product_exchange}/Makefile      |   20 ++++----
 .../product_exchange_plugin.cpp}                   |   28 ++++++-----
 .../product_exchange_thread.cpp}                   |   49 +++++++++++--------
 .../product_exchange_thread.h}                     |   34 ++++++++-----
 4 files changed, 75 insertions(+), 56 deletions(-)


- *commit* 8472fc007e999b375f7e215aac33fb268e805ac3 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Tue Jun 28 11:37:26 2016 +0200
Subject: product-exchange: read protobuf msg and print out a message

 src/plugins/product_exchange/Makefile              |    9 ++-
 .../{gazebo => product_exchange}/msgs/Makefile     |   11 ++--
 .../product_exchange/msgs/OrderInfo.proto}         |   77 +++++++++++++-------
 .../product_exchange/product_exchange_thread.cpp   |   34 ++++++++-
 .../product_exchange/product_exchange_thread.h     |   11 ++-
 5 files changed, 102 insertions(+), 40 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/product_exchange/Makefile b/src/plugins/product_exchange/Makefile
index 7a2c319..40b6ff4 100644
--- a/src/plugins/product_exchange/Makefile
+++ b/src/plugins/product_exchange/Makefile
@@ -17,8 +17,12 @@
 BASEDIR = ../../..
 include $(BASEDIR)/etc/buildsys/config.mk
 
+CFLAGS += $(CFLAGS_CPP11)
+PRESUBDIRS = msgs
+
 LIBS_product_exchange = m fawkescore fawkesutils fawkesaspects fawkesbaseapp \
-                      fawkesblackboard fawkesinterface
+                      fawkesblackboard fawkesinterface \
+                      fawkes_protobuf_comm crossover_msgs
 
 OBJS_product_exchange = product_exchange_plugin.o product_exchange_thread.o
 
@@ -26,4 +30,5 @@ PLUGINS_all = $(PLUGINDIR)/product_exchange.$(SOEXT)
 
 OBJS_all = $(OBJS_product_exchange)
 
-include $(BUILDSYSDIR)/base.mk
\ No newline at end of file
+include $(BUILDSYSDIR)/protobuf.mk
+include $(BUILDSYSDIR)/base.mk
diff --git a/src/plugins/product_exchange/product_exchange_thread.cpp b/src/plugins/product_exchange/product_exchange_thread.cpp
index 1391d1a..daaef0c 100644
--- a/src/plugins/product_exchange/product_exchange_thread.cpp
+++ b/src/plugins/product_exchange/product_exchange_thread.cpp
@@ -22,8 +22,11 @@
  */
 
 #include "product_exchange_thread.h"
+#include "msgs/OrderInfo.pb.h"
 
+using namespace std;
 using namespace fawkes;
+using namespace protobuf_comm;
 
 /** @class ProductExchangeThread 'product_exchange_thread.h' 
  * Exchange products between RCLL and @work
@@ -31,14 +34,23 @@ using namespace fawkes;
  */
 
 ProductExchangeThread::ProductExchangeThread()
- : Thread("ProductExchangeThread", Thread::OPMODE_WAITFORWAKEUP),
-             BlockedTimingAspect(BlockedTimingAspect::WAKEUP_HOOK_SKILL) 
+ : Thread("ProductExchangeThread", Thread::OPMODE_WAITFORWAKEUP)
 {
 }
 
 void
 ProductExchangeThread::init()
 {
+  client_ = new ProtobufStreamClient();
+  MessageRegister & pcmr = client_->message_register();
+  pcmr.add_message_type<crossover_msgs::Exchange>();
+  client_->signal_received().connect(boost::bind(
+        &ProductExchangeThread::handle_message, this, _1, _2, _3));
+  client_->signal_connected().connect(boost::bind(
+        &ProductExchangeThread::handle_connected, this));
+  client_->signal_disconnected().connect(boost::bind(
+        &ProductExchangeThread::handle_disconnected, this));
+  client_->async_connect("localhost", 4444);
 }
 
 void
@@ -49,5 +61,23 @@ ProductExchangeThread::loop()
 void
 ProductExchangeThread::finalize()
 {
+  logger->log_debug(name(), "Finalizing");
+  delete client_;
 }
 
+void
+ProductExchangeThread::handle_message(uint16_t component_id, uint16_t msg_type,
+  shared_ptr<google::protobuf::Message> msg)
+{
+  logger->log_debug(name(), "Received a message!");
+}
+void
+ProductExchangeThread::handle_connected()
+{
+  logger->log_debug(name(), "Connected!");
+}
+void
+ProductExchangeThread::handle_disconnected()
+{
+  logger->log_debug(name(), "Disconnected!");
+}
diff --git a/src/plugins/product_exchange/product_exchange_thread.h b/src/plugins/product_exchange/product_exchange_thread.h
index d3403e4..ccb35d7 100644
--- a/src/plugins/product_exchange/product_exchange_thread.h
+++ b/src/plugins/product_exchange/product_exchange_thread.h
@@ -29,6 +29,7 @@
 #include <aspect/logging.h>
 #include <aspect/blackboard.h>
 #include <aspect/configurable.h>
+#include <protobuf_comm/client.h>
 
 #include <string>
 
@@ -37,7 +38,6 @@ namespace fawkes {
 
 class ProductExchangeThread 
 : public fawkes::Thread,
-  public fawkes::BlockedTimingAspect,
   public fawkes::LoggingAspect,
   public fawkes::ConfigurableAspect,
   public fawkes::BlackBoardAspect
@@ -54,9 +54,14 @@ class ProductExchangeThread
   protected: virtual void run() { Thread::run(); }
 
  private:
-  //Define class member variables here
+  void handle_message(uint16_t component_id, uint16_t msg_type,
+    std::shared_ptr<google::protobuf::Message> msg);
+  void handle_connected();
+  void handle_disconnected();
+
+  protobuf_comm::ProtobufStreamClient *client_;
 
 };
 
 
-#endif
\ No newline at end of file
+#endif

- *commit* 87a1dd4ad43b6879c035d2fc6c2f96c07fe09df3 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Tue Jun 28 13:11:45 2016 +0200
Subject: product-exchange: process requests in loop() by starting the resp skill

 src/plugins/product_exchange/Makefile              |    1 +
 .../product_exchange/product_exchange_thread.cpp   |   55 +++++++++++++++++++-
 .../product_exchange/product_exchange_thread.h     |   10 +++-
 3 files changed, 62 insertions(+), 4 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/product_exchange/Makefile b/src/plugins/product_exchange/Makefile
index 40b6ff4..548ae68 100644
--- a/src/plugins/product_exchange/Makefile
+++ b/src/plugins/product_exchange/Makefile
@@ -22,6 +22,7 @@ PRESUBDIRS = msgs
 
 LIBS_product_exchange = m fawkescore fawkesutils fawkesaspects fawkesbaseapp \
                       fawkesblackboard fawkesinterface \
+                      SkillerInterface \
                       fawkes_protobuf_comm crossover_msgs
 
 OBJS_product_exchange = product_exchange_plugin.o product_exchange_thread.o
diff --git a/src/plugins/product_exchange/product_exchange_thread.cpp b/src/plugins/product_exchange/product_exchange_thread.cpp
index daaef0c..f7b9aca 100644
--- a/src/plugins/product_exchange/product_exchange_thread.cpp
+++ b/src/plugins/product_exchange/product_exchange_thread.cpp
@@ -24,23 +24,31 @@
 #include "product_exchange_thread.h"
 #include "msgs/OrderInfo.pb.h"
 
+#include <interfaces/SkillerInterface.h>
+
 using namespace std;
 using namespace fawkes;
 using namespace protobuf_comm;
 
-/** @class ProductExchangeThread 'product_exchange_thread.h' 
+class ProductExchangeThread::ExchangeRequest
+{
+};
+
+/** @class ProductExchangeThread 'product_exchange_thread.h'
  * Exchange products between RCLL and @work
  * @author Till Hofmann
  */
 
 ProductExchangeThread::ProductExchangeThread()
- : Thread("ProductExchangeThread", Thread::OPMODE_WAITFORWAKEUP)
+ : Thread("ProductExchangeThread", Thread::OPMODE_WAITFORWAKEUP),
+   BlockedTimingAspect(BlockedTimingAspect::WAKEUP_HOOK_THINK)
 {
 }
 
 void
 ProductExchangeThread::init()
 {
+  // initialize protobuf client
   client_ = new ProtobufStreamClient();
   MessageRegister & pcmr = client_->message_register();
   pcmr.add_message_type<crossover_msgs::Exchange>();
@@ -51,11 +59,35 @@ ProductExchangeThread::init()
   client_->signal_disconnected().connect(boost::bind(
         &ProductExchangeThread::handle_disconnected, this));
   client_->async_connect("localhost", 4444);
+
+  // initialize Skiller interface
+  skiller_if_ = blackboard->open_for_reading<SkillerInterface>("Skiller");
+  if (!skiller_if_->has_writer()) {
+    blackboard->close(skiller_if_);
+    throw Exception("Skiller has no writer, aborting");
+  }
+  skiller_if_->msgq_enqueue(new SkillerInterface::AcquireControlMessage());
 }
 
 void
 ProductExchangeThread::loop()
 {
+  if (skiller_if_->status() == SkillerInterface::S_RUNNING) {
+    // skill running, wait until it's finished
+    return;
+  }
+  // handle one request
+  request_queue_.lock();
+  if (!request_queue_.empty()) {
+    logger->log_debug(name(), "Request in queue, starting to process");
+    ExchangeRequest request = request_queue_.front();
+    request_queue_.pop();
+    request_queue_.unlock();
+    process_request(request);
+    logger->log_debug(name(), "Request processed");
+  } else {
+    request_queue_.unlock();
+  }
 }
 
 void
@@ -63,6 +95,11 @@ ProductExchangeThread::finalize()
 {
   logger->log_debug(name(), "Finalizing");
   delete client_;
+  if (skiller_if_->has_writer()
+      && skiller_if_->exclusive_controller() == skiller_if_->serial()) {
+    skiller_if_->msgq_enqueue(new SkillerInterface::ReleaseControlMessage());
+  }
+  blackboard->close(skiller_if_);
 }
 
 void
@@ -70,6 +107,8 @@ ProductExchangeThread::handle_message(uint16_t component_id, uint16_t msg_type,
   shared_ptr<google::protobuf::Message> msg)
 {
   logger->log_debug(name(), "Received a message!");
+  request_queue_.push_locked(ExchangeRequest());
+  logger->log_debug(name(), "Pushed request to queue");
 }
 void
 ProductExchangeThread::handle_connected()
@@ -81,3 +120,15 @@ ProductExchangeThread::handle_disconnected()
 {
   logger->log_debug(name(), "Disconnected!");
 }
+
+void
+ProductExchangeThread::report_failure()
+{
+}
+
+void
+ProductExchangeThread::process_request(ExchangeRequest request)
+{
+  skiller_if_->msgq_enqueue(
+      new SkillerInterface::ExecSkillMessage("rcll_move_product()"));
+}
diff --git a/src/plugins/product_exchange/product_exchange_thread.h b/src/plugins/product_exchange/product_exchange_thread.h
index ccb35d7..c292388 100644
--- a/src/plugins/product_exchange/product_exchange_thread.h
+++ b/src/plugins/product_exchange/product_exchange_thread.h
@@ -25,19 +25,20 @@
 #define __PLUGINS_PRODUCT_EXCHANGETHREAD_H_
 
 #include <core/threading/thread.h>
+#include <core/utils/lock_queue.h>
 #include <aspect/blocked_timing.h>
 #include <aspect/logging.h>
 #include <aspect/blackboard.h>
 #include <aspect/configurable.h>
 #include <protobuf_comm/client.h>
 
-#include <string>
-
 namespace fawkes {
+  class SkillerInterface;
 }
 
 class ProductExchangeThread 
 : public fawkes::Thread,
+  public fawkes::BlockedTimingAspect,
   public fawkes::LoggingAspect,
   public fawkes::ConfigurableAspect,
   public fawkes::BlackBoardAspect
@@ -54,12 +55,17 @@ class ProductExchangeThread
   protected: virtual void run() { Thread::run(); }
 
  private:
+  class ExchangeRequest;
   void handle_message(uint16_t component_id, uint16_t msg_type,
     std::shared_ptr<google::protobuf::Message> msg);
   void handle_connected();
   void handle_disconnected();
+  void report_failure();
+  void process_request(ExchangeRequest request);
 
   protobuf_comm::ProtobufStreamClient *client_;
+  fawkes::SkillerInterface            *skiller_if_;
+  fawkes::LockQueue<ExchangeRequest>  request_queue_;
 
 };
 

- *commit* 4f53c8b1cce0da7202d9a85bf6e3a8aa0ab325ad - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Tue Jun 28 14:19:15 2016 +0200
Subject: product-exchange: check the result of the skiller

 .../product_exchange/product_exchange_thread.cpp   |   52 +++++++++++++++++--
 .../product_exchange/product_exchange_thread.h     |   14 +++--
 2 files changed, 55 insertions(+), 11 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/product_exchange/product_exchange_thread.cpp b/src/plugins/product_exchange/product_exchange_thread.cpp
index f7b9aca..6729f3c 100644
--- a/src/plugins/product_exchange/product_exchange_thread.cpp
+++ b/src/plugins/product_exchange/product_exchange_thread.cpp
@@ -32,6 +32,12 @@ using namespace protobuf_comm;
 
 class ProductExchangeThread::ExchangeRequest
 {
+ public:
+  ExchangeRequest() {
+    msg_id = 0;
+  }
+
+  uint32_t msg_id;
 };
 
 /** @class ProductExchangeThread 'product_exchange_thread.h'
@@ -48,6 +54,7 @@ ProductExchangeThread::ProductExchangeThread()
 void
 ProductExchangeThread::init()
 {
+  processing_request_ = false;
   // initialize protobuf client
   client_ = new ProtobufStreamClient();
   MessageRegister & pcmr = client_->message_register();
@@ -72,15 +79,36 @@ ProductExchangeThread::init()
 void
 ProductExchangeThread::loop()
 {
+  skiller_if_->read();
   if (skiller_if_->status() == SkillerInterface::S_RUNNING) {
     // skill running, wait until it's finished
     return;
   }
+  if (processing_request_) {
+    logger->log_debug(name(), "Message ID of current request is %u",
+        current_request_->msg_id);
+    if (skiller_if_->msgid() == current_request_->msg_id) {
+      processing_request_ = false;
+      logger->log_debug(name(),
+          "Execution of message %u finished!", current_request_->msg_id);
+    if (skiller_if_->status() == SkillerInterface::S_FINAL) {
+      report_success(current_request_);
+    } else {
+      report_failure(current_request_);
+    }
+    } else if (skiller_if_->msgid() == 0) {
+      // no skill executed yet, ignore
+    } else {
+      logger->log_warn(name(),
+          "Unexpected Skiller message ID: %u, waiting for %u",
+          skiller_if_->msgid(), current_request_->msg_id);
+    }
+  }
   // handle one request
   request_queue_.lock();
   if (!request_queue_.empty()) {
     logger->log_debug(name(), "Request in queue, starting to process");
-    ExchangeRequest request = request_queue_.front();
+    RefPtr<ExchangeRequest> request = request_queue_.front();
     request_queue_.pop();
     request_queue_.unlock();
     process_request(request);
@@ -107,7 +135,7 @@ ProductExchangeThread::handle_message(uint16_t component_id, uint16_t msg_type,
   shared_ptr<google::protobuf::Message> msg)
 {
   logger->log_debug(name(), "Received a message!");
-  request_queue_.push_locked(ExchangeRequest());
+  request_queue_.push_locked(RefPtr<ExchangeRequest>(new ExchangeRequest()));
   logger->log_debug(name(), "Pushed request to queue");
 }
 void
@@ -122,13 +150,25 @@ ProductExchangeThread::handle_disconnected()
 }
 
 void
-ProductExchangeThread::report_failure()
+ProductExchangeThread::report_success(RefPtr<ExchangeRequest> request)
+{
+  logger->log_info(name(), "Execution of request %u was successful!",
+      request->msg_id);
+}
+
+void
+ProductExchangeThread::report_failure(RefPtr<ExchangeRequest> request)
 {
+  logger->log_warn(name(), "Execution of request %u failed!", request->msg_id);
 }
 
 void
-ProductExchangeThread::process_request(ExchangeRequest request)
+ProductExchangeThread::process_request(RefPtr<ExchangeRequest> request)
 {
-  skiller_if_->msgq_enqueue(
-      new SkillerInterface::ExecSkillMessage("rcll_move_product()"));
+  SkillerInterface::ExecSkillMessage *msg =
+    new SkillerInterface::ExecSkillMessage("rcll_move_product()");
+  current_request_ = request;
+  processing_request_ = true;
+  skiller_if_->msgq_enqueue(msg);
+  request->msg_id = msg->id();
 }
diff --git a/src/plugins/product_exchange/product_exchange_thread.h b/src/plugins/product_exchange/product_exchange_thread.h
index c292388..604fe78 100644
--- a/src/plugins/product_exchange/product_exchange_thread.h
+++ b/src/plugins/product_exchange/product_exchange_thread.h
@@ -26,6 +26,7 @@
 
 #include <core/threading/thread.h>
 #include <core/utils/lock_queue.h>
+#include <core/utils/refptr.h>
 #include <aspect/blocked_timing.h>
 #include <aspect/logging.h>
 #include <aspect/blackboard.h>
@@ -60,12 +61,15 @@ class ProductExchangeThread
     std::shared_ptr<google::protobuf::Message> msg);
   void handle_connected();
   void handle_disconnected();
-  void report_failure();
-  void process_request(ExchangeRequest request);
+  void report_success(fawkes::RefPtr<ExchangeRequest> request);
+  void report_failure(fawkes::RefPtr<ExchangeRequest> request);
+  void process_request(fawkes::RefPtr<ExchangeRequest> request);
 
-  protobuf_comm::ProtobufStreamClient *client_;
-  fawkes::SkillerInterface            *skiller_if_;
-  fawkes::LockQueue<ExchangeRequest>  request_queue_;
+  protobuf_comm::ProtobufStreamClient                 *client_;
+  fawkes::SkillerInterface                            *skiller_if_;
+  fawkes::LockQueue<fawkes::RefPtr<ExchangeRequest> > request_queue_;
+  fawkes::RefPtr<ExchangeRequest>                     current_request_;
+  bool                                                processing_request_;
 
 };
 

- *commit* f3af838890ff56a865e22b45d52a460a84076182 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Tue Jun 28 15:07:39 2016 +0200
Subject: product-exchange: send a protobuf message after execution

 .../product_exchange/product_exchange_thread.cpp   |   43 +++++++++++++------
 1 files changed, 29 insertions(+), 14 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/product_exchange/product_exchange_thread.cpp b/src/plugins/product_exchange/product_exchange_thread.cpp
index 6729f3c..b4a6e71 100644
--- a/src/plugins/product_exchange/product_exchange_thread.cpp
+++ b/src/plugins/product_exchange/product_exchange_thread.cpp
@@ -33,11 +33,14 @@ using namespace protobuf_comm;
 class ProductExchangeThread::ExchangeRequest
 {
  public:
-  ExchangeRequest() {
-    msg_id = 0;
+  ExchangeRequest(shared_ptr<crossover_msgs::Exchange> protobuf_msg)
+  : skiller_msg_id(0),
+    protobuf_msg(protobuf_msg)
+  {
   }
 
-  uint32_t msg_id;
+  uint32_t skiller_msg_id;
+  shared_ptr<crossover_msgs::Exchange> protobuf_msg;
 };
 
 /** @class ProductExchangeThread 'product_exchange_thread.h'
@@ -86,11 +89,11 @@ ProductExchangeThread::loop()
   }
   if (processing_request_) {
     logger->log_debug(name(), "Message ID of current request is %u",
-        current_request_->msg_id);
-    if (skiller_if_->msgid() == current_request_->msg_id) {
+        current_request_->skiller_msg_id);
+    if (skiller_if_->msgid() == current_request_->skiller_msg_id) {
       processing_request_ = false;
-      logger->log_debug(name(),
-          "Execution of message %u finished!", current_request_->msg_id);
+      logger->log_debug(name(), "Execution of message %u finished!",
+          current_request_->skiller_msg_id);
     if (skiller_if_->status() == SkillerInterface::S_FINAL) {
       report_success(current_request_);
     } else {
@@ -101,7 +104,7 @@ ProductExchangeThread::loop()
     } else {
       logger->log_warn(name(),
           "Unexpected Skiller message ID: %u, waiting for %u",
-          skiller_if_->msgid(), current_request_->msg_id);
+          skiller_if_->msgid(), current_request_->skiller_msg_id);
     }
   }
   // handle one request
@@ -134,9 +137,14 @@ void
 ProductExchangeThread::handle_message(uint16_t component_id, uint16_t msg_type,
   shared_ptr<google::protobuf::Message> msg)
 {
-  logger->log_debug(name(), "Received a message!");
-  request_queue_.push_locked(RefPtr<ExchangeRequest>(new ExchangeRequest()));
-  logger->log_debug(name(), "Pushed request to queue");
+  shared_ptr<crossover_msgs::Exchange> exchange;
+  if (exchange = dynamic_pointer_cast<crossover_msgs::Exchange>(msg)) {
+      logger->log_debug(name(), "Received a message with ID %u!",
+          exchange->id());
+      request_queue_.push_locked(
+          RefPtr<ExchangeRequest>(new ExchangeRequest(exchange)));
+      logger->log_debug(name(), "Pushed request to queue");
+  }
 }
 void
 ProductExchangeThread::handle_connected()
@@ -153,13 +161,20 @@ void
 ProductExchangeThread::report_success(RefPtr<ExchangeRequest> request)
 {
   logger->log_info(name(), "Execution of request %u was successful!",
-      request->msg_id);
+      request->skiller_msg_id);
+  crossover_msgs::Exchange exchange_msg = *(request->protobuf_msg);
+  exchange_msg.set_completed(true);
+  client_->send(exchange_msg);
 }
 
 void
 ProductExchangeThread::report_failure(RefPtr<ExchangeRequest> request)
 {
-  logger->log_warn(name(), "Execution of request %u failed!", request->msg_id);
+  logger->log_warn(name(), "Execution of request %u failed!",
+      request->skiller_msg_id);
+  crossover_msgs::Exchange exchange_msg = *(request->protobuf_msg);
+  exchange_msg.set_completed(false);
+  client_->send(exchange_msg);
 }
 
 void
@@ -170,5 +185,5 @@ ProductExchangeThread::process_request(RefPtr<ExchangeRequest> request)
   current_request_ = request;
   processing_request_ = true;
   skiller_if_->msgq_enqueue(msg);
-  request->msg_id = msg->id();
+  request->skiller_msg_id = msg->id();
 }

- *commit* 4d5c4da7ef7c8de7df9c2b88081873d9d572ac86 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Tue Jun 28 17:03:45 2016 +0200
Subject: product-exchange: add optional field success to protobuf message

 src/plugins/product_exchange/msgs/OrderInfo.proto  |    4 ++++
 .../product_exchange/product_exchange_thread.cpp   |    4 +++-
 2 files changed, 7 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/product_exchange/msgs/OrderInfo.proto b/src/plugins/product_exchange/msgs/OrderInfo.proto
index c0433f3..e80a456 100644
--- a/src/plugins/product_exchange/msgs/OrderInfo.proto
+++ b/src/plugins/product_exchange/msgs/OrderInfo.proto
@@ -87,5 +87,9 @@ message Exchange {
   required Place place_from = 2;
   required Place place_to   = 3;
   
+  // True iff the exchange request has been completed.
+  // This doesn't mean it was successful.
   required bool completed   = 4;
+  // True iff the exchange was successful.
+  optional bool success     = 5;
 }
diff --git a/src/plugins/product_exchange/product_exchange_thread.cpp b/src/plugins/product_exchange/product_exchange_thread.cpp
index b4a6e71..1f05ad9 100644
--- a/src/plugins/product_exchange/product_exchange_thread.cpp
+++ b/src/plugins/product_exchange/product_exchange_thread.cpp
@@ -164,6 +164,7 @@ ProductExchangeThread::report_success(RefPtr<ExchangeRequest> request)
       request->skiller_msg_id);
   crossover_msgs::Exchange exchange_msg = *(request->protobuf_msg);
   exchange_msg.set_completed(true);
+  exchange_msg.set_success(true);
   client_->send(exchange_msg);
 }
 
@@ -173,7 +174,8 @@ ProductExchangeThread::report_failure(RefPtr<ExchangeRequest> request)
   logger->log_warn(name(), "Execution of request %u failed!",
       request->skiller_msg_id);
   crossover_msgs::Exchange exchange_msg = *(request->protobuf_msg);
-  exchange_msg.set_completed(false);
+  exchange_msg.set_completed(true);
+  exchange_msg.set_success(false);
   client_->send(exchange_msg);
 }
 

- *commit* 3935d29cc684b405d421cc7c225545333816853d - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Tue Jun 28 18:14:41 2016 +0200
Subject: cfg: fix typo in gazebo config

 cfg/conf.d/gazsim.yaml |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/cfg/conf.d/gazsim.yaml b/cfg/conf.d/gazsim.yaml
index 350c5f6..e31ac87 100644
--- a/cfg/conf.d/gazsim.yaml
+++ b/cfg/conf.d/gazsim.yaml
@@ -23,7 +23,7 @@ gazsim:
   laser:
     max_range: 5.5 
     interface-id: "Laser urg"
-    frame-id: !frame base_laser"
+    frame-id: !frame "base_laser"
 
   webcam:
     # list of ids for all cameras to simulate

- *commit* 3ec8ed555ef620f58fb7e518c6e881993c1ddeb6 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Tue Jun 28 18:15:06 2016 +0200
Subject: cfg: adapt config to rcll crossover challenge

 cfg/conf.d/jaco.yaml                               |    6 +-
 cfg/conf.d/skiller.yaml                            |   41 +++----------------
 .../rcll_crossover/init.lua}                       |   19 +++++----
 3 files changed, 21 insertions(+), 45 deletions(-)

_Diff for modified files_:
diff --git a/cfg/conf.d/jaco.yaml b/cfg/conf.d/jaco.yaml
index fe0fa98..6950ba1 100644
--- a/cfg/conf.d/jaco.yaml
+++ b/cfg/conf.d/jaco.yaml
@@ -30,7 +30,7 @@ hardware/jaco:
 
     single:
       # Name of JacoArm.
-      name: Jaco 1
+      name: Jaco 2
 
       # JacoInterface ID string for left arm
       interface: JacoArm
@@ -52,7 +52,7 @@ hardware/jaco:
 
   openrave:
     # Use OpenRAVE qtcoin viewer (i.e. see 3D robot model)?
-    use_viewer: false
+    use_viewer: true
 
     # Automatically generate IK database for OpenRAVE robot model?
     auto_load_ik: true
@@ -61,7 +61,7 @@ hardware/jaco:
     sampling: 0.04
 
     # robot/xml file to be loaded into OpenRAVE
-    robot_file: ../res/openrave/jaco.robot.xml
+    robot_file: ../res/openrave/rcll.robot.xml
 
     # robot/xml file for dual-arm setup
     robot_dual_file: ../res/openrave/jaco_dual.robot.xml
diff --git a/cfg/conf.d/skiller.yaml b/cfg/conf.d/skiller.yaml
index f83ef5d..7378b2b 100644
--- a/cfg/conf.d/skiller.yaml
+++ b/cfg/conf.d/skiller.yaml
@@ -5,7 +5,7 @@ doc-url: !url http://trac.fawkesrobotics.org/wiki/Plugins/skiller
 ---
 skiller:
   # Skill space
-  skillspace: test
+  skillspace: rcll_crossover
 
   # Watch lua files for modification and automatically reload
   # Lua if files have been changed; true to enable
@@ -20,39 +20,12 @@ skiller:
       enable: false
 
     ros:
-      enable: true
+      enable: false
 
   interfaces:
-    test:
+    rcll_crossover:
       reading:
-        navigator: NavigatorInterface::Navigator
-        pose: ObjectPositionInterface::WM Pose
-        speechsynth: SpeechSynthInterface::Flite
-        katanaarm: KatanaInterface::Katana
-        ptu_RX28: PanTiltInterface::PanTilt RX28
-        ptu_EviD100P: PanTiltInterface::PanTilt EviD100P
-    nao:
-      navigator: NavigatorInterface::Navigator
-      pose: ObjectPositionInterface::WM Pose
-      wm_ball: ObjectPositionInterface::WM Ball
-      gamestate: GameStateInterface::WM GameState
-      speechsynth: SpeechSynthInterface::Nao SpeechSynth
-      naomotion: HumanoidMotionInterface::NaoQi Motion
-      naosensors: NaoSensorInterface::Nao Sensors
-      naostiffness: NaoJointStiffnessInterface::Nao Joint Stiffness
-      naojoints: NaoJointPositionInterface::Nao Joint Positions
-      chestbutton: SwitchInterface::Nao Button Chest
-      lfootbumper: SwitchInterface::Nao Button Foot Left
-      rfootbumper: SwitchInterface::Nao Button Foot Right
-      chestled_blue: LedInterface::Nao LED ChestBoard/Blue
-      chestled_red: LedInterface::Nao LED ChestBoard/Red
-      chestled_green: LedInterface::Nao LED ChestBoard/Green
-      lfootled_blue: LedInterface::Nao LED LFoot/Blue
-      lfootled_red: LedInterface::Nao LED LFoot/Red
-      lfootled_green: LedInterface::Nao LED LFoot/Green
-      rfootled_blue: LedInterface::Nao LED RFoot/Blue
-      rfootled_red: LedInterface::Nao LED RFoot/Red
-      rfootled_green: LedInterface::Nao LED RFoot/Green
-      ear_leds: LedInterface::Nao LED Ears/*/*
-      face_leds: LedInterface::Nao LED Face/*/*/*
-      penalty: SoccerPenaltyInterface::SPL Penalty
+        jacoarm: JacoInterface::JacoArm
+        jacoarm_left: JacoInterface::JacoArm
+        jacoarm_right: JacoInterface::JacoArm
+        openrave: OpenRaveInterface::OpenRAVE

- *commit* 51ced064c680b866126e3d708e30f8fa1bdd7e63 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Tue Jun 28 18:16:23 2016 +0200
Subject: plugins: build product_exchange plugin

 src/plugins/Makefile |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/Makefile b/src/plugins/Makefile
index caee20b..9647048 100644
--- a/src/plugins/Makefile
+++ b/src/plugins/Makefile
@@ -28,7 +28,8 @@ SUBDIRS	= bbsync bblogger webview ttmainloop rrd rrdweb \
 	  clips-tf openprs openprs-agent eclipse-clp \
 	  mongodb mongodb_log \
 	  openni refboxcomm ros player xmlrpc gossip \
-	  robot_state_publisher gazebo dynamixel navgraph-interactive
+	  robot_state_publisher gazebo dynamixel navgraph-interactive \
+		product_exchange
 
 include $(BUILDSYSDIR)/rules.mk
 

- *commit* 95a7fc4a8834f391f06d18ae859b3ff03bd4a738 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Tue Jun 28 18:39:43 2016 +0200
Subject: product-exchange: fix path in msgs Makefile

 src/plugins/product_exchange/msgs/Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/product_exchange/msgs/Makefile b/src/plugins/product_exchange/msgs/Makefile
index 61c10be..356ad4b 100644
--- a/src/plugins/product_exchange/msgs/Makefile
+++ b/src/plugins/product_exchange/msgs/Makefile
@@ -13,7 +13,7 @@
 #
 #*****************************************************************************
 
-BASEDIR = ../../..
+BASEDIR = ../../../..
 
 include $(BASEDIR)/etc/buildsys/config.mk
 

- *commit* 2ab58ee002cb3bf01fe9037bbdc6100717fca4b7 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Tue Jun 28 22:05:22 2016 +0200
Subject: skill rcll_move_product: adapt to new construction

 .../skills/generic/advanced/rcll_move_product.lua  |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

_Diff for modified files_:
diff --git a/src/lua/skills/generic/advanced/rcll_move_product.lua b/src/lua/skills/generic/advanced/rcll_move_product.lua
index e8c39d3..14a246e 100644
--- a/src/lua/skills/generic/advanced/rcll_move_product.lua
+++ b/src/lua/skills/generic/advanced/rcll_move_product.lua
@@ -46,15 +46,15 @@ local PARK_Z = 1.0
 local PARK_E1 = 1.57
 local PARK_E2 = 3.14
 local PARK_E3 = 1.75
-local PROD_POS_X = 0.28
-local PROD_POS_Y = 0.15
+local PROD_POS_X = 0.18
+local PROD_POS_Y = 0.16
 local PROD_POS_Z = 0.915
 local PICK_UP_E3 = 1.75
 local PICK_UP_X_OFFSET = -0.01
 local PICK_UP_Y_OFFSET = 0.00
 local DROP_POS_X = 0.2
 local DROP_POS_Y = -0.2
-local DROP_POS_Z = 0.11
+local DROP_POS_Z = 0.14
 
 -- States
 fsm:define_states{ export_to=_M,
@@ -168,7 +168,7 @@ end
 
 function MOVE_OBJS:init()
   self.args["or_object"] = {
-    move={{name="mps", x=-0.10, y=0.47, z=0},
+    move={{name="mps", x=-0.20, y=0.49, z=0},
           {name="prod", x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z},
           {name="separator1",x=0.0,y=-0.4,z=0.3},
           {name="separator2",x=-0.3,y=0,z=0.3},

- *commit* 5e15abffcbdfbd2a87c50d54df5dcf364a81045d - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Tue Jun 28 22:08:53 2016 +0200
Subject: skill rcll_move_product: split open gripper, release obj into 2 states

 .../skills/generic/advanced/rcll_move_product.lua  |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

_Diff for modified files_:
diff --git a/src/lua/skills/generic/advanced/rcll_move_product.lua b/src/lua/skills/generic/advanced/rcll_move_product.lua
index 14a246e..3e958aa 100644
--- a/src/lua/skills/generic/advanced/rcll_move_product.lua
+++ b/src/lua/skills/generic/advanced/rcll_move_product.lua
@@ -115,8 +115,10 @@ fsm:define_states{ export_to=_M,
     fail_to="RETRACT_TO_PARK", skills={{jaco}}},
   {"DROP_POS", SkillJumpState, final_to="DROP", fail_to="RETRACT_MOVE_UP",
     skills={{jaco}}},
-  {"DROP", SkillJumpState, final_to="POST_DROP", fail_to="FAILED",
-    skills={{jaco},{or_object}}},
+  {"DROP", SkillJumpState, final_to="RELEASE_PROD",
+    fail_to="RETRACT_MOVE_UP", skills={{jaco}}},
+  {"RELEASE_PROD", SkillJumpState, final_to="POST_DROP",
+    fail_to="RETRACT_MOVE_UP", skills={{or_object}}},
   {"POST_DROP", SkillJumpState, final_to="PARK", fail_to="FAILED",
     skills={{jaco}}},
   {"PARK", SkillJumpState, final_to="FINAL", fail_to="RETRY_PARK_INTERMEDIATE",
@@ -251,6 +253,9 @@ end
 
 function DROP:init()
   self.args["jaco"] = {gripper="open"}
+end
+
+function RELEASE_PROD:init()
   self.args["or_object"] = {release={"prod"}}
 end
 

- *commit* 5d41574c3459c6906fb50737be0d3eba8e2cd1b3 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Thu Jun 30 08:52:19 2016 +0200
Subject: skill rcll_move_product: adapt drop position to actual @work platform

 .../skills/generic/advanced/rcll_move_product.lua  |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

_Diff for modified files_:
diff --git a/src/lua/skills/generic/advanced/rcll_move_product.lua b/src/lua/skills/generic/advanced/rcll_move_product.lua
index 3e958aa..821bdcf 100644
--- a/src/lua/skills/generic/advanced/rcll_move_product.lua
+++ b/src/lua/skills/generic/advanced/rcll_move_product.lua
@@ -52,9 +52,9 @@ local PROD_POS_Z = 0.915
 local PICK_UP_E3 = 1.75
 local PICK_UP_X_OFFSET = -0.01
 local PICK_UP_Y_OFFSET = 0.00
-local DROP_POS_X = 0.2
-local DROP_POS_Y = -0.2
-local DROP_POS_Z = 0.14
+local DROP_POS_X = 0.0
+local DROP_POS_Y = -0.45
+local DROP_POS_Z = 0.138
 
 -- States
 fsm:define_states{ export_to=_M,
@@ -172,7 +172,7 @@ function MOVE_OBJS:init()
   self.args["or_object"] = {
     move={{name="mps", x=-0.20, y=0.49, z=0},
           {name="prod", x=PROD_POS_X,y=PROD_POS_Y,z=PROD_POS_Z},
-          {name="separator1",x=0.0,y=-0.4,z=0.3},
+          {name="separator1",x=0.0,y=-0.6,z=0.3},
           {name="separator2",x=-0.3,y=0,z=0.3},
           {name="separator3",x=0,y=0.5,z=0.3},
           {name="dropbox", x=0.2,y=-0.2,z=0}

- *commit* 237079ef057b681928e17e7e1d034a1c8230e69e - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Thu Jun 30 09:02:26 2016 +0200
Subject: rcll crossover: add the correct atwork platform

 ...box.kinbody.xml => atwork_platform.kinbody.xml} |    6 +++---
 .../skills/generic/advanced/rcll_move_product.lua  |    4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

_Diff for modified files_:
diff --git a/src/lua/skills/generic/advanced/rcll_move_product.lua b/src/lua/skills/generic/advanced/rcll_move_product.lua
index 821bdcf..779d11e 100644
--- a/src/lua/skills/generic/advanced/rcll_move_product.lua
+++ b/src/lua/skills/generic/advanced/rcll_move_product.lua
@@ -157,7 +157,7 @@ function ADD_OBJS:init()
           {name="separator1", path="separator.kinbody.xml"},
           {name="separator2", path="separator.kinbody.xml"},
           {name="separator3", path="separator.kinbody.xml"},
-          {name="dropbox", path="dropbox.kinbody.xml"}
+          {name="atwork_platform", path="atwork_platform.kinbody.xml"}
           }}
 end
 
@@ -175,7 +175,7 @@ function MOVE_OBJS:init()
           {name="separator1",x=0.0,y=-0.6,z=0.3},
           {name="separator2",x=-0.3,y=0,z=0.3},
           {name="separator3",x=0,y=0.5,z=0.3},
-          {name="dropbox", x=0.2,y=-0.2,z=0}
+          {name="atwork_platform", x=0.2,y=-0.35,z=0}
           }}
 end
 

- *commit* 312d67d0b70a84a83fe4dc47769eba47d4883ec5 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Thu Jun 30 10:19:47 2016 +0200
Subject: rcll crossover: add more accurate model of the robot base

 res/openrave/rcll.robot.xml                        |   31 +++++++++++--------
 .../skills/generic/advanced/rcll_move_product.lua  |    2 +-
 2 files changed, 19 insertions(+), 14 deletions(-)

_Diff for modified files_:
diff --git a/res/openrave/rcll.robot.xml b/res/openrave/rcll.robot.xml
index db61c25..055a556 100644
--- a/res/openrave/rcll.robot.xml
+++ b/res/openrave/rcll.robot.xml
@@ -20,31 +20,36 @@
   </Manipulator>
 
   <KinBody name="body">
-    <Body name="main_body" type="dynamic">
+    <Body name="front_struct" type="dynamic">
       <Geom type="box">
-        <Extents>0.2 0.1 0.295</Extents>
+        <Extents>0.0225 0.0225 0.295</Extents>
       </Geom>
       <Translation>0 0 0.295</Translation>
     </Body>
-    <!--
-    <Body name="mount" type="dynamic">
+    <Body name="left_struct" type="dynamic">
       <Geom type="box">
-        <Extents>0.05 0.2 0.025</Extents>
+        <Extents>0.0225 0.0225 0.33</Extents>
       </Geom>
-      <Translation>-0.15 0 0.585</Translation>
+      <Translation>-0.0775 0.08775 0.33</Translation>
+    </Body>
+    <Body name="right_struct" type="dynamic">
+      <Geom type="box">
+        <Extents>0.0225 0.0225 0.33</Extents>
+      </Geom>
+      <Translation>0.0825 0.08775 0.33</Translation>
+    </Body>
+    <Body name="center_struct" type="dynamic">
+      <Geom type="box">
+        <Extents>0.1175 0.0225 0.0225</Extents>
+      </Geom>
+      <Translation>0 0.045 0.4575</Translation>
     </Body>
-    -->
 
   <Joint name="dummy" type="hinge" enable="False">
-    <body>main_body</body>
+    <body>front_struct</body>
     <body>arm_Base</body>
   </Joint>
 
-  <!--<Joint name="dummy2" type="hinge" enable="False">
-    <body>main_body></body>
-    <body>mount</body>
-  </Joint>-->
-  
 </KinBody>
 
 </Robot>
diff --git a/src/lua/skills/generic/advanced/rcll_move_product.lua b/src/lua/skills/generic/advanced/rcll_move_product.lua
index 779d11e..e8c5eef 100644
--- a/src/lua/skills/generic/advanced/rcll_move_product.lua
+++ b/src/lua/skills/generic/advanced/rcll_move_product.lua
@@ -175,7 +175,7 @@ function MOVE_OBJS:init()
           {name="separator1",x=0.0,y=-0.6,z=0.3},
           {name="separator2",x=-0.3,y=0,z=0.3},
           {name="separator3",x=0,y=0.5,z=0.3},
-          {name="atwork_platform", x=0.2,y=-0.35,z=0}
+          {name="atwork_platform", x=0.2,y=-0.28,z=0}
           }}
 end
 

- *commit* 682dea8a4ac4c6d7e90ef72df0e53ba5c7290428 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Thu Jun 30 14:47:17 2016 +0200
Subject: product-exchange: try to reconnect if not connected to the refbox

 .../product_exchange/product_exchange_thread.cpp   |   15 ++++++++++++++-
 .../product_exchange/product_exchange_thread.h     |    2 ++
 2 files changed, 16 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/product_exchange/product_exchange_thread.cpp b/src/plugins/product_exchange/product_exchange_thread.cpp
index 1f05ad9..faa6143 100644
--- a/src/plugins/product_exchange/product_exchange_thread.cpp
+++ b/src/plugins/product_exchange/product_exchange_thread.cpp
@@ -58,6 +58,7 @@ void
 ProductExchangeThread::init()
 {
   processing_request_ = false;
+  connected_ = false;
   // initialize protobuf client
   client_ = new ProtobufStreamClient();
   MessageRegister & pcmr = client_->message_register();
@@ -68,7 +69,7 @@ ProductExchangeThread::init()
         &ProductExchangeThread::handle_connected, this));
   client_->signal_disconnected().connect(boost::bind(
         &ProductExchangeThread::handle_disconnected, this));
-  client_->async_connect("localhost", 4444);
+  connect();
 
   // initialize Skiller interface
   skiller_if_ = blackboard->open_for_reading<SkillerInterface>("Skiller");
@@ -82,6 +83,9 @@ ProductExchangeThread::init()
 void
 ProductExchangeThread::loop()
 {
+  if (!connected_) {
+    connect();
+  }
   skiller_if_->read();
   if (skiller_if_->status() == SkillerInterface::S_RUNNING) {
     // skill running, wait until it's finished
@@ -150,11 +154,13 @@ void
 ProductExchangeThread::handle_connected()
 {
   logger->log_debug(name(), "Connected!");
+  connected_ = true;
 }
 void
 ProductExchangeThread::handle_disconnected()
 {
   logger->log_debug(name(), "Disconnected!");
+  connected_ = false;
 }
 
 void
@@ -189,3 +195,10 @@ ProductExchangeThread::process_request(RefPtr<ExchangeRequest> request)
   skiller_if_->msgq_enqueue(msg);
   request->skiller_msg_id = msg->id();
 }
+
+void
+ProductExchangeThread::connect()
+{
+  logger->log_debug(name(), "Trying to connect");
+  client_->async_connect("localhost", 4444);
+}
diff --git a/src/plugins/product_exchange/product_exchange_thread.h b/src/plugins/product_exchange/product_exchange_thread.h
index 604fe78..b8dcbef 100644
--- a/src/plugins/product_exchange/product_exchange_thread.h
+++ b/src/plugins/product_exchange/product_exchange_thread.h
@@ -64,12 +64,14 @@ class ProductExchangeThread
   void report_success(fawkes::RefPtr<ExchangeRequest> request);
   void report_failure(fawkes::RefPtr<ExchangeRequest> request);
   void process_request(fawkes::RefPtr<ExchangeRequest> request);
+  void connect();
 
   protobuf_comm::ProtobufStreamClient                 *client_;
   fawkes::SkillerInterface                            *skiller_if_;
   fawkes::LockQueue<fawkes::RefPtr<ExchangeRequest> > request_queue_;
   fawkes::RefPtr<ExchangeRequest>                     current_request_;
   bool                                                processing_request_;
+  bool                                                connected_;
 
 };
 

- *commit* 465878a8140d3e8a9365a00c2d142e648cf3b28a - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Thu Jun 30 19:15:14 2016 +0200
Subject: product-exchange: make refbox hostname and port configurable

 .../product_exchange/product_exchange_thread.cpp   |   22 +++++++++++++++++++-
 .../product_exchange/product_exchange_thread.h     |    2 +
 2 files changed, 23 insertions(+), 1 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/product_exchange/product_exchange_thread.cpp b/src/plugins/product_exchange/product_exchange_thread.cpp
index faa6143..d23b712 100644
--- a/src/plugins/product_exchange/product_exchange_thread.cpp
+++ b/src/plugins/product_exchange/product_exchange_thread.cpp
@@ -26,6 +26,8 @@
 
 #include <interfaces/SkillerInterface.h>
 
+#define CFG_PREFIX "/rcll/crossover/"
+
 using namespace std;
 using namespace fawkes;
 using namespace protobuf_comm;
@@ -59,6 +61,24 @@ ProductExchangeThread::init()
 {
   processing_request_ = false;
   connected_ = false;
+  try {
+    cfg_refbox_hostname_ = config->get_string(CFG_PREFIX"refbox/hostname");
+  } catch (const Exception &e) {
+    // use default
+    cfg_refbox_hostname_ = "localhost";
+    logger->log_info(name(),
+        "No config value found for %s, using default '%s'",
+        CFG_PREFIX"refbox/hostname", cfg_refbox_hostname_.c_str());
+  }
+  try {
+    cfg_refbox_port_ = config->get_uint(CFG_PREFIX"refbox/port");
+  } catch (const Exception &e) {
+    // use default
+    cfg_refbox_port_ = 4444;
+    logger->log_info(name(),
+        "No config value found for %s, using default '%u'",
+        CFG_PREFIX"refbox/port", cfg_refbox_port_);
+  }
   // initialize protobuf client
   client_ = new ProtobufStreamClient();
   MessageRegister & pcmr = client_->message_register();
@@ -200,5 +220,5 @@ void
 ProductExchangeThread::connect()
 {
   logger->log_debug(name(), "Trying to connect");
-  client_->async_connect("localhost", 4444);
+  client_->async_connect(cfg_refbox_hostname_.c_str(), cfg_refbox_port_);
 }
diff --git a/src/plugins/product_exchange/product_exchange_thread.h b/src/plugins/product_exchange/product_exchange_thread.h
index b8dcbef..ca285f9 100644
--- a/src/plugins/product_exchange/product_exchange_thread.h
+++ b/src/plugins/product_exchange/product_exchange_thread.h
@@ -72,6 +72,8 @@ class ProductExchangeThread
   fawkes::RefPtr<ExchangeRequest>                     current_request_;
   bool                                                processing_request_;
   bool                                                connected_;
+  std::string                                         cfg_refbox_hostname_;
+  uint                                                cfg_refbox_port_;
 
 };
 

- *commit* 72ba5d495e85d1b259db185bc9b206cda68890c9 - - - - - - - - - -
Author:  Till Hofmann <hofmann at kbsg.rwth-aachen.de>
Date:    Fri Jul 1 22:37:55 2016 +0200
Subject: product-exchange: only try to reconnect every 50th loop

 .../product_exchange/product_exchange_thread.cpp   |   10 ++++++++--
 .../product_exchange/product_exchange_thread.h     |    1 +
 2 files changed, 9 insertions(+), 2 deletions(-)

_Diff for modified files_:
diff --git a/src/plugins/product_exchange/product_exchange_thread.cpp b/src/plugins/product_exchange/product_exchange_thread.cpp
index d23b712..7f4a786 100644
--- a/src/plugins/product_exchange/product_exchange_thread.cpp
+++ b/src/plugins/product_exchange/product_exchange_thread.cpp
@@ -61,6 +61,7 @@ ProductExchangeThread::init()
 {
   processing_request_ = false;
   connected_ = false;
+  wait_reconnect_count_ = 0;
   try {
     cfg_refbox_hostname_ = config->get_string(CFG_PREFIX"refbox/hostname");
   } catch (const Exception &e) {
@@ -104,7 +105,11 @@ void
 ProductExchangeThread::loop()
 {
   if (!connected_) {
-    connect();
+    wait_reconnect_count_++;
+    if (wait_reconnect_count_ > 50) {
+      connect();
+      wait_reconnect_count_ = 0;
+    }
   }
   skiller_if_->read();
   if (skiller_if_->status() == SkillerInterface::S_RUNNING) {
@@ -219,6 +224,7 @@ ProductExchangeThread::process_request(RefPtr<ExchangeRequest> request)
 void
 ProductExchangeThread::connect()
 {
-  logger->log_debug(name(), "Trying to connect");
+  logger->log_debug(name(), "Trying to connect to %s:%u",
+      cfg_refbox_hostname_.c_str(), cfg_refbox_port_);
   client_->async_connect(cfg_refbox_hostname_.c_str(), cfg_refbox_port_);
 }
diff --git a/src/plugins/product_exchange/product_exchange_thread.h b/src/plugins/product_exchange/product_exchange_thread.h
index ca285f9..75e635f 100644
--- a/src/plugins/product_exchange/product_exchange_thread.h
+++ b/src/plugins/product_exchange/product_exchange_thread.h
@@ -72,6 +72,7 @@ class ProductExchangeThread
   fawkes::RefPtr<ExchangeRequest>                     current_request_;
   bool                                                processing_request_;
   bool                                                connected_;
+  uint                                                wait_reconnect_count_;
   std::string                                         cfg_refbox_hostname_;
   uint                                                cfg_refbox_port_;
 




-- 
Fawkes Robotics Framework                 http://www.fawkesrobotics.org


More information about the fawkes-commits mailing list