Logistics
- Practical Details about Fiducials
- Review of Fiducials PA
What do we mean by Complex Behavior?
- Obey a high level goal by creating subgoals, and responding to real time events
move_base
behaviors are pretty complex
- A lot can be learned from Computer Games and the behavior of “Non Player Characters”
- Obviously an open ended question with many different approaches
Discussion: Which teams have an example of requiring "complex behavior", or of apparent 'inteligence'. What were you planning to do?
Example scenario
- Lets say we want to implement the following “complex behavior”:
If Robot is stuck, then try the following, one after the other until the robot is unstuck: a) Conservative reset; b) clearing rotation; c) aggressive reset; d) clearing rotation. If after all of those the robot is still stuck, then abort the navigation
Discussion: How would you implement that?
Introduction to Finite State Machines
- Finite Sate Machines also known as FSA - Finite State Automata or Deterministic Finite State Automata
- Basic and very useful way to control behaviors
- And with lots of other applications! (See Regular Expressions and Cosi 130A)
- You have seen it before, whether you identified it as an FSM or not`
Essential features:
- Named nodes, corresponding to states
- Edges connecting nodes, corresponding to “inputs”
- Initial, Final and current states
Algorithm
- Start in the initial state
- Receive an input
- Follow the one edge out of that state, given that input
- Repeat until you get to final state
NoticeDepending on the scenario, the states, transitions and inputs can be very different.
Example of a real world FSM used in ROS
Implementations
- So simple that you don’t really need a package
- But one part of the diagram can’t be implemented as a basic FSM
- We can either modify it or use a more fancy kind of finite state machine
Discussion: Can you tell what the error is in the diagram (I didn't notice it before I actually went to implement it)
Using transitions
python package
Discussion: What are the tradeoffs in using a package or not?
Move Base as a Finite State Machine
For further study
Sample Robotics challenges
One Robot Following Another
- Goal: Have a certain robot follow another one
- They can be close or far from each other
Multiple Robots Emergent Behavior
- Goal each Robot has a certain “personality”
- Robot Personalities are customizable
Robots follow a road made from Orange Cones
- If the path is super clear cut
- If the path is subjective
Robot Soccer
- Two Robots per team?
- How does Robot kick?
- How does the Robot track the ball?
Robot Playing Wordle
- Where would the wordle board be?
- How would the robot show its move?