Difference between revisions of "API2"

From RobotinoWiki
(API2 packages for Robotino)
(API2 packages for Robotino)
Line 10: Line 10:
 
In order to use the API2 you need to replace packages on Robotino. The easiest way is to give Robotino Internet access. The file '''/etc/apt/sources.list''' should look like this.
 
In order to use the API2 you need to replace packages on Robotino. The easiest way is to give Robotino Internet access. The file '''/etc/apt/sources.list''' should look like this.
 
<pre>
 
<pre>
deb http://doc.openrobotino.org/download/packages ./
+
deb http://doc.openrobotino.org/download/packages/i386 ./
 
deb http://old-releases.ubuntu.com/ubuntu/ jaunty main restricted
 
deb http://old-releases.ubuntu.com/ubuntu/ jaunty main restricted
 
deb-src http://old-releases.ubuntu.com/ubuntu/ jaunty main restricted
 
deb-src http://old-releases.ubuntu.com/ubuntu/ jaunty main restricted
Line 16: Line 16:
  
 
<pre>
 
<pre>
echo "deb http://doc.openrobotino.org/download/packages ./" > /etc/apt/sources.list
+
echo "deb http://doc.openrobotino.org/download/packages/i386 ./" > /etc/apt/sources.list
 
echo "deb http://old-releases.ubuntu.com/ubuntu/ jaunty main restricted" >> /etc/apt/sources.list
 
echo "deb http://old-releases.ubuntu.com/ubuntu/ jaunty main restricted" >> /etc/apt/sources.list
 
echo "deb-src http://old-releases.ubuntu.com/ubuntu/ jaunty main restricted" >> /etc/apt/sources.list
 
echo "deb-src http://old-releases.ubuntu.com/ubuntu/ jaunty main restricted" >> /etc/apt/sources.list
Line 36: Line 36:
 
Alternatively you can download the packages to your computer. Replace * by the latest version.
 
Alternatively you can download the packages to your computer. Replace * by the latest version.
 
<pre>
 
<pre>
wget http://doc.openrobotino.org/download/packages/rec-rpc-qt4.5.0_*_i386.deb
+
wget http://doc.openrobotino.org/download/packages/i386/rec-rpc-qt4.5.0_*_i386.deb
wget http://doc.openrobotino.org/download/packages/robotino-common_*_i386.deb
+
wget http://doc.openrobotino.org/download/packages/i386/robotino-common_*_i386.deb
wget http://doc.openrobotino.org/download/packages/robotino_daemons_*_i386.deb
+
wget http://doc.openrobotino.org/download/packages/i386/robotino_daemons_*_i386.deb
wget http://doc.openrobotino.org/download/packages/robotino-api_*_i386.deb
+
wget http://doc.openrobotino.org/download/packages/i386/robotino-api_*_i386.deb
wget http://doc.openrobotino.org/download/packages/robotino-examples_*_i386.deb
+
wget http://doc.openrobotino.org/download/packages/i386/robotino-examples_*_i386.deb
 
</pre>
 
</pre>
  

Revision as of 17:12, 21 October 2011

The new API2 is currently under development. The main new features are

  • Support for up to 4 cameras
  • Support for camera controls like brightness, contrast, auto white balance ... The supported controls depend on the camera used
  • Integrated web server for controlling Robotino by a web browser or your smartphone
  • Easy build process due to minimal dependencies to external libraries

The new API2 is based on a RPC like infrastructure. The REC-RPC library is a interprocess communication middleware similar to ROS. It is based on Qt and does not have any other dependencies.

API2 packages for Robotino

In order to use the API2 you need to replace packages on Robotino. The easiest way is to give Robotino Internet access. The file /etc/apt/sources.list should look like this.

deb http://doc.openrobotino.org/download/packages/i386 ./
deb http://old-releases.ubuntu.com/ubuntu/ jaunty main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ jaunty main restricted
echo "deb http://doc.openrobotino.org/download/packages/i386 ./" > /etc/apt/sources.list
echo "deb http://old-releases.ubuntu.com/ubuntu/ jaunty main restricted" >> /etc/apt/sources.list
echo "deb-src http://old-releases.ubuntu.com/ubuntu/ jaunty main restricted" >> /etc/apt/sources.list

After setting up the sources.list

apt-get update
apt-get install rec-rpc-qt4.5.0 robotino-common robotino-daemons robotino-api robotino-examples

Questions during the installation process

Install these packages without verification [y/N]? y
Do you want to install symlinks? -> Yes

This will remove the API1 daemons and install the API2 counterparts. Reboot the system when installation is finished.

Alternatively you can download the packages to your computer. Replace * by the latest version.

wget http://doc.openrobotino.org/download/packages/i386/rec-rpc-qt4.5.0_*_i386.deb
wget http://doc.openrobotino.org/download/packages/i386/robotino-common_*_i386.deb
wget http://doc.openrobotino.org/download/packages/i386/robotino_daemons_*_i386.deb
wget http://doc.openrobotino.org/download/packages/i386/robotino-api_*_i386.deb
wget http://doc.openrobotino.org/download/packages/i386/robotino-examples_*_i386.deb

Then copy the files to Robotino using scp or ftp. On Robotino do

dpkg -i rec-rpc-qt4.5.0_*_i386.deb
dpkg -i robotino-common_*_i386.deb
dpkg -i --auto-reconfigure robotino-daemons_*_i386.deb
dpkg -i robotino-api_*_i386.deb
dpkg -i robotino-examples_*_i386.deb

API2 for Windows

API2 for Linux

Install the packages

  • robotino-api
  • robotino-examples
  • libqt4-dev
apt-get install robotino-api robotino-examples libqt4-dev

Pre build binaries are in /usr/local/robotino/examples/bin

Build the circle example see section below.

Building the API2 examples on Robotino

mkdir -p build/circle
cd build/circle
ccmake /usr/local/robotino/examples/src/c++/circle/
configure(c) 2x, generate(g)
make
target/example_circle 127.0.0.1

Right now you can run the example as root only. If you change permissions manually

chmod 777 /tmp/*

you can run the example as user robotino.

Build API2 yourself

Windows:

  • Get the latest Qt libraries from Digia
  • Alternatively build Qt from source

Build REC-RPC

Get the source via SVN:

svn co http://svn.servicerobotics.eu/rec_rpc/trunk source/rec_rpc

Configure the build environment with cmake, build and install:

mkdir build/rec_rpc
cd build/rec_rpc
ccmake ../../source/rec_rpc
make install

Set the environment variable REC_RPC_DIR to the installation directory. The environment variable is used by the other packages to find the FindRecRpc.cmake scripts.