Running BDI controller demo


Overview

This tutorial demonstrates how to start the 5-step behavior demo implemented in the Boston Dynamics Atlas Behavior Library. Assuming DRCSim 2.7 or above was installed on your system, Atlas simulation behavior library documentations can be found locally, simply point your browser here. See also the Keyboard teleop walking tutorial.

Install DRC Simulator

Click to see the instructions for installing the DRC simulator and associated utilities. This tutorial requires drcsim-2.7 or later.

Launch the DRC Simulator

Launch the simulator using the atlas.launch

source /usr/share/drcsim/setup.sh
VRC_CHEATS_ENABLED=1 roslaunch drcsim_gazebo atlas.launch

with the environment variable VRC_CHEATS_ENABLED set to 1.

The robot should start with individual joints position PID controlled:

To start the walking behavior, within a separate terminal, execute:

source /usr/share/drcsim/setup.sh
rosrun drcsim_gazebo 5steps.py

The robot will execute a simple 5 step behavior.

5steps.py Explained

Examining 5steps (or 5steps.py for DRC v3.1 and below)

mode.publish("harnessed")
control_mode.publish("stand-prep")
rospy.sleep(5.0)
mode.publish("nominal")
rospy.sleep(0.3)
control_mode.publish("stand")
rospy.sleep(1.0)
control_mode.publish("walk")

The core of it simply publishes over ros topic a set of string topics to perform mode switching in VRC simulation world plugin and in Atlas model plugin.

The basic sequence includes:

  1. harnessed: Tell the VRCPlugin to tether the robot inertially with its feet slight off the ground.
  2. stand-prep: Tell the controller within AtlasPlugin to go into a passive stance pose.
  3. nominal: Instructs the VRCPlugin to release the robot from its inertial tether. Atlas will fall the the ground.
  4. stand: Instructs the controller within AtlasPlugin to begin its active balancing stand-behavior.
  5. walk: Instructs the controller within AtlasPlugin to begin its 5 step walking behavior.