In what follows, we assume we are starting from a fresh and up-to-date Ubuntu LTS system.
Building the controller
You first need to install all required dependencies either from our Ubuntu mirrors or from source.
Assuming all dependencies are installed, we can install the lipm_walking_controller:
git clone --recursive https:
mkdir -p ~/devel/src/lipm_walking_controller/build
cd ~/devel/src/lipm_walking_controller/build
cmake ../ -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j`nproc`
sudo make install
Simulation with the JVRC-1 model
First edit mc_rtc configuration to make use of the newly installed controller, edit ~/.config/mc_rtc/mc_rtc.yaml:
MainRobot: JVRC1
Enabled: LIPMWalking
Then start the RViZ GUI:
roslaunch mc_rtc_ticker display.launch
You can keep RViZ running between simulations.
Go the project folder for JVRC1:
cd /usr/share/hrpsys/samples/JVRC1
Restart the CORBA nameserver:
./clear-omninames.sh
[ ok ] Stopping omniorb4-nameserver (via systemctl): omniorb4-nameserver.servic.
[ ok ] Starting omniorb4-nameserver (via systemctl): omniorb4-nameserver.service.
omniNames: (0) 2020-01-03 13:40:04.745670: Data file: '/var/lib/omniorb/omninames-tstation.dat'.
omniNames: (0) 2020-01-03 13:40:04.745771: Starting omniNames for the first time.
omniNames: (0) 2020-01-03 13:40:04.745877: Wrote initial data file '/var/lib/omniorb/omninames-tstation.dat'.
omniNames: (0) 2020-01-03 13:40:04.745909: Read data file '/var/lib/omniorb/omninames-tstation.dat' successfully.
omniNames: (0) 2020-01-03 13:40:04.745935: Root context is IOR:010000002b00000049444c3a6f6d672e6f72672f436f734e616d696e672f4e616d696e67436f6e746578744578743a312e300000010000000000000070000000010102000b00000031302e312e37362e37310000f90a00000b0000004e616d6553657276696365000300000000000000080000000100000000545441010000001c000000010000000100010001000000010001050901010001000000090101000354544108000000b4d30e5e010033dc
omniNames: (0) 2020-01-03 13:40:04.745954: Checkpointing Phase 1: Prepare.
omniNames: (0) 2020-01-03 13:40:04.745986: Checkpointing Phase 2: Commit.
omniNames: (0) 2020-01-03 13:40:04.746015: Checkpointing completed.
The output should look similar to the one above. If you see any errors then try again.
You should now be able to run the simulation by (note that you need to be in that specific folder for the Choreonoid simulation to start successfully):
choreonoid --start-simulation sim_mc.cnoid
If everything worked well you should get something like this:
Install dependencies from Ubuntu mirror
Assuming you have already installed ROS:
# Make sure you have required tools
sudo apt-get -qq install apt-transport-https lsb-release ca-certificates gnupg
# Add our key
sudo apt-key adv --keyserver 'hkp://keyserver.ubuntu.com:80' --recv-key 892EA6EE273707C6495A6FB6220D644C64666806
# Add our repository (head versions)
sudo sh -c 'echo "deb https://dl.bintray.com/gergondet/multi-contact-head $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/multi-contact.list'
# Update packages list
sudo apt-get -qq update
# Install required dependencies, Choreonoid, JVRC1 sample project and mc_rtc tools
sudo apt install libeigen3-dev doxygen libboost-all-dev libmc-rtc-dev libcopra-dev mc-openrtm jvrc-choreonoid mc-rtc-utils ros-${ROS_DISTRO}-mc-rtc-tools
You can now build the controller and run a simulation.
Install dependencies from source
JRL dependencies
Suppose we keep source software repositories in ~/devel/src
. We first clone mc_rtc and run its build script to get started:
git clone --recursive https:
./build_and_install.sh
This script will take care of building mc_rtc, its dependencies and the ROS tools required to enjoy the full functionalities of the controller.
We also have to build:
For eigen-quadprog:
git clone --recursive https:
mkdir -p ~/devel/src/eigen-quadprog/build
cd ~/devel/src/eigen-quadprog/build
cmake ../ -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j`nproc`
sudo make install
And then copra:
git clone --recursive https:
mkdir -p ~/devel/src/copra/build
cd ~/devel/src/copra/build
cmake ../ -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j`nproc`
sudo make install
Building Choreonoid
You can test the controller in simulation using Choreonoid and the AIST dynamics simulator. First, install the following packages:
sudo apt-get install -y f2c gettext liblapack-dev libomniorb4-dev libyaml-dev omniidl omniidl-python software-properties-common
Install OpenRTM-aist 1.1.2 packages (manually distributed...):
wget https:
tar xvzf OpenRTM-aist_1.1.2_ubuntu`lsb_release -rs`_amd64_package.tar.gz
cd OpenRTM-aist_1.1.2_ubuntu`lsb_release -rs`_amd64_package
sudo dpkg -i *.deb
wget https:
tar zxvf OpenRTM-aist-Python_1.1.2_ubuntu`lsb_release -rs`_amd64_package.tar.gz
cd OpenRTM-aist-Python_1.1.2_ubuntu`lsb_release -rs`_amd64_package
sudo dpkg -i *.deb
Install the OpenHRP3 library:
git clone --recursive https:
mkdir -p ~/devel/src/openhrp3/build
cd ~/devel/src/openhrp3/util
./installPackages.sh packages.list.ubuntu.`lsb_release -rs`
cd ../build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j`nproc`
sudo make install
Install the hrpsys-base suite of OpenRTM components:
git clone --recursive https:
mkdir -p ~/devel/src/hrpsys-base/build
cd ~/devel/src/hrpsys-base/build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j`nproc`
sudo make install
Install Choreonoid:
git clone --recursive https:
mkdir -p ~/devel/src/choreonoid/build
cd ~/devel/src/choreonoid/build
cmake .. -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j`nproc`
sudo make install
Install mc_openrtm and the sample project
We will need an interface to communicate with our simulated robots. Install the following:
git clone --recursive https:
mkdir -p ~/devel/src/mc_openrtm/build
cd ~/devel/src/mc_openrtm/build
cmake ../ -DCMAKE_BUILD_TYPE=RelWithDebInfo
make -j`nproc`
sudo make install
This will install the interface along with a sample project for the JVRC1 robot.
You can now build the controller and run a simulation.