Skip to content
Jiaxin Li edited this page Apr 26, 2015 · 5 revisions

Welcome to the TANGrobot wiki! This project partly use OpenDaVINCI - Open Source Development Architecture for Networked Cyber-Physical System Infrastructures. For further information please see www.christianberger.net/opendavinci. overview

Overview

The provided development and simulation environment is used to simulate robot movements and sensor data like camera, ultra sonic, and infrared sensors. Furthermore, it allows the development and experiments with algorithmic concepts in combination with the simulation environment. All components mentioned below should be in the $installation folder /bin: supercomponent: This component creates a UDP-multicast session which is used to exchange data (called Container) and provides the configuration data to all running components. camgen: This component is used to provide a virtual camera source. irus: This component provides distance data from virtualized ultra sonic and infrared sensors. vehicle: This is the core component to simulate the vehicle movements which influence in turn the virtualized sensor data mentioned above.

The simulation environment bases on a scenario model provided in an SCNX file (cf. folder Scenarios).

Compiling

Download and install Ubuntu (in this case 14.04 LTS) and install its latest package updates:

   $sudo apt-get update
   $sudo apt-get upgrade
   $sudo apt-get dist-upgrade
   $sudo apt-get install dkms

Install OpenCV library: follow http://docs.opencv.org/doc/tutorials/introduction/linux_install/linux_install.html#linux-installation
Install development packages for sources:

   $sudo apt-get install build-essential cmake git

Install development packages for hesperia sources:

   $sudo apt-get install libcv-dev libhighgui-dev freeglut3 libqt4-dev libqwt5-qt4-dev libqwt5-qt4 libqt4-opengl-dev freeglut3-dev qt4-dev-tools libboost-dev libopencv-photo-dev libopencv-contrib-dev

Install development packages for host-tools sources:

   $sudo apt-get install libusb-dev

Install development packages for DataStructureGenerator sources:

   $sudo apt-get install ant openjdk-7-jdk

Clean up installation:

   $sudo apt-get clean
   $sudo apt-get autoremove

Create the target directory /opt/odv and make it writeable:

   $sudo mkdir /opt/odv
   $sudo chown YOUR_USER:YOUR_GROUP /opt/odv

Note: YOUR_USER:YOUR_GROUP are the same as your Ubuntu user-name. Clone the OpenDaVINCI git repository:

   $git clone https://github.com/Jiaxin-li/TANGrobot.git

Change your source folder and create a build directory:

   $cd OpenDaVINCI-msv && ./generateDataStructures.sh && mkdir build

Use cmake to create the build scripts for your build folder:

   $cd build && cmake -D CMAKE_INSTALL_PREFIX=/opt/odv ..

Hereby, /opt/odv is the final install folder. By using cmake, you can also generate the necessary project description files for your favorite IDE (like Eclipse CDT, Visual Studio, ...). Build the OpenDaVINCI sources:

   $make all

Run the tests for OpenDaVINCI (Attention! That takes a couple of minutes!):

   $make test

Install the binaries, libraries, and header files to /opt/odv:

   $make install

Running

Manually driving

Edit ./scripts/manually.sh file, change the path to the install binary path (eg./opt/odv/bin)

Run the modified script.

You can double-click on EnvironmentViewer and change the camera to EgoCar. The camera is now in the vehicle-following mode.

Start the component Controller in cockpit. Click on the button "NOT sending" to activate the vehicle control. Now, click in the lower part of the widget where you see the textual representation of the data structure "VehicleControl". Now, you can use your cursor keys to control the vehicle manually: With cursor up/down, you can increase and decrease the desired speed value for the car; with cursor left/right, you can steer to the left and to the right. In cockpit, you can directly see the values, which are send from cockpit to vehicle.

The steering values are sent in radians; maximum steering wheel angle to the left is ~26° and to the right ~25°.

Automatic Control

Edit ./scripts/autodrive.sh file, change the path to the install binary path (eg./opt/odv/bin)

Run the modified script.

You should see the vehicle turning slowly to the right. Now, you can start developing and experimenting with your control algorithm design in the source code for Driver. In the source file, you will find code examples how to read the distance values from the ultra sonic/infrared sensors, how to read data which is sent from lanedetector.

Recompile

NOTICE:

It is very important to recompile the project after each time when you changed your algorithm and code, by just simply run the recompile.sh script, otherwise the result won't change!

Clone this wiki locally