Learn to program Boston Dynamics Spot with MerkleBot

We bought Spot to let you try it remotely

Alisher A. Khassanov
Robonomics Network by Airalab

--

Hi, I’m Alisher, an engineer at MerkleBot. We are about to start our Spot SDK Basics course, where you get 5 hours of practice with the Boston Dynamics Spot robot available for your control by remote access.

The robot is located in our laboratory in Silicon Valley. The course is self-paced, you select one hour-long session to practice with the robot by Google Calendar after paying for it. We don’t charge for anything else. During each of five one-hour-long sessions with the robot, you will connect to Spot by SSH and watch it execute your scripts in a video from the camera in our lab.

After each lesson, we send you robot movements (joints state) recorded which you can visualize with rviz, and a video captured by the camera to let you demonstrate your experience on the interview for your next dream job! When you succeed in solving a challenge for a lesson, MerkleBot issues you a certificate on lesson completion. The course was developed by the Laboratory of Multi-Agent Systems in Smart Cities and Industry 4.0 of ITMO University.

If you want no more talks, feel free to enroll at https://spot-sdk.education. Otherwise, let me tell you more details about the course down below.

The idea behind the course

For years Bostom Dynamics pulls us in the future building robots with exciting balance and dynamics that we used to only see in movies. In 2020 Boston Dynamics finally made their awesome Spot robot available for commercial use and released Python SDK to work with it. But unfortunately, for a long time there was no simulation of Spot and it’s not easy to make a simulation for such a robot. A regular roboticist like me had no chance to get the experience of working with Spot. What a pity!

At MerkleBot we decided to get a Spot robot in our lab and make it available for remote control. Also, we decided it’s better to offer a robot in a structured way: to solve practical tasks in an educational course. While it’s not mandatory to follow course tasks and you are free to practice anything else with it if you need no certification, by solving course challenges, you get a solid understanding of basic operations Spot SDK provides.

The key idea of the course is to give students an essential practice for semi-automatic remote operations with a certificate that proves that experience. By the end of the course, we expect the student will be able to build a remote-controlled and semi-automatic Spot robot application.

To make our certificates tamper-proof and immutable we use Robonomics.network blockchain, which makes it impossible to change the date of origin of the certificate or forge any piece of robot state recorded. I’m going to make another article to describe what it is and how it works in detail.

What do you need for the course?

Spot got a straightforward operating interface comparing to the complexity it carries inside. But students are required to have some preliminary knowledge to work with it. To solve course challenges, you need:

  1. Basic knowledge on how to work in GNU / Linux (Ubuntu, for instance) shell: filesystem navigation, create / open / delete files, how to run commands and scripts,
  2. Understand Python programming language basics like functions, objects, modules,
  3. Git version control system basics to download and use code from github.com,
  4. Some experience using SSH for remote access.

Some robotics experience is good to have as well, but it’s not mandatory, and any software engineer who tried to use GNU /Linux distribution and Python programming will be able to solve challenges.

What you get from the course

Here in the basics course, we neither add theory in addition to the documentation that Boston Dynamics provides, or new software tools. There is a large number of examples and tools Boston Dynamics ships together with SDK and we only want the student to get familiar with it. This will make a solid basis to solve real-world tasks.

Students of the Spot SDK Basics course get the following:

  1. Theory. All theoretical materials are available for free at dev.boston-dynamics.com and provided by Boston Dynamics itself, we only tell you what part to study before each lesson and offer advice on best practices,
  2. Practice. Each lesson provides 1 hour-long work session with the real robot to develop, debug and demonstrate your solution to the challenge,
  3. Certificate, a printable PDF by MerkleBot with links to the video, robot state record, and its hash in a public immutable database (blockchain),
  4. Videos captured by the camera in our lab,
  5. Robot state records in form of rosbag to visualize robot motions in rviz. File shared publicly in IPFS,
  6. A blockchain record with a hash of robot state record file that works as a proof of origin of the file.

There are 5 lessons in Spot SDK Basics course. Each lesson is described in detail further.

How a lesson looks like

It is a self-paced course and you can take lessons one by one scheduling work sessions with a robot using the calendar on our website. Let’s see how a regular practice session looks like for a student.

Me debugging solution for the lesson 3 challenge. I write code locally in the IDE, then run it remotely by SSH and track execution in Google Meet call. PTZ camera controls are not shown here but will be available for you.

Each lesson requires you to go through four steps:

  1. You read the requirements and the task description for the lesson. It’s publicly available at github.com. It refers to Spot documentation and code examples at dev.bostondynamics.com are important to study first,
  2. Once you feel ready, you buy a 1 hour-long practice session specifying your access credentials (SSH key) and the time when you want to connect to Spot to solve the task,
  3. When your session starts, you can connect to the Spot robot by SSH with credentials specified at Step 2 and join a Google Meet meeting to watch the robot by the camera,
  4. The robot captures its state. And after the lesson, MerkleBot signs the robot state records to prove its origin for the certificate and you can download it.

Topics covered

MerkleBot’s Spot SDK Basics course offers 4 lessons on robot motion control and 1 lesson on robot service operations. We are sure these 5 hours of practice plus the theory studied are enough to get confidence in solving real-world problems with a remote-controlled robot. Each lesson requires students to study a new piece of the Spot SDK API to use it in a self-made script or a complete Python script provided by Boston Dynamics for some operations.

  1. Lesson 1. Emergency stop, initialization, body position control,
  2. Lesson 2. Remote controlled and programmed motion,
  3. Lesson 3. Find and follow an object, navigate between objects,
  4. Lesson 4. GraphNav service: mapping and navigating on the map,
  5. Lesson 5. Robot service: camera calibration and “Spot check” procedure.

Also, we are preparing the Spot SDK Advanced course and going to release a lesson on Mission Control service usage at first. It allows composing complex tasks with the Behavior Trees framework.

What each lesson gives you?

Lesson 1

Spot is a mighty machine and the important first step is to get to know how to initialize it safely, controlling emergency stop (e-stop). Once initialized, we will try motor control changing the robot’s body position. In practice, you will write a Python script that looks like hello_spot example. The challenge is to trace your initial letter with Spot’s “face”.

Lesson 2

Here we study how to walk with Spot using trajectory point, velocity, and stance commands from Spot SDK API. The challenge is to walk straight, sideways, make a turn and lie down to the battery change pose programmatically.

Lesson 3

In the third lesson, we study objects detection and following. We need to find an object, move in a pose relatively to it and follow it if it moves. The challenge requires you to make the robot detect objects in our lab and walk in between them.

Lesson 4

The GraphNav service we study in lesson 4 allows us to create a map and navigate in it. Here we will study recording the map, downloading, viewing, and editing it on a local computer, and navigating on the map with examples from Spot SDK. The challenge requires you to record a map using WASD remote control and make a robot move in between waypoints on the map.

Lesson 5

Understanding robot servicing is essential to build applications with it. It is up to you to buy a practice for this lesson or not, but we thought we must cover this topic to provide a solid basis for your future work with Spot. There are two frequent servicing operations we already know at this point: robot network connectivity and battery change. Two more left to study in lesson 5: spot_check procedure and camera calibration. The documentation recommends running it if the robot hits obstacles frequently or loses its dexterity walking. I guess spot_check runs some dynamics parameters identification. Spot check takes 3–5 minutes.

Me watching the robot do camera calibration.

Another operation is camera_calibration. I’m not very deep in computer vision development, but it is the easiest camera calibration procedure in my life. You put the robot nearby the calibration desk, run the command and watch it dancing around it for 15–20 minutes.

Lesson 0

There is also a short “lesson” zero where we ask students to test a connection to the robot. We don’t charge for it of course. While there is plenty of options to establish a connection, we in MerkleBot are trying to adopt decentralized web technologies, the so-called Web3, for robotics. For connectivity purposes, we use an end-to-end encrypted IPv6 Yggdrasil Network. It does not require ordering a public IP for the robot from the internet connection provider or establishing a complicated virtual network solution. Further running a fleet of Spot robots out of the office in public cellular networks, you may connect the entire fleet by Yggdrasil Network with no need for public IPv4 addresses for your robots.

Conclusion

I hope I have already convinced you to leave your email at https://spot-sdk.education to join the course. It’s free to leave your email and study theory, we only charge for robot access when you schedule a remote access session.

We are also preparing Spot SDK Advanced course for deeper dive into autonomous operations use cases. If you have an idea, feel free to share with us what you would like to study in the comments below or email me at alisher@merklebot.com.

MerkleBot is a company created by members of Airalab DAO, a community around free and open-source software of Robonomics.network — an infrastructure for robotics and IoT applications in decentralized computers like Ethereum and Polkadot: https://github.com/airalab. Join us to give your contribution to the third generation of internet technologies for robotics. You can propose a project for granting: https://github.com/airalab/robonomics-grant-program or join our telegram chat to discuss your idea: https://t.me/robonomics.

Thank you and see you on the course!

--

--