mc-rtc-superbuild extension for hrpsys and choreonoid
This repository is an extension repository for mc-rtc-superbuild.
It builds:
- openrtm-aist and openrtm-aist-python from openrtm-aist.cmake
- openhrp3 and hrpsys-base from hrpsys-base.cmake
- choreonoid from choreonoid.cmake
- mc_openrtm and mc_udp from mc-openrtm.cmake
- Tested with Ubuntu 20.04 / ROS Noetic
First, install ROS. See here for details.
Install ccache and increase the cache size for ccache.
$ sudo apt install ccache
$ ccache -M 10G
Clone all sources, build, and install.
$ mkdir ~/workspace
$ cd ~/workspace
$ git clone https://github.com/mc-rtc/mc-rtc-superbuild
$ git clone git@github.com:isri-aist/hrpsys-superbuild mc-rtc-superbuild/extensions/hrpsys-superbuild
$ cd mc-rtc-superbuild
$ ./utils/bootstrap-linux.sh
$ mkdir -p build && cd build
$ cmake ../ -DSOURCE_DESTINATION=$HOME/workspace/src/ -DBUILD_DESTINATION=$HOME/workspace/build -DCMAKE_INSTALL_PREFIX=$HOME/workspace/install -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_C_COMPILER_LAUNCHER="ccache" -DCMAKE_CXX_COMPILER_LAUNCHER="ccache"
$ cmake --build .
Add the following line to ~/.bashrc
.
export PATH=$HOME/workspace/install/bin:$PATH
export PKG_CONFIG_PATH=$HOME/workspace/install/lib/pkgconfig:$PKG_CONFIG_PATH
export LD_LIBRARY_PATH=$HOME/workspace/install/lib:$LD_LIBRARY_PATH
export PYTHONPATH=$HOME/workspace/install/lib/python3.8/site-packages:$PYTHONPATH
source $HOME/workspace/src/catkin_ws/devel/setup.bash
Put the following contents in ~/.config/mc_rtc/mc_rtc.yaml
.
MainRobot: JVRC1
Timestep: 0.005
Enabled: Posture
Run a kinematics simulation.
# Terminal 1
$ roscore
# Terminal 2
$ mc_rtc_ticker
# Terminal 3
$ roslaunch mc_rtc_ticker display.launch
Run a dynamics simulation.
# Terminal 1
$ roscore
# Terminal 2
$ cd ~/workspace/install/share/hrpsys/samples/JVRC1/
$ ./clear-omninames.sh # Only needed the first time after booting Ubuntu
$ choreonoid sim_mc.cnoid --start-simulation
# Terminal 3
$ roslaunch mc_rtc_ticker display.launch