isri-aist / BaselineWalkingController

Humanoid walking controller with various baseline methods
https://isri-aist.github.io/BaselineWalkingController
BSD 2-Clause "Simplified" License
110 stars 19 forks source link
bipedal-robots controller humanoid legged-robots robotics walking

BaselineWalkingController

Humanoid walking controller with various baseline methods

CI Documentation LICENSE Docker

https://user-images.githubusercontent.com/6636600/201510077-5be6ab58-9671-413a-93c4-9b84caf9735e.mp4

https://user-images.githubusercontent.com/6636600/184788681-10219f2e-cbe9-4e52-a7f7-ec3b0e1d7515.mp4

https://user-images.githubusercontent.com/6636600/184788709-fcb55fa8-fd93-4be3-ba93-d76be6fafe6a.mp4

Features

Quick trial on Docker

  1. (Skip if Docker is already installed.) Install Docker. See here for details.
    $ sudo apt-get install ca-certificates curl gnupg lsb-release
    $ sudo mkdir -p /etc/apt/keyrings
    $ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg
    $ echo \
    "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu \
    $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
    $ sudo apt-get update
    $ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin

To enable GPUs in Docker (i.e., enable the --gpus option in the docker command), install nvidia-docker2. See here for details.

  1. By executing the following commands, the window of the dynamics simulator Choreonoid will open and the robot will walk. Close the Choreonoid window to exit.
    $ docker pull ghcr.io/isri-aist/baseline_walking_controller:latest
    $ xhost +local:

The Docker image is automatically updated on CI from this Dockerfile.

Technical details

This controller is a simple combination of the following existing typical elemental methods in the field of biped robotics:

For more information on the technical details, please see the following papers:

Install

Requirements

Dependencies

This package depends on

This package also depends on the following packages. However, manual installation is unnecessary when this package is installed using wstool as described in Controller installation.

Preparation

  1. (Skip if ROS is already installed.) Install ROS. See here for details.

    $ export ROS_DISTRO=melodic
    $ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list'
    $ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
    $ sudo apt-get update
    $ sudo apt-get install ros-${ROS_DISTRO}-ros-base python-catkin-tools python-rosdep
  2. (Skip if mc_rtc is already installed.) Install mc_rtc. See here for details.

    $ curl -1sLf 'https://dl.cloudsmith.io/public/mc-rtc/stable/setup.deb.sh' | sudo -E bash
    $ sudo apt-get install libmc-rtc-dev mc-rtc-utils ros-${ROS_DISTRO}-mc-rtc-plugin ros-${ROS_DISTRO}-mc-rtc-rviz-panel libeigen-qld-dev

Controller installation

  1. Setup catkin workspace.

    $ mkdir -p ~/ros/ws_bwc/src
    $ cd ~/ros/ws_bwc
    $ wstool init src
    $ wstool set -t src isri-aist/BaselineWalkingController https://github.com/isri-aist/BaselineWalkingController --git -y
    $ wstool update -t src isri-aist/BaselineWalkingController
    $ wstool merge -t src src/isri-aist/BaselineWalkingController/depends.rosinstall
    $ wstool update -t src
  2. Install dependent packages.

    $ source /opt/ros/${ROS_DISTRO}/setup.bash
    $ rosdep install -y -r --from-paths src --ignore-src
  3. Build a package.

    $ catkin build baseline_walking_controller -DCMAKE_BUILD_TYPE=RelWithDebInfo -DENABLE_QLD=ON --catkin-make-args all tests
  4. Setup controller

    $ mkdir -p ~/.config/mc_rtc/controllers
    $ cp ~/ros/ws_bwc/src/isri-aist/BaselineWalkingController/etc/mc_rtc.yaml ~/.config/mc_rtc/mc_rtc.yaml
  5. Setup motion configuration file (optional)

    $ roscd baseline_walking_controller
    $ cd .github/workflows
    $ python ./scripts/mergeConfigs.py ./config/PreviewControlZmp.yaml ./config/OpenLoopMpc.yaml ./config/WalkingOnPlane.yaml > ~/.config/mc_rtc/controllers/BaselineWalkingController.yaml

Simulator installation

$ sudo apt-get install mc-state-observation jvrc-choreonoid

Simulation execution

# Terminal 1
$ source ~/ros/ws_bwc/devel/setup.bash
$ roscore
# Terminal 2
$ source ~/ros/ws_bwc/devel/setup.bash
$ cd /usr/share/hrpsys/samples/JVRC1
$ ./clear-omninames.sh
$ choreonoid sim_mc.cnoid --start-simulation
# Terminal 3
$ source ~/ros/ws_bwc/devel/setup.bash
$ roslaunch baseline_walking_controller display.launch

Documents

BaselineWalkingController Tips: a collection of tips for BaselineWalkingController users

Controllers for motions beyond walking

The following controllers are based on or developed with the same philosophy as BaselineWalkingController.