4 Creating a robot shell

This chapter covers

  • The basics of creating interactive custom shells in Python
  • Creating a command loop for moving the robot forward and backward
  • Handling command arguments in shell commands
  • Centralizing argument-handling logic in code shells
  • Executing custom shell scripts in Python

This chapter will teach you how to create a custom interactive REPL (read–evaluate–print loop) robot shell. Shells provide a powerful interactive interface that enables direct interaction with software or, in this case, robotic hardware. They are a tried-and-true method for user interaction, and the Python standard library provides a built-in functionality to create custom shells. The chapter starts with a simple robotic shell and then progresses ...

Get Build Your Own Robot now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.