0% found this document useful (0 votes)
10 views15 pages

Robotics

The document discusses integration techniques for robotics tasks. It describes state machines and behavior trees, which are common techniques used to break down high-level tasks into smaller components and determine the appropriate commands. State machines represent tasks as a series of states and transitions between them. Behavior trees similarly represent tasks as a tree structure with different node types determining traversal rules.

Uploaded by

jiriraymond65
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views15 pages

Robotics

The document discusses integration techniques for robotics tasks. It describes state machines and behavior trees, which are common techniques used to break down high-level tasks into smaller components and determine the appropriate commands. State machines represent tasks as a series of states and transitions between them. Behavior trees similarly represent tasks as a tree structure with different node types determining traversal rules.

Uploaded by

jiriraymond65
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 15

Robotics

Lecture 2.3
Integration
● Integration is how we use manipulation, navigation and/or perception
components to execute high-level tasks
● For example, how do we translate “get a beer from the fridge and bring it to me”
into the correct actuator commands to do so?
● We need something that
○ Interprets the high level task
○ Breaks it into smaller components
○ Interprets perception output and sends manipulation and/or navigation commands
Integration Techniques
● The two main techniques we will focus on in this course are
○ State Machines
○ Behavior Trees
● These two are some of the most common techniques in robotics for task
execution
● Other techniques include
○ Answer set programming
○ Graph optimization
○ Constraint programming
Finite State Machines
● Finite state machines boil down to a set of
○ States
○ Inputs
○ Transitions
● The state machine is a graph that tells you which states you will end up in based
on your current state and a given input
● It can be viewed as a set of rules for a system, or as a set of predetermined
decisions based on known conditions
Example State Machine
State Machines
State Transition Tables
● One can represent a state machine in
the form of a table
● Rows are the current states
● Columns are the inputs
● Cells are the resulting states
Example State Machine

G 1 2

Ground floor Ground floor 1st floor 2nd floor

1st floor Ground floor 1st floor 2nd floor

2nd floor Ground floor 1st floor 2nd floor


States as Executions
● Often in robotics, we can not deterministically predict the outcomes of our
actions, but we can categorize them.
● For example, we cannot guarantee that if we run a command to grasp a cup,
afterwards the cup will be grasped, but we can categorize the outcomes into
○ Cup grasped
○ Cup unmoved
○ Cup fallen
● For this reason, it often makes the most sense to use a state machines states to
represent some action a robot is doing, and the inputs as the outcomes of those
actions
● In the above example, this would allow us to tell the robot what to do after
attempting to grasp the cup, based on the success of that action.
States as Executions
● The most common framework to
implement states as execution in
ROS is SMACH
● A state is defined primarily by an
execute function, that is called on
loop until the action is complete,
whereby it returns an outcome
● The outcome is then used as input to
the state machine graph to determine
the next state to execute
Behavior Trees
● Behavior trees are a different way to represent decisions and execution
● A behavior describes a task in a tree structure, where each node in the tree has a
type, and that type determines the rules for traversal
● Leaf nodes of the tree represent execution steps, based on their outcomes, the
rules determine which leaf is arrived at next
● Behavior trees are mathematically equivalent to state machines
● This means every state machine can be described with a behavior tree and vice
versa
Behavior Trees
● Behavior trees can be broken into leaf
nodes and control nodes
● The leaf nodes can be either
○ Condition checks: These return success or
failure based on some condition. See the oval
nodes.
○ Execution nodes: These execute some action
then return success or failure based on the
result. See the rectangles.
● The control nodes can be either
○ Sequence nodes: These execute the first child,
from left to right, that has not succeeded. See
the arrows
○ Selector nodes: These execute the first child,
from left to right, that has not failed. See the
question marks.
Control Nodes
● A sequence node will itself return
failure if any of its children return
failure. Think of this as like an AND
operator.
● A selector node will itself return
success if any of its children return
success. Think of this like an OR
operator.
Behavior Trees
Behavior Trees: Example

You might also like