Using the Docker image

The easiest way to get started with the controller is to run its Docker image from an Ubuntu Linux distribution.

The Docker image has been tested on Ubuntu LTS releases from 14.04 to 18.04. It is unsupported on macOS or Windows as GUI compatibility (for Choreonoid and RViz) is an issue on these systems.

Running all at once

Depending on your Ubuntu release you might need to give Docker permissions to connect to X11:

xhost +local:docker

Pull and run the Docker image by running:

docker run -it --rm --user ayumi -e DISPLAY=${DISPLAY} -v /tmp/.X11-unix:/tmp/.X11-unix:rw stephanecaron/lipm_walking_controller lipm_walking --floor

Replace lipm_walking --floor by bash to open a shell in the container. You can also make an alias for faster later access:

host:~$ docker run -it --rm --user ayumi -e DISPLAY=${DISPLAY} -v /tmp/.X11-unix:/tmp/.X11-unix:rw stephanecaron/lipm_walking_controller bash
ayumi:/$ lipm_walking --staircase
ayumi:/$ mc_log_ui /tmp/mc-control-LIPMWalking-latest.bin

You should get something like this:

Use the controller via its RViz panel. When you are done, type Control-C in the terminal to close both windows.

See the Docker troubleshooting section if you encounter any problem.

Running processes separately

The lipm_walking script starts Choreonoid and RViz in parallel, but you might want to run them separately, for instance keeping RViz open while restarting the controller once in a while. In this case, run the image in detached mode as follows:

CONTAINER=$(docker run -it -d --user ayumi -e DISPLAY=${DISPLAY} -v /tmp/.X11-unix:/tmp/.X11-unix:rw stephanecaron/lipm_walking_controller bash)

You can now open shells in the running container via docker exec -it ${CONTAINER} bash, where ${CONTAINER} is the shell variable that holds the container identifier.

Open RViz as follows:

host:~$ docker exec -it ${CONTAINER} bash
ayumi:~$ roslaunch lipm_walking_controller display.launch robot:=jvrc1

The robot model will appear in white at first, this is expected. Then, start the controller in a Choreonoid simulation as follows:

host:~$ docker exec -it ${CONTAINER} bash
ayumi:~$ sudo reset-omninames
ayumi:~$ cd /usr/local/share/hrpsys/samples/JVRC1
ayumi:/usr/local/share/hrpsys/samples/JVRC1$ choreonoid --start-simulation sim_mc.cnoid

Drop the --start-simulation argument above if you prefer to start the simulation by clicking on the GUI button. Check out the other Choreonoid projects in the JVRC1 directory for the stair climbing scenario.