Discussion:
[Rock-dev] Defining conditions for state-machines withing roby?
Matthias Goldhoorn
2014-06-03 13:53:46 UTC
Permalink
I search for a nice way to define that transition should only be done IF
some conditions (like data on input ports) are valid.

Concrete:

find_pipe_back = state target_move_def(:finish_when_reached => false ,
:heading => 1 ...)
pipe_detector = state pipeline_detector_def
pipe_detector.depends_on find_pipe_back, :role => "detector"
start(pipe_detector)

script do
somewhow_get_reader_of_orientation
if orientation.yaw < foo and orientation.yaw > 2
forward pipe_detector.align_auv_event, success_event
end
end


I thoug to do anything like creating a Roby::Task like this:

class Foo::Task << Roby::Task
add OrientationSrv, :as => ori_p
reader = ori_p.orientation.reader
script do
if ori.yaw .....
emit :failed
else
emit :success
end
end

and then fallback in the statemachine to the original state, but i
assume this will result in a nonsense-loop. Is there a better way to do
those things?

Best,
Matthias
--
--
Matthias Goldhoorn
Unterwasserrobotik

Standort Bremen:
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Stra?e 5
28359 Bremen, Germany

Phone: +49 (0)421 218-64100
Fax: +49 (0)421 218-64150
E-Mail: robotik at dfki.de

Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Stra?e 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/673/0060/3
-----------------------------------------------------------------------
Sylvain Joyeux
2014-06-03 13:59:00 UTC
Permalink
Hey, two points:
- this question would better be placed on the robotics stack exchange
website (with the syskit and rock tags) as we discussed earlier on this ML
- it is generally better to ask *what* you want to do first (i.e. when my
pipeline follower reaches heading X I want to do Y), not *how* you think
you should be doing it (state machine, create roby task and so on)

Sylvain


On Tue, Jun 3, 2014 at 3:53 PM, Matthias Goldhoorn <
Post by Matthias Goldhoorn
I search for a nice way to define that transition should only be done IF
some conditions (like data on input ports) are valid.
find_pipe_back = state target_move_def(:finish_when_reached => false ,
:heading => 1 ...)
pipe_detector = state pipeline_detector_def
pipe_detector.depends_on find_pipe_back, :role => "detector"
start(pipe_detector)
script do
somewhow_get_reader_of_orientation
if orientation.yaw < foo and orientation.yaw > 2
forward pipe_detector.align_auv_event, success_event
end
end
class Foo::Task << Roby::Task
add OrientationSrv, :as => ori_p
reader = ori_p.orientation.reader
script do
if ori.yaw .....
emit :failed
else
emit :success
end
end
and then fallback in the statemachine to the original state, but i
assume this will result in a nonsense-loop. Is there a better way to do
those things?
Best,
Matthias
--
--
Matthias Goldhoorn
Unterwasserrobotik
DFKI GmbH
Robotics Innovation Center
Robert-Hooke-Stra?e 5
28359 Bremen, Germany
Phone: +49 (0)421 218-64100
Fax: +49 (0)421 218-64150
E-Mail: robotik at dfki.de
Weitere Informationen: http://www.dfki.de/robotik
-----------------------------------------------------------------------
Deutsches Forschungszentrum fuer Kuenstliche Intelligenz GmbH
Firmensitz: Trippstadter Stra?e 122, D-67663 Kaiserslautern
Geschaeftsfuehrung: Prof. Dr. Dr. h.c. mult. Wolfgang Wahlster
(Vorsitzender) Dr. Walter Olthoff
Vorsitzender des Aufsichtsrats: Prof. Dr. h.c. Hans A. Aukes
Amtsgericht Kaiserslautern, HRB 2313
Sitz der Gesellschaft: Kaiserslautern (HRB 2313)
USt-Id.Nr.: DE 148646973
Steuernummer: 19/673/0060/3
-----------------------------------------------------------------------
_______________________________________________
Rock-dev mailing list
Rock-dev at dfki.de
http://www.dfki.de/mailman/cgi-bin/listinfo/rock-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.dfki.de/pipermail/rock-dev/attachments/20140603/9e9b6dee/attachment.htm
Loading...