Simulation tools for Boston DynamicsSpot

Taras Borovets
8 min readDec 31, 2020

--

Usage of ROS and Gazebo to control Spot

Boston DynamicsSpot in Gazebo simulator

This article is written in co-authorship with Lyubomyr Demkiv.

Why legged robots?

Legs can take us where wheels cannot go. It’s why recent decades have seen the development of multilegged robots. They’re far more suitable in severe environments.

Mining is one of the industries where legged machines were first used. One of the largest legged machines ever developed was built in 1969. The 15,000-ton Big Muskie was made for use in coal mines.

Today, robotic legged machines are found in a growing number of industries. They liberate humans from hard work and improve productivity. Legged robot development has become a global phenomenon. Countries leading this effort include the USA (Boston Dynamics, MIT), Switzerland (ANYbotic, ETH Zurich), and China (UnitreeRobotics).

Despite the complexity of algorithms for walking control, balancing, today there are many types of legged robots, among which the most widespread are monopod (one-legged), biped (two-legged), quadruped (four-legged) and hexapod (six-legged).

Quadruped robots

Quadruped robots are extremely popular due to their speed and maneuverability. They’re found with names such as TITAN, SILO4, KOLT, AiDIN, MBBOT, HyQ , StarlETH and ANYmal, series of MIT Cheetah, AlphaDog, LittleDog, WildCat, Spot and etc.

Despite their proliferation only a small number of robots have left the walls of the laboratory and entered the market. You might, for example, encounter Spot or ANYmal (for more technical details see datasheets on Spot and, ANYmal) in real-world use. Each is characterized by a wide range of possibilities:

  • navigation,
  • sensing,
  • stair climbing,
  • obstacle avoidance,
  • negotiating with uneven terrain, etc.

Spot

Spot can move faster, carry a heavier payload, and can be equipped with an arm, which, in turn, increases the number of possible execution tasks. Spot can be used in missions that are dangerous or difficult for humans to perform, such as:

  • inspecting areas or buildings contaminated by radioactivity,
  • automating data collection,
  • carrying payloads through unknown surfaces.

In industry, the practical applications of such robots are (see figure 1):

  • inspection of construction, pipelines,
  • creation digital twin of buildings,
  • tracking progress and productivity of production process,
  • logistic tasks,
  • entertainment performance and etc.
Figure 1. Industrial Applications for Spot

Today, Spot has been used by many companies around the world. For instance, BP is utilizing Spot to read gauges, look for corrosion, map out the facility, detects a methane leak on its Mad Dog rig. Woodside, one of the largest Australian natural gas producer, is going to use Spot for gauge reading, leak detection, noise anomaly detection, thermal inspection, gas detection, and remote inspection. Swinerton and Brasfield & Gorrie Partners, commercial construction companies, are using Spot to track the general contractor’s progress and productivity.

Boston Dynamics provides Spot’s Software Development Kit (SDK) to increase capabilities and add features not available when using a joystick. SDK can be used to design users own control application, autonomy system and to integrate payloads. Use it to create a custom UI to remotely control Spot’s body posing, velocity, and direction. It’s also possible to integrate sensors or custom payloads using Spot’s mechanical and electrical interfaces. In addition, it is possible to record map, program navigation mission and set specific points on the map for different tasks. The latest release improves acquiring data services. It also features a choreography service, so you can teach to dance the Spot to your favorite music.

In order to customize the Spot for your own mission, you may either use the application that is provided by Boston Dynamics or write your own ones.

Why do we need ROS drivers for Spot?

Boston Dynamics does not provide a simulation tool for Spot, which is crucial for testing apps prior to running them on the real robot. Simulating a robot and its environment:

  • reduces the cost of robot development,
  • speeds up the design of a robot’s control system,
  • eliminates downtime,
  • increases operational reliability,
  • makes it possible to test a robot in a fault situation,
  • reduces physical prototypes,
  • allows you to test a multirobot system at scale.

Clearpath offers a ROS driver to accelerate app development without using the Spot API. This ROS package controls Spot via ROS while reading information from all the onboard sensors integrated payloads (IMUs, additional cameras, radar, lidars, arms, etc.). In cooperation with Boston Dynamics, Clearpath has created a URDF file with the model of the robot. This file can only be used for visualization because it does not take into account the robot’s physical properties.

Webots also provides a custom, non-official simulation of Spot, which in turn may be integrated with its ROS.

Open-source packages

SpotMicro

Spot’s popularity has inspired developers to design smaller and less expensive robots. One of them is the SpotMicro, developed by Deok-yeon Kim. SpotMicro is an open-source project that aims to develop a simulated environment for the implementation of a control algorithm for quadruped robots. Here are the main features:

  • The robot control algorithm is based on MIT Cheetah control with a modification that allows for any combination of forward, lateral, and yaw commands at user-defined step heights, lengths, and speeds.
  • Inverse kinematics control provides a possibility to control the position of the robot’s body.
  • Walking on difficult terrains using RL.
  • Simulation of the robot is possible for both PyBullet and Gazebo.
  • SpotMicro costs about $600.
  • In contrast to Spot, a developer can design and test their own low-level control algorithms.
  • The practical use of this robot is quite limited and is aimed primarily at scientific research of legged robots.
  • SpotMicro project does not provide ready solution for navigation mission, integration payload, obstacle avoidance, stairs climbing.

Yet another Spot simulation package

Clearpath provides a Spot visualization tool for Rviz, but it is not suitable for simulation in Gazebo. SoftServe robotics group modified the visualization tool to meet requirements for the Gazebo environment. We added mass and inertia to all links and transmissions with actuators to joints in a robot model. We also attached contact sensors to the feet.

In order to use the control system implemented in the SpotMicro project, kinematics and dynamics models of the robot were accordingly tuned to represent Spot geometry and dynamics properties. As a result, it is possible to model the robot’s motion using the existing control algorithm implemented in the SpotMicro project.

The repository is available on github. Use the assets to launch robots and play with them in one of the SoftServe offices, or spawn a custom simulated world. Implement your own control algorithm and give spot a paw forward kinematics (see video 1), or control body position using inverse kinematics (see video 2).

In contrast to SpotMicro, SoftServe’s package gives you the ability to run multirobot system where each robot can be allocated for a single task or collaborative job.

Video 1. Spot controlled by forward kinematics in one of the SoftServe’s office
Video 2. Spot controlled by inverse kinematics in one of the SoftServe’s office

champ

You can also use champ for Spot simulation. This open-source package for building new quadrupedal robots has a configured package for simulation of Spot in Gazebo. The control algorithm is also based on MIT Cheetah control.

Unlike the SpotMicro project, champ is fully autonomous using the ROS navigation stack; however, the robot cannot move over uneven surfaces. In champ it is possible to create a map of a user’s own world using gmapping. We found hector slam to be more accurate at simulating complicated object structures.

Video 3 depicts how Spot navigates using champ in our offices. Remember that SpotMicro and champ both do not simulate the ability to climb stairs as the real robot Spot does. Thus, champ should be upgraded or integrated with a tool which provides such a possibility.

Video 3. Spot navigates in the SoftServe’s office using champ package

Towr

Climbing stairs remains a challenge for most quadruped robots. towr, which uses ifopt to optimize trajectory and xpp to visualize the robot, is an open source project that can generate and optimize the trajectory of movement of legged robots on severe surfaces, as well as on stairs.

Hyq and ANYmal are among the robots serviced by towr, an acronym for Trajectory Optimizer for Walking Robots. SoftServe robotics group successfully adapted towr and xpp for Spot. We used the dynamic model provided in towr for Single Rigid Body Dynamics which uses the mass of the robot and a matrix of rotational inertia. In the kinematics model, we specified the positions of hips on the body frame and the joint limits to manage Cartesian control. We use this information to visualize the robot in xpp.

You’ll find the implemented version of Spot’s inverse kinematics visualization in xpp on github. We suggest reading this scientific paper and these tutorials for more details about inverse kinematics for legged robots.

Towr allows you to customize terrain type. For example, we added more steps to an original set of stairs in towr to generate the trajectory for Spot to climb them (video below).

Video 4. Spot climbs stairs in towr

AWS Robomaker

The use of cloud platforms for modeling and testing of robotic applications is a popular trend in the robotics market, where a number of such platforms already exist. One of the more advanced platforms is AWS Robomaker. It allows robotics developers to simulate, test and deploy robotics packages at scale. In addition, the AWS Robomaker:

  • uses ROS extensions,
  • integrates tools like Gazebo, Rviz, and rqt to your robotics applications,
  • simulates, tests and deploys an application with a fleet of robots,
  • simulates a robotics application in various environments.

SoftServe successfully deployed Spot for AWS Robomaker, and it can be found in this github repository. According AWS, the project was split into a robot application and a simulation application to ease deployment. The simulation application features our Ukrainian headquarters office in Lviv (picture below).

Developers can spawn their own world or automatically create user-defined randomized virtual environments using AWS RoboMaker WorldForge.

Figure 2. Spot` simulation package in AWS Robomaker

Conclusions

In order to summarize the developments stage of Spot control and simulation tools, the next points can be emphasizing:

  • Spot by Boston Dynamics can perform many useful tasks to automate technological processes, which in turn brings economic benefits and speeds up the production process.
  • Boston Dynamics provides joystick and SDK to program robot mission for accomplishment of various missions.
  • Clearpath introduced ROS driver that provides possibilities to control Spot via ROS while reading information from all the onboard sensors, odometry, cameras and from integrated payloads.
  • Simulation of Spot is very important because it speeds up the control development process, increases robustness of Spot control by testing the robot in challenging scenarios.
  • Official open-source Spot repositories lack the possibility of simulating the robot’s behavior taking into account its physical properties.
  • SoftServe robotics group introduced the modifications of Spot’s open-source simulation packages to make Spot simulation more realistic.

Contact SoftServe today and learn more about how we can help you teach Spot new tricks.

--

--

Taras Borovets
Taras Borovets

Written by Taras Borovets

R&D Trainee at SoftServe, PhD student at Lviv Polytechnic National University

Responses (2)