Installation of development environment

By installing the development environment on Raspberry Pi, it is possible to develop by self-compiling on Raspberry Pi. (On embedded Linux boards of this size, development by cross compiling is usually usual.)

Therefore, you can compile and execute the RT component code generated by RTC Builder on PC on Raspberry Pi. Unfortunately it seems difficult to install Eclipse and use it at practical speed.

In this section we will install the necessary packages to develop RT components.

(G)Installing OpenRTM-aist

OpenRTM-aist can be installed using apt-get. First, modify sources.list.

 $ sudo vi /etc/apt/sources.list

Add the following line to source list.

 deb http://openrtm.org/pub/Linux/raspbian/ wheezy main

Next, install according to the following procedure.

 # apt-get update
 # apt-get -y --force-yes install gcc g++ make uuid-dev
 # apt-get -y --force-yes install libomniorb4-dev omniidl omniorb-nameserver
 # apt-get -y --force-yes install openrtm-aist openrtm-aist-dev openrtm-aist-example
 # apt-get -y --force-yes install openrtm-aist-python openrtm-aist-python-example

(G)Running sample components

After installing OpenRTM-aist, start the sample component and check whether OpenRTM-aist was installed correctly.

As shown below, execute the name server and ConsoleOut component on the PC side with the name server and ConsoleIn component, Raspberry Pi side. By default, the component connects to the localhost name server, so you can use it to easily access the component without setting up a specific name server in rtc.conf. In the RTSystemEditor on the PC, connect to the PC's name server and the name server on Raspberry Pi and connect the ConsoleIn component and the ConsoleOut component.

sample_component_test.png
Run sample

(G)Running ConsoleOut on Raspberry Pi

After connecting to Raspberry Pi with TeraTerm etc., start the component. Launch ConsoleOut after starting the naming service.

 $ rtm-naming
 $ /usr/share/OpenRTM-x.y/examples/ConsoleOutComp
 or
 $ python /usr/share/OpenRTM-x.y/examples/python/SimpleIO/ConsoleOutComp.py

When installing omniorb-nameserver above, omniORB naming service is started automatically at system startup. However, depending on the startup timing of the name service and startup timing of the network interface, it may not be able to access the name server correctly from the outside. In that case, you may be able to deal with the problem by restarting the name server with the rtm-naming command.

(G)Running ConsoleIn on the PC side

First, start the name server. In Windows, start from "Start Naming Service" under "OpenRTM-aist x.y" > "C++" > "tools" from the start menu. Also, start RTSystemEditor.

namingservice_on_windows.png
Start naming service

Next, start ConsoleIn. Click "ConsoleOut" under "OpenRTM-aist x.y" > "C++" > "examples" to start the ConsoleOut component.

(G)Connection by RTSystemEditor

Click the outlet icon in NameService View on the left side of RTSystemEditor and connect to the name server. First, connect to the name server of the local host. Enter localhost in the connection dialog.

connect_ns_localhost.png
Connect to name server (localhost)

Next, connect to the name server of Raspberry Pi. Click on the connection icon of NameService View again and enter the host name of Raspberry Pi+.local in the dialog.

connect_ns_myhost.png
Connect to name server (Raspberry Pi)

The name service view shows the status of the two name servers and you should see two components, ConsoleIn0 and ConsoleOut0, under each name server. Click on the online editor icon (icon marked ON) on the RTSystemEditor menu bar to open SystemEditor. Drag and drop ConsoleIn0 and ConsoleOut0 from NameService View onto SystemEditor and connect InPort and OutPort respectively.

rtsystemeditor_consoleinout.png
Connection between ConsoleIn and ConsoleOut by RTSystemEditor

Click the green play button on the menu bar to activate the two components and to the state shown above.

Enter the appropriate number from the window of the ConsoleIn component on the PC side.

consolein_window.png
Enter numeric value from ConsoleIn (PC)

Then, the numerical value entered in ConsoleIn appears on the display of ConsoleOut on Raspberry Pi side as shown below.

consoleout_window.png
ConsoleOut (Raspberry Pi) side display

(G)trouble shooting

Depending on the network environment and PC settings, the above procedure may not work. Please refer to the troubleshooting below and solve the problem.

(G)ConsoleOut is not displayed on the service of Raspberry Pi side

Name server problem
When the end server address of the name server is invalid This kind of phenomenon occurs. It may be resolved by restarting the name server with rtm-naming.

In addition, if there are two or more network interfaces such as Raspberry Pi's wired LAN and wireless LAN etc., there are cases to resolve by using only one network used for connection with PC.

Component problem
A name server other than localhost may be registered in the configuration file (rtc.conf) that the component has read. Please set up to register the component on the localhost name server such as described as corba.nameservers: localhost.

Also, if there are two or more network interfaces such as Raspberry Pi's wired LAN and wireless LAN, there are cases to solve by using only one network used for connection with PC.

(G)Can not connect with RTSystemEditor, there is no reaction, etc.

PC side component problem
When there are two or more network interfaces on the PC, this happens when the interface address that Raspberry Pi does not use is used as a component reference.

Check the IP address of the PC with ipconfig from the command prompt and set the IP address of the one used for rtc.conf as follows.

 corba.endpoints: 192.168.11.20

However, in Vista and later Windows, files below C:\Program Files can not be edited easily. Take action by copying (or newly creating) ConsoleIn.exe and rtc.conf in an appropriate directory such as C:\tmp.

Raspberry Pi side component problem
When there are two or more network interfaces such as Raspberry Pi's wired LAN and wireless LAN, etc., if each is connected to a different network, the same problem as the above PC occurs . Check the IP address of the one you use with ifconfig and put it in rtc.conf as follows.

 corba.endpoints: 192.168.11.21

(G)Installing CMake

cmake can be installed using apt-get. Install as a user with root authority.

 $ sudo apt-get update
 $ sudo apt-get install cmake

(G)About installation of Doxygen

In the CMake-based RT component project, it is set to generate documents by using doxygen by default. However, installing doxygen will install LaTeX and others at the same time, which puts pressure on the capacity of the SD card, so we will not install Doxygen in this tutorial.

(G)How to not generate documents

To suppress document generation by doxygen in CMake based RTC project, at the top level CMakeLists.txt,

 option(BUILD_DOCUMENTATION "Build the documentation" ON)
    ↓
 option(BUILD_DOCUMENTATION "Build the documentation" OFF)

Change it as follows.

(G)Installing Doxygen

If the SD card has enough capacity doxygen can be installed with apt-get as follows.

 $ sudo apt-get install doxygen

It will take about ten minutes before Doxygen installation is complete.

(G)Installing Subversion/Git

It is recommended to install subversion / git because it is used frequently to acquire the source code from the outside.

 $ sudo apt-get install subversion git

(G)Test compilation

I will test whether the component can be compiled. There are components for mobile robot Kobuki in the following repository, so check it out and compile it.

(G)Check out the source code

Let's check out the source code.

 $ svn co http://svn.openrtm.org/components/trunk/mobile_robots/kobuki
   : Omission
 A    kobuki/libkobuki/doc/CMakeLists.txt
 A    kobuki/libkobuki/License.rtf
 A    kobuki/libkobuki/CMakeLists.txt
 A    kobuki/rtc.conf
 A    kobuki/CMakeLists.txt
 Checked out revision 2.
 $

kobuki directory How the source code has been checked out, create a build directory, build and install within it.

  $ cd kobuki
  $ mkdir build
  $ cd build
  $ cmake -DCMAKE_INSTALL_PREFIX=/usr ..
  $ make
  $ cd src
  $ make install

kobuki directory How the source code has been checked out, create a build directory, build and install within it....

Download

latest Releases

For Begginers

Windows msi(installer) package (only trying samples)

C++,Python,Java,
Toolsを含む
1.2.1-RELEASE

Development environment is required for RT-Component development. See download page for details.

Number of Projects

Choreonoid

Motion editor/Dynamics simulator

OpenHRP3

Dynamics simulator

OpenRTP

Integrated Development Platform

AIST RTC collection

RT-Components collection by AIST

TORK

Tokyo Opensource Robotics Association

DAQ-Middleware

Middleware for DAQ (Data Aquisition) by KEK