How to Use ControlIt! with atlas_legs_plain (Joint Position)

This section describes how to control the joint positions of atlas_legs_plain. We call the robot “atlas_legs_plain” because it does not contain all of the supporting infrastructure like Boston Dynamics' controllers that originally came with it. Here we are directly controlling the model without going through this additional infrastructure.

Generate the URDF

To generate the URDF:

$ roscd atlas_legs_plain_controlit/models
$ ./generate_atlas_legs_plain_controlit_urdfs.sh

Launch Using a Single Command

To run the demo using a single command:

$ reset && roslaunch atlas_legs_plain_controlit simulate_jpos.launch

Launch Using Multiple Commands

Start roscore:

$ roscore

Start the shared memory manager:

$ rosrun shared_memory_interface shared_memory_manager

Open a new terminal and load the necessary parameters by executing one of the following commands:

$ roslaunch atlas_legs_plain_controlit load_atlas_legs_plain_parameters_jpos.launch

The command above will load the parameters and then exit.

Start the simulation:

$ roslaunch atlas_legs_plain_controlit gazebo.launch

Gazebo will appear with a Atlas' legs as shown below.

Start the controller:

$ roslaunch atlas_legs_plain_controlit start_controlit.launch

The above command will start ControlIt! and block. Hit play in Gazebo to start the demo. You should see the robot stabilize in the following pose:

To view the robot in RViz:

$ rosrun rviz rviz

Here is what you should see:

Usage Notes

You can change the joint position reference (goal) by executing the following command:

$ rostopic pub /atlas_legs_plain_controller/JPosTask/goalPosition std_msgs/Float64MultiArray '{layout: {dim: [{label: "x", size: 12, stride: 12}], data_offset: 0}, data: [0.0, 0.0, 0.0, 0.6, -0.3, 0.0, 0.0, 0.0, 0.0, 0.6, -0.3, 0.0]}'

For example, to make it squat:

$ rostopic pub /atlas_legs_plain_controller/JPosTask/goalPosition std_msgs/Float64MultiArray '{layout: {dim: [{label: "x", size: 12, stride: 12}], data_offset: 0}, data: [0.0, 0.0, -0.9, 1.8, -0.9, 0.0, 0.0, 0.0, -0.9, 1.8, -0.9, 0.0]}'

Here's what you should see in Gazebo: