User Tools

Site Tools


install_choreonoid

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
install_choreonoid [2018/07/25 00:50] yuhangheinstall_choreonoid [2018/08/15 11:08] (current) – [Install Choreonoid] yuhanghe
Line 10: Line 10:
 **Keywords:** Hubo 2, Ubuntu, Choreonoid, Simulator **Keywords:** Hubo 2, Ubuntu, Choreonoid, Simulator
 \\ \\
-{{ :yuhang:hubo2:choreonoid.jpg?500 |}}+{{ :yuhang:hubo2:choreonoid.jpg?700 |}}
 \\ \\
 The photo above depicts Choreonoid. Choreonoid is an open-source integrated GUI software for robots. It is being developed by Shin’ichiro Nakaoka et al of the National Institute of Advanced Industrial Science and Technology (AIST) in Japan. By default, the tool includes a choreography function and a dynamics simulator. Other functionality can be added, as the tool also functions as a framework for developing GUI applications for robots. The photo above depicts Choreonoid. Choreonoid is an open-source integrated GUI software for robots. It is being developed by Shin’ichiro Nakaoka et al of the National Institute of Advanced Industrial Science and Technology (AIST) in Japan. By default, the tool includes a choreography function and a dynamics simulator. Other functionality can be added, as the tool also functions as a framework for developing GUI applications for robots.
Line 24: Line 24:
 \\ \\
   * Interested in learning how to simulate Hubo 2   * Interested in learning how to simulate Hubo 2
 +\\
 +  * Interested in installing and using QT
 </fc> </fc>
 \\ \\  \\ \\ 
 The rest of this tutorial is presented as follows: The rest of this tutorial is presented as follows:
-  * [[install_ubuntu_xenomai#install_ubuntu|Install Ubuntu]] +  * [[install_choreonoid#install_qt|Install QT]] 
-  * [[install_ubuntu_xenomai#install_xenomai_3.0|Install Xenomai 3.0]] +  * [[install_choreonoid#install_choreonoid |Install Choreonoid]] 
-  * [[install_ubuntu_xenomai#set_default_boot_to_xenomai|Set Default Boot to Xenomai]] +  * [[install_choreonoid#hubo_2_walkready_demo|Hubo 2 WALKREADY Demo]] 
-  * [[install_ubuntu_xenomai#final_words|Final Words]]+  * [[install_choreonoid#final_words|Final Words]] 
 + 
 +===== Install QT ===== 
 + 
 +The software on Hubo 2 and DRC-Hubo are developed through QT. Therefore, it is necessary to install QT on Linux first. 
 + 
 +  *Download QT verson 5.7.0 from the [[https://download.qt.io/archive/qt/ | website]] 
 +  *Open terminal and change directory to where the downloaded file is located and then run: 
 +    *''sudo chmod 777 qt-opensource-linux-x64-5.7.0.run'' 
 +    *''sudo ./qt-opensource-linux-x64-5.7.0.run'' 
 +  *During the installation wizard, check that QT will be installed in the ''/opt'' directory and check all the installation items. {{ :yuhang:hubo2:screenshot_from_2018-06-29_10-16-04.png?400 |}} 
 +  *For QT program to work with Xenomai. Xenomai debug.h file need to be modified. Run: 
 +    *''sudo nautilus'' 
 +  *Go to the ''computer/usr/include/xenomai/copperplate/'' folder and open the debug.h file. 
 +  *Comment out the two #define debug lines. 
 +{{ :yuhang:hubo2:screenshot_from_2018-06-28_16-27-05.png?500 |}} 
 + 
 +===== Install Choreonoid ===== 
 + 
 +The necessary files for running Hubo 2 simulation in Choreonoid can be found in the Hubo2/Choreonoid Install File folder in the Github repository. 
 +Contact me for access to the Github files. 
 + 
 +It is recommended to use Choreonoid version 1.5 which can be downloaded through Choreonoid' [[http://choreonoid.org/en/download.html | official site]]. 
 +The latest version may not be compatible with current codes. 
 + 
 +  *Download the compressed file from download page and extract the file into the home directory. 
 +  *rename the folder to ''choreonoid''.{{ :yuhang:hubo2:screenshot_from_2018-06-28_19-33-50.png?500 |}} 
 +  *Open a terminal and enter the following commands: 
 +    *''cd ~/choreonoid/misc/script'' 
 +    *''./install-requisites-ubuntu-16.04.sh'' 
 +    *''cmake ~/choreonoid'' 
 +    *''ccmake ~/choreonoid'' 
 +  *The “ccmake” executable is the CMake curses interface. Project configuration settings may be specified interactively through this GUI. 
 +  *Use the keyboard arrow key to scroll down the list to find ''BUILD_ODE_PLUGIN''
 +  *Press the ''[Enter]'' key to switch the configuration to on. 
 +  *Press ''[c]'' to configure the setting and then ''[g]'' to generate the setting file and save. Finally, press ''[e]'' to exit.{{ :yuhang:hubo2:screenshot_from_2018-06-28_19-41-47.png?500 |}} 
 +  *In the terminal enter: 
 +    *''sudo make install'' 
 +  *After the installation is complete, paste the ''OKKEE'' folder from Github into the ''~choreonoid/'' folder 
 +  *Paste ''HUBOPLUGIN'' from Github into the ''~choreonoid/sample'' folder. Alternatively, use the following commands while terminal is in the directory with ''OKKEE'' and ''HUBOPLUGIN'' folders. 
 +    *''cp –R OKKEE ~/choreonoid'' 
 +    *''cp –R HUBOPLUGIN ~/Choreonoid/sample'' 
 +  *Go to ~chorenoid/sample/HUBOPLUGIN folder and edit HuboPlugin.cpp 
 +  *On line 14 edit the include header to the location of Hubo's codes 
 +{{:yuhang:ires2018:screenshot_from_2018-08-16_03-06-15.png?700|}} 
 +  *Enter the following commands to install Choreonoid with Hubo Plugin 
 +    *''cd ~/choreonoid'' 
 +    *''cmake .'' 
 +    *''sudo make install'' 
 + 
 +===== Hubo 2 WALKREADY Demo =====
  
-===== Install Ubuntu =====+====Hubo 2 WalkReady Demo ==== 
 +This part of tutorial will guide readers through the process for running the Daemon, PODOGUI, and WalkReady AL for Hubo 2 in Choreonoid.
  
-  *Download Ubuntu ISO from [[https://www.ubuntu.com/download/desktop? | Ubuntu's official website]]. +For Daemon to work properly with Choreonoid, some parts of the code must be changedA modified version of Daemon that works with Choreonoid is already included with Github source code inside podo_hubo_lower_tele folder.
-  *Write the ISO file to a bootable USB device. +
-  *For Windows user: download USB formatting tools such as [[http://www.pendrivelinux.com/universal-usb-installer-easy-as-1-2-3/ | Universal USB Installer]] and follow the install process to format USB device with Ubuntu ISO. {{ :yuhang:hubo2:usb_installer.png?500 |}} +
-  *Plug the USB device into a USB port. +
-  *Power on the computer. +
-  *Press F2 to enter BIOS Setup and select the bootable USB device. +
-  *Follow the standard Ubuntu installation process. Detail can be found in [[https://tutorials.ubuntu.com/tutorial/tutorial-install-ubuntu-desktop#4 | Ubuntu's tutorial]].+
  
-===== Install Xenomai 3.0 =====+Use the QT Creator to build and run the programs. Then, load the Hubo 2 model and run simulator on Choreonoid.
  
-  *After ubuntu is installed, connect to the Internet, search for update in the search window, run the software updater, and perform all updates+  *Open the QT Creator through search window. 
-  *Open the terminal (Ctrl + Alt + T) and enter the following in order+  *Go to File -> Session Manager and create a new session. The name does not matter.  
-     ''sudo apt-get install devscripts debhelper dh-kpatches findutils'' +  *Click on the new session that was created to move to Edit tab.{{ :yuhang:hubo2:screenshot_from_2018-06-28_20-57-27.png?300 |}} 
-    *  ''sudo apt-get install kernel-package libncurses5-dev fakeroot zlib1g-dev''{{ :yuhang:hubo2:screenshot_from_2018-06-28_14-49-22.png?500 |}} +  *Right click within project tab -> Load Project or [Ctrl + Shift + O]. 
-  *Search for Ubuntu Software in the search box and run it. +  *Navigate to the podo_hubo_lower_tele folder -> src -> _Daemon_Chorenoid and open Daemon_Choreonoid.pro.{{ :yuhang:hubo2:screenshot_from_2018-06-28_21-04-45.png?500 |}}  
-  *In Ubuntu Softwaresearch and install synaptic package manager.{{ :yuhang:hubo2:screenshot_from_2018-06-28_14-47-21.png?500 |}} +  *Repeat the same process and open PODOGUI.pro,ALPrograms.pro and PODOLauncher.pro. {{ :yuhang:hubo2:screenshot_from_2018-06-28_21-07-58.png?500 |}} 
-  *In the synaptic package manager, search for the follow packages and check them for installationChoose ''Name'' during search options. +  *Editing following files in PODPLauncher.pro 
-    *''build-essential'' +    *Qlockfile.h 
-    *''automake'' +      * Replace ''include “../../src/corelib/io/qlockfile.h"'', with ''include “/opt/Qt5.7.0/5.7/Src/qtbase/corelib/io/qlockfile.h"''. 
-    *''libtool'' +    *main.cpp 
-    *''libpopt-dev'' +      * Replace ''include “../../src/_PODOLauncher/qlockfile.h"'' with ''include <qlockfile.h>''. 
-    *''libglu1-mesa-dev'' +    *ui_launcherDialog.h: 
-    *''libglade2-dev''{{ :yuhang:hubo2:screenshot_from_2018-06-28_14-45-50.png?500 |}} +      * Replace ''QtGui'' in the file with ''QtWidgets''. 
-  *Click Apply to install the packages. +      Remove all instances of ''QCoreApplication::UnicodeUTF8''
-  *Copy the RTOS folder downloaded from Github repository to the following directory +  *On the bottom left of QT Creator, make sure each program is configured for Release on build. {{ :yuhang:hubo2:screenshot_from_2018-06-29_10-43-48.png?200 |}} 
-    *''/usr/local/src/''{{ :yuhang:hubo2:screenshot_from_2018-06-28_15-21-09.png?500 |}} +  *Click on the Project tab to configure build options.{{ :yuhang:hubo2:screenshot_from_2018-06-29_10-38-44.png?500 |}} 
-  *Open a new terminal, type ''sudo passwd root'', and set the password to 'rainbow'Enter ''su'' and enter password to enter admin mode. +  *Edit the build directory for each program. 
-    *''sudo passwd root'' +  *For ALPrograms: 
-    *''su'' +    *''../../build/ALBuild'' 
-  *Enter the following command in terminal. +  *For Daemon_Choreonoid: 
-    *''cd /usr/local/src/RTOS/Linux dpkg -i *.*'' +    *''../../build/_DaemonChoreonoidBuild'' 
-    *''reboot'' +  *For PODOGUI: 
-  *During the reboot, press ESC to access Advanced Ubuntu mode, then select the Xenomai menu at the topCheck the boot sequence number of Xenomai (usually 6)+    *''../../build/PODOGUIBuild'' 
-  *Open a terminal and type uname -a to verify that xenomai has booted normally. +  *For PODOLauncher: 
-    *''uname -a''{{ :yuhang:hubo2:screenshot_from_2018-06-28_15-28-52.png?500 |}} +    *''../../build/PODOLauncherBuild'' 
-  *Activate ''su'' and enter: +  *For Daemon_Chorenoid, navigate to Run configuration and check ''Run in terminal'' option. {{ :yuhang:hubo2:screenshot_from_2018-06-29_10-52-21.png?500 |}} 
-    *''cd /usr/local/src/RTOS/Xenomai dpkg -i *.*'' +  *On the top option toolbarclick on Build -> Clean All then Build -> Build AllIf ''red'' error messages did not appear that means the build was successful.{{ :yuhang:hubo2:screenshot_from_2018-06-29_10-58-34.png?500 |}} 
-    *''exit'' +  *Open a terminal and enter the following command to start Choreonoid: 
-    *''sudo adduser [username] root'' +    *''choreonoid''{{ :yuhang:hubo2:screenshot_from_2018-06-29_11-00-18.png?500 |}} 
-    *''sudo adduser [username] xenomai'' +  *On the top toolbar, click File -> Open Project and navigate to the OKKEE folder.{{ :yuhang:hubo2:screenshot_from_2018-06-29_11-04-24.png?500 |}} 
-    *''su'' +  *Select ''test_original_1'' to open the Hubo 2 model and simulator.{{ :yuhang:hubo2:screenshot_from_2018-06-29_11-04-41.png?500 |}} 
-    *''cd /usr/lib/xenomai/testsuite'' +  *Go back to QT Creator. Right click on Daemon_Choreonoid in the project tree and select ''Run''. A terminal should open, running the Daemon_Choreonoid program.{{ :yuhang:hubo2:screenshot_from_2018-06-29_11-09-31.png?500 |}} 
-    *''./latency'' +  *Right click on PODOGUI and click ''Run''. The PODOGUI should open.{{ :yuhang:hubo2:screenshot_from_2018-06-29_11-27-32.png?500 |}} 
-{{ :yuhang:hubo2:screenshot_from_2018-06-28_15-33-45.png?500 |}} +  *Click on Connection in PODOGUI and click on Connect.{{ :yuhang:hubo2:screenshot_from_2018-06-29_11-30-46.png?500 |}} 
-===== Set Default Boot to Xenomai ===== +  *Click on Module, choose WalkReady AL and click ''Open Process''. If light turned green that means WalkReady AL was successfully opened.{{ :yuhang:hubo2:screenshot_from_2018-06-29_11-32-37.png?500 |}} 
-Set the default boot to Xenomai so the Ubuntu system will automatically boot with Xenomai environment.+  *Go back to Choreonoid window, click on ''Start Simulation from the Beginning'' button on top of Scene view to start simulation.  Hubo 2 should start moving toward default position.  
 +  *In PODOGUI, navigate to Walking tab and click on ''Walk Ready Pos''. Hubo 2 should move toward Walk Ready Position in Choreonoid as well.{{ :yuhang:hubo2:screenshot_from_2018-06-29_11-42-10.png?500 |}}{{ :yuhang:hubo2:screenshot_from_2018-06-29_11-43-42.png?500 |}}
  
-  *Open a new terminal and run the command: 
-    *''sudo gedit /etc/default/grub'' 
-  *In the executed gedit file, change the non-zero value of GRUB_DEFAULT to "1> 6". Number 6 is the usual boot sequence number of Xenomai.{{ :yuhang:hubo2:screenshot_from_2018-06-28_15-39-48.png?500 |}} 
-  *Save and close the window and run: 
-    *''sudo update-grub'' 
-  *Reboot the computer again. Enter the following to terminal: 
-    *''uname -a'' 
-The Ubuntu should have started in Xenomai environment. 
 ===== Final Words ===== ===== Final Words =====
  
-The purpose of this tutorial was to guide reader through the process of installing Ubuntu and set up Xenomai environment in preparation for working with Hubo 2.+The purpose of this tutorial was to guide reader through the process of installing QT and Choreonoid simulator in preparation for working with Hubo 2.
 \\ \\  \\ \\ 
 For questions and comments, email <hey6@unlv.nevada.edu> For questions and comments, email <hey6@unlv.nevada.edu>
install_choreonoid.1532505047.txt.gz · Last modified: by yuhanghe