Spot Simulation Tools

  8 min read

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).

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, and StarlETH. There’s also the ANYmal, AlphaDog, LittleDog, WildCat, and Spot.

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

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:

illustration

 

Industrial Applications for Spot.

 

  • inspecting areas or buildings contaminated by radioactivity
  • automating data collection
  • carrying payloads across unknown surfaces

Boston Dynamics provides Spot’s Software Development Kit (SDK) to increase capabilities and add features not available when using a joystick. The SDK can be used to design your 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. 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.

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. 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 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 aimed primarily at scientific research of legged robots.

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 SoftServe’s offices.
Video 2. Spot controlled by inverse kinematics in one of SoftServe’s offices.

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.

Video 3. Spot navigates a SoftServe office using champ.

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
  • 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.

illustration
Spot’s simulation package in AWS Robomaker.

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