Last active
February 10, 2022 09:28
-
-
Save cfpperche2/2e68ac44a081aaa0628b to your computer and use it in GitHub Desktop.
Ubuntu 14.04 + Kernel 3.14.17 + Xenomai 2.6.4 + RTnet-master + ROS Indigo + Orocos 2.8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# This is an installation tutorial of the OROCOS v2.8 with the ROS Indigo and | |
# the Xenomai 2.6.4 on Ubuntu 14.04. | |
# The following is adapted from: | |
# https://help.ubuntu.com/community/Kernel/Compile#Alternate_Build_Method:_The_Old-Fashioned_Debian_Way | |
# http://www.xenomai.org/documentation/xenomai-2.6/README.INSTALL | |
# Update kernel | |
sudo apt-get install linux-image-generic-lts-trusty | |
# Update Xorg | |
sudo apt-get install xserver-xorg-lts-trusty | |
# Update GCC | |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test | |
sudo apt-get update | |
sudo apt-get install gcc-4.8 g++-4.8 | |
sudo update-alternatives --remove-all gcc | |
sudo update-alternatives --remove-all g++ | |
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20 | |
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20 | |
sudo update-alternatives --config gcc | |
sudo update-alternatives --config g++ | |
# Install dependencies | |
sudo apt-get install fakeroot kernel-package makedumpfile build-essential crash kexec-tools kernel-wedge git-core libncurses5 libncurses5-dev libelf-dev binutils-dev asciidoc devscripts debhelper dh-kpatches autotools-dev autoconf automake libtool | |
sudo apt-get build-dep linux | |
# Reboot | |
sudo reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Prepare Xenomai source | |
cd /usr/src | |
sudo git clone --depth=1 git://git.xenomai.org/xenomai-2.6.git xenomai-2.6.4 | |
# sudo wget http://download.gna.org/xenomai/stable/xenomai-2.6.4.tar.bz2 | |
# sudo tar xfv xenomai-2.6.4.tar.bz2 | |
sudo wget https://www.kernel.org/pub/linux/kernel/v3.x/linux-3.14.17.tar.xz | |
sudo tar xfv linux-3.14.17.tar.xz | |
sudo ln -s /usr/src/linux-3.14.17 /usr/src/linux | |
sudo cp -vi /boot/config-`uname -r` linux/.config | |
sudo xenomai-2.6.4/scripts/prepare-kernel.sh --arch=x86_64 --adeos=/usr/src/xenomai-2.6.4/ksrc/arch/x86/patches/ipipe-core-3.14.17-x86-4.patch --linux=/usr/src/linux-3.14.17 | |
#Kernel Options | |
#In Power management and ACPI options | |
# ACPI (Advanced Configura- tion and Power Interface) Support turn of Processor, | |
# CONFIG_ACPI_PROCESSOR is not set | |
# CPU Frequency scaling turn off CPU Frequency scaling, | |
# CONFIG_CPU_FREQ is not set | |
# ACPI options turn off CPU idle PM support, | |
# CONFIG_CPU_IDLE | |
# CONFIG_ARCH_NEEDS_CPU_IDLE_COUPLED | |
#Kernel hacking turn off KGDB: kernel debugger, | |
# CONFIG_KGDB is not set | |
#Turn off Virtualization, | |
# CONFIG_VIRTUALIZATION is not set | |
#Real-time sub-system | |
# Nucleus | |
# SET Number of registry slots = 4096 | |
cd linux | |
sudo make menuconfig | |
sudo make-kpkg --bzimage --initrd --append-to-version=-xenomai-2.6.4 -j8 kernel-image kernel-headers modules | |
# Install kernel | |
cd .. | |
sudo dpkg -i linux-image-*.deb | |
sudo dpkg -i linux-headers-*.deb | |
sudo update-initramfs -c -k "3.14.17-xenomai-2.6.4" | |
sudo update-grub | |
# Reboot | |
sudo reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Set user space Xenomai support | |
cd /usr/src | |
sudo mkdir build_xenomai-2.6.4 | |
cd build_xenomai-2.6.4 | |
sudo ../xenomai-2.6.4/configure --enable-shared --enable-smp --enable-x86-sep | |
sudo make -j8 | |
sudo make install | |
cd /etc/ld.so.conf.d/ | |
sudo touch xenomai.conf | |
sudo sh -c "echo '/usr/xenomai/lib' >> xenomai.conf" | |
sudo ldconfig | |
echo "export PATH=$PATH:/usr/xenomai/bin" >> ~/.bashrc | |
# echo "export PATH=$PATH:/usr/xenomai/bin:/usr/xenomai/lib:/usr/xenomai/include" >> ~/.bashrc | |
sudo su | |
echo "export PATH=$PATH:/usr/xenomai/bin" >> ~/.bashrc | |
# echo "export PATH=$PATH:/usr/xenomai/bin:/usr/xenomai/lib:/usr/xenomai/include" >> ~/.bashrc | |
exit | |
sudo addgroup xenomai | |
sudo addgroup root xenomai | |
sudo usermod -a -G xenomai `whoami` | |
# Add to rc.local | |
# sudo nano /etc/rc.local | |
# echo "<gid>" > /sys/module/xeno_nucleus/parameters/xenomai_gid | |
XenoGID=`cat /etc/group | sed -nr "s/xenomai:.:([0-9]+):.*/\1/p"` | |
sudo sh -c "echo $XenoGID > /sys/module/xeno_nucleus/parameters/xenomai_gid" | |
# Update groub (enable boot menu just in case something go wrong) | |
# In /etc/default/grub comment GRUB_HIDDEN_TIMEOUT and GRUB_HIDDEN_TIMEOUT_QUIET | |
sudo nano /etc/default/grub | |
# Then, modify the grub defaults (located at /etc/default/grub) so that GRUB_CMD_LINE_LINUX_DEFAULT | |
# defines the xeno_nucleus.xenomai_gid variable. For example, if the xenomai GID from above is 1001, | |
# this line should read: | |
sudo nano /etc/default/grub | |
GRUB_CMDLINE_LINUX_DEFAULT="xeno_nucleus.xenomai_gid=1001" | |
# Then update grub: | |
sudo update-grub | |
# Reboot | |
sudo reboot |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Install RTnet | |
# Based on https://xenomai.org/rtnet-installation/ and rtnet mailist | |
# Get patch 0001-Fix-compilatin-issues-on-kernel-above-3.10.patch from | |
# https://xenomai.org/pipermail/xenomai/attachments/20141215/5e590e56/attachment.bin | |
# or | |
# http://sourceforge.net/p/rtnet/mailman/attachment/548fe484eab803.95654079%40wp.pl/1/ | |
# or | |
# http://sourceforge.net/p/rtnet/mailman/message/33151881/ | |
# Put patch 0001-Fix-compilatin-issues-on-kernel-above-3.10.patch in /usr/src | |
cd /usr/src | |
sudo wget http://sourceforge.net/p/rtnet/mailman/attachment/548fe484eab803.95654079%40wp.pl/1/ -O 0001-Fix-compilatin-issues-on-kernel-above-3.10.patch | |
sudo git clone git://git.code.sf.net/p/rtnet/code rtnet-code | |
sudo ln -s rtnet-code rtnet | |
cd rtnet | |
sudo git apply ../0001-Fix-compilatin-issues-on-kernel-above-3.10.patch | |
# Select the following option in the gconfig menu: | |
# Variant - Xenomai 2.1 | |
# Add-ons - Real-time Capturing Support set to ON | |
# Examples - RTnet Application Examples set to ON | |
sudo su | |
make menuconfig # Select drivers for amd and intel NICs | |
exit | |
sudo make -j8 | |
sudo make install | |
# Configure RTnet | |
# The RTnet installation folder will be created under /usr/local/rtnet | |
# Create the RTnet management device node | |
sudo mknod /dev/rtnet c 10 240 | |
# Testing with a single node (local loopback) | |
# The testing procedure is as follows: | |
# Disconnect the RTnet node’s network cable from your normal non real-time ehternet network | |
# Restart the systems into the patched kernel mode. | |
# Display the Network setup with the command | |
ifconfig | |
# This will show you have the eth0 running (which is your network card) and the lo running (which is the local loop-back) | |
# You need to disable the non-realtime network operation of the network card as follows: | |
sudo ifconfig eth0 down | |
# Then, unload the network card’s device drivers, e.g. "sudo rmmod 8139too" | |
# Ethernet card driver name | |
# lspci | awk '/net/ {print $1}' | xargs -i% lspci -ks % | |
# or | |
# lshw -c network | |
sudo lshw -c network | grep -Eio "driver=[A-Z]*[0-9]*" | grep -Eio "[=][A-Z]*[0-9]*" | grep -Eio "[A-Z]*[0-9]*" | |
sudo rmmod <DRIVER> | |
# Load the required modules of your real-time Linux extension needed for RTnet operations | |
sudo modprobe xeno_rtdm | |
sudo modprobe xeno_hal | |
sudo modprobe xeno_nucleus | |
# Edit the following parameters in the RTnet configuration file located at /usr/local/rtnet/etc/rtnet.conf: | |
sudo nano /usr/local/rtnet/etc/rtnet.conf | |
# Set the host up as master or slave depending on how you are going to use it. | |
# RT_DRIVER="rt_e1000" should be the realtime equivalent of the module you removed. e.g. rt_8139too. | |
# RT_DRIVER_OPTIONS="" should just have empty quotes because there is only one card on the Host. | |
# IPADDR="127.0.0.2" because you setup yourself as the master with this address and you want to talk to the local loopback which # # will be setup as a slave at 127.0.0.1 | |
# NETMASK="255.255.255.0" | |
# RT_LOOPBACK="yes" | |
# RTCAP="yes" if you want to run real time capturing of packets like Ethereal. | |
# TDMA_SLAVES="127.0.0.1" Setup for loopback as the slave. | |
# Save the file and from the sbin/ directory, and run: | |
cd /usr/local/rtnet/sbin | |
sudo ./rtnet start | |
# It will wait for slaves. press cntl ^C to go out of its waiting for slaves. You can see that RTnet is | |
# running by calling lsmod and finding the realtime driver of the network card in the loaded module list. | |
# If it is not listed then RTnet is not running. | |
# Ping the local loopback as follows: | |
sudo ./rtping 127.0.0.1 | |
# To stop RTnet transmitting on the card, run: | |
sudo ./rtnet stop | |
# Testing with multiple nodes | |
# The testing procedure is as follows: | |
# Disconnect the RTnet nodes from the normal non real-time ehternet network. | |
# Connect the RTnet nodes to each other using a switch (or hub). | |
# Restart the systems into the patched kernel mode. | |
# Modify the rtnet configuration file /usr/local/rtnet/etc/rtnet.conf. You should check the following: | |
# RT_DRIVER must be set to the correct real-time Ethernet NIC driver | |
# Set IPADDR to the station’s (network-unique) IP address | |
# Set TDMA_MODE to master or slave, depending on the node’s role | |
# Place the slaves’ IP addresses in TDMA_SLAVES, separated by spaces (only required by master) | |
# Example 1. Mandatory steps | |
# Shut down the non-real time Ethernet device | |
# Unload the non-real time Ethernet device driver modules | |
# Load the required Xenomai modules | |
# Change to directory /usr/local/rtnet/sbin | |
# Start RTnet on all nodes. The nodes should see each others, and then return to the command prompt: | |
sudo ./rtnet start | |
# Check the communication between the nodes with the following command, where is the IP address of a remote node: | |
sudo ./rtping | |
# Stop the command with ^C. | |
# Unload the RTnet modules: | |
sudo ./rtnet stop | |
# Debugging RTnet | |
# If RTnet doesn’t work, or only works intermittedly, it is likely due to one of these known issues: | |
# /dev/rtnet device node is missing. | |
# Xenomai is not working as expected on your hardware. | |
# The Linux driver for the real-time network device was built into the kernel and blocks the hardware. | |
# IRQ clash. Xenomai is able to detect conflicts and report them to the kernel console. | |
# you are using rt_e1000 driver and RTnet 0.9.9 or older. See RTnet:rt_e1000 for a workaround. | |
# Steps to resolve problems: | |
# Check the kernel console or the system log for suspicious messages. | |
# Validate that the basic tests of your real-time extension are working correctly. Xenomai, e.g., comes with an basic test called latency. | |
# Collect informations about your setup (versions, configuration, output messages) and post a support request on rtnet-users. | |
# http://sourceforge.net/p/rtnet/mailman/ | |
# Using realtime (RTnet) and non-realtime network together | |
# If you have two (or more) ethernet lines available on your system, you can configure one to use RTnet (realtime) and the other one to use non-realtime network: | |
# Unload the non-realtime driver. | |
# Load and start rtnet on one card using cards parameter (e.g. insmod rt_e1000.ko cards=1,0). | |
# Load the non-realtime module and bring it up (the standard way using insmod and ifup). It will take whatever cards are left. | |
# The parameter cards accepts an array of zeros and ones. For instance insmod rt_e1000.ko cards=0,1,0 will use the “middle” card of 3. | |
# See script fragment below for an example: | |
sudo insmod /usr/local/rtnet/modules/rt_e1000.ko cards=1,0 | |
sudo insmod e1000 $ sudo ifup eth1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# ROS Indigo http://wiki.ros.org/indigo/Installation/Ubuntu | |
# Setup your sources.list | |
# Setup your computer to accept software from packages.ros.org. | |
# ROS Indigo ONLY supports Saucy (13.10) and Trusty (14.04) for debian packages. | |
sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu $(lsb_release -sc) main" > /etc/apt/sources.list.d/ros-latest.list' | |
# Set up your keys | |
sudo apt-key adv --keyserver hkp://pool.sks-keyservers.net --recv-key 0xB01FA116 | |
# wget https://raw.githubusercontent.com/ros/rosdistro/master/ros.key -O - | sudo apt-key add - | |
# Installation | |
# First, make sure your Debian package index is up-to-date: | |
sudo apt-get update | |
# Desktop-Full Install: (Recommended) : ROS, rqt, rviz, robot-generic libraries, 2D/3D simulators, | |
# navigation and 2D/3D perception | |
sudo apt-get install ros-indigo-desktop-full | |
# To find available packages, use: | |
# apt-cache search ros-indigo | |
# Initialize rosdep | |
# Before you can use ROS, you will need to initialize rosdep. rosdep enables you to easily install | |
# system dependencies for source you want to compile and is required to run some core components in ROS. | |
sudo rosdep init | |
rosdep update | |
# Environment setup | |
# It's convenient if the ROS environment variables are automatically added to your bash session | |
# every time a new shell is launched: | |
echo "source /opt/ros/indigo/setup.bash" >> ~/.bashrc | |
source ~/.bashrc | |
# If you have more than one ROS distribution installed, ~/.bashrc must only source the setup.bash | |
# for the version you are currently using. | |
# If you just want to change the environment of your current shell, you can type: | |
source /opt/ros/indigo/setup.bash | |
# Getting rosinstall | |
# rosinstall is a frequently used command-line tool in ROS that is distributed separately. | |
# It enables you to easily download many source trees for ROS packages with one command. | |
# To install this tool on Ubuntu, run: | |
sudo apt-get install python-rosinstall |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# https://github.com/orocos/rtt_ros_integration | |
# Building orocos_toolchain from source | |
export LANG=en_US.UTF-8 | |
echo "export OROCOS_TARGET=xenomai" >> ~/.bashrc | |
echo "export XENOMAI_INCLUDE_DIR=/usr/xenomai/include" >> ~/.bashrc | |
echo "export XENOMAI_NATIVE_LIBRARY=/usr/xenomai/lib" >> ~/.bashrc | |
echo "export XENOMAI_ROOT_DIR=/usr/xenomai" >> ~/.bashrc | |
source ~/.bashrc | |
cd | |
# Manually resolve recursive dependencies | |
sudo apt-get install ruby ruby-dev | |
sudo gem install rake hoe | |
# First, create an isolated underlay for building plain CMake-based packages like Orocos: | |
# Create a catkin workspace | |
mkdir -p ~/ws/underlay_isolated/src/orocos | |
cd ~/ws/underlay_isolated | |
# Clone the repository using | |
git clone --recursive -b toolchain-2.8 https://github.com/orocos-toolchain/orocos_toolchain.git src/orocos/orocos_toolchain | |
# or | |
# git clone --recursive git://gitorious.org/orocos-toolchain/orocos_toolchain.git -b toolchain-2.7 src/orocos/orocos_toolchain | |
catkin_make_isolated --install -DXENOMAI_ROOT_DIR=/usr/xenomai | |
#Add this line to your ~/.bashrc file to run the setup script for our workspace: | |
source install_isolated/setup.sh | |
# Then, in the same shell, create an underlay for building Catkin-based packages: | |
mkdir -p ~/ws/underlay/src | |
cd ~/ws/underlay | |
git clone -b indigo-devel https://github.com/orocos/rtt_ros_integration.git src/rtt_ros_integration | |
catkin_make | |
source devel/setup.sh | |
# Temporarily add the src directory to your ROS_PACKAGE_PATH | |
# export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:~/orocos_ws/src | |
# User integration | |
# echo "export ROS_WORKSPACE=$ROS_WORKSPACE" >> ~/.bashrc | |
# echo "export ROS_PACKAGE_PATH=$ROS_PACKAGE_PATH:"/home/vilma/ros_workspace" >> ~/.bashrc | |
# echo "source $ROS_WORKSPACE/orocos/orocos_toolchain/env.sh" >> ~/.bashrc | |
# source ~/.bashrc | |
# At this point you can create Catkin or rosbuild packages which use the rtt_ros_integration tools. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# https://github.com/orocos/rtt_ros_integration | |
# Creating an Orocos-ROS Package | |
# The Orocos and ROS communities have both standardized on using CMake for building source code, and have also both | |
# developed independent CMake macros for assisting the process. The ROS community has developed catkin and the Orocos | |
# toolchain uses Orocos-specific macros. These macros are used for exporting (declaring) and retreiving inter-package | |
# dependencies. It's a good, conflict-preventing, practice to decide when a package should be characterized by Catkin-based | |
# or Orocos-based macros. | |
# Any package that builds orocos targets (plugins, components, executables, etc) needs_to call the orocos_generate_package() | |
# macro so that the appropriate platform-specific pkg-config .pc files are generated. These packages can _depend on | |
# ROS libraries, but they should avoid exporting headers, libraries, or other resources via the catkin_package() macro. | |
# A simple Orocos-ROS package looks like the following: | |
# my_orocos_pkg | |
# ├── README.md | |
# ├── CMakeLists.txt | |
# ├── package.xml | |
# ├── include | |
# │ └── my_orocos_pkg | |
# └── src | |
# Where the CMakeLists.txt has the following directives: | |
cmake_minimum_required(VERSION 2.8.3) | |
project(my_orocos_pkg) | |
### ROS Dependencies ### | |
# Find the RTT-ROS package (this transitively includes the Orocos CMake macros) | |
find_package(catkin REQUIRED COMPONENTS | |
rtt_ros | |
# ADDITIONAL ROS PACKAGES | |
) | |
include_directories(${catkin_INCLUDE_DIRS}) | |
### Orocos Dependencies ### | |
# Note that orocos_use_package() does not need to be called for any dependency | |
# listed in the package.xml file | |
include_directories(${USE_OROCOS_INCLUDE_DIRS}) | |
### Orocos Targets ### | |
# orocos_component(my_component src/my_component.cpp) | |
# target_link_libraries(my_component ${catkin_LIBRARIES} ${USE_OROCOS_LIBRARIES}) | |
# orocos_library(my_library src/my_library.cpp) | |
# target_link_libraries(my_library ${catkin_LIBRARIES} ${USE_OROCOS_LIBRARIES}) | |
# orocos_service(my_service src/my_service.cpp) | |
# target_link_libraries(my_service ${catkin_LIBRARIES} ${USE_OROCOS_LIBRARIES}) | |
# orocos_plugin(my_plugin src/my_plugin.cpp) | |
# target_link_libraries(my_plugin ${catkin_LIBRARIES} ${USE_OROCOS_LIBRARIES}) | |
# orocos_typekit(my_typekit src/my_typekit.cpp) | |
# target_link_libraries(my_typekit ${catkin_LIBRARIES} ${USE_OROCOS_LIBRARIES}) | |
### Orocos Package Exports and Install Targets ### | |
# Generate install targets for header files | |
orocos_install_headers(DIRECTORY include/${PROJECT_NAME}) | |
# Export package information (replaces catkin_package() macro) | |
orocos_generate_package( | |
INCLUDE_DIRS include | |
DEPENDS rtt_ros | |
) | |
# The package.xml file is a normal Catkin package.xml file, with some additional export flags for ROS plugin auto-loading: | |
<package> | |
<name>my_orocos_package</name> | |
<version>0.1.0</version> | |
<license>BSD</license> | |
<maintainer email="[email protected]">Firstname Lastname</maintainer> | |
<description> | |
Package description. | |
</description> | |
<buildtool_depend>catkin</buildtool_depend> | |
<!-- Build deps are queried automatically with orocos_use_package() --> | |
<build_depend>rtt</build_depend> | |
<build_depend>ocl</build_depend> | |
<build_depend>rtt_ros</build_depend> | |
<run_depend>rtt</run_depend> | |
<run_depend>ocl</run_depend> | |
<run_depend>rtt_ros</run_depend> | |
<!-- ROS Msg Typekits and Srv Proxies --> | |
<build_depend>rtt_sensor_msgs</build_depend> | |
<run_depend>rtt_sensor_msgs</run_depend> | |
<export> | |
<rtt_ros> | |
<!-- Plugin deps are loaded automatically by the rtt_ros import service --> | |
<plugin_depend>rtt_sensor_msgs</plugin_depend> | |
</rtt_ros> | |
</export> | |
</package> | |
# Building ROS-Based Orocos Components | |
# While the ROS community has standardized on the rosbuild (ROS Hydro and earlier) and Catkin (ROS Groovy and later) | |
# buildsystems, Orocos has its own CMake/PkgConfig-based package description system which uses Autoproj manifest.xml | |
# files similar to rosbuild manifest.xml files. | |
# This is primarily because Orocos builds its libraries with respect to a given $OROCOS_TARGET (gnulinux/xenomai/macosx/etc) | |
# so that you can build multiple versions of the same library in place without having to rebuild everything whenever you | |
# change targets. | |
# So in order to build Orocos components in a rosbuild or Catkin package, you need to first include the RTT CMake macros. | |
# This is done automatically when you find the rtt_ros package: | |
find_package(catkin REQUIRED COMPONENTS rtt_ros) | |
# If you need other RTT libraries like the CORBA transport etc, you can use the use_orocos() macro provided by the | |
# rtt_ros package: | |
use_orocos(rtt-transport-corba) | |
# The above is equivalent to calling the following: | |
find_package(OROCOS-RTT REQUIRED COMPONENTS rtt-scripting rtt-transport-corba) | |
include(${OROCOS-RTT_USE_FILE_PATH}/UseOROCOS-RTT.cmake ) | |
# When this file is included, it both defines and executes several macros. Specifically, it parses the package.xml or | |
# manifest.xml of the including package, and executes orocos_use_package(pkg-name) on all build dependencies. | |
# This populates several variables including, but not limited to ${OROCOS_USE_INCLUDE_DIRS} and ${OROCOS_USE_LIBRARIES} | |
# which are used by Orocos target- and package-definition macros like orocos_executable(), orocos_library() and | |
# orocos_generate_package(). | |
# Also, while the orocos_use_package() macro can be used to find both Orocos-based packages and normal pkg-config-based | |
# packages, you should only use it for Orocos-based packages. You should use the normal CMake and Catkin mechanisms for | |
# all non-Orocos dependencies. As long as the names of orocos packages are listed as <build_depend> dependencies in your | |
# package.xml file, their build flags will automatically be made available when building your package. | |
# Do not use find_package(catkin COMPONENTS) to find orocos packages, since catkin doesn't properly handle the | |
# orocos-target-specific packages. Listing them in the package.xml file will also enforce proper build ordering. | |
# To build components, libraries, typekits, and other Orocos plugins, use the standard orocos_*() CMake macros. | |
# Then to make these available to other packages at build-time (through orocos_use_package()), declare an Orocos package | |
# at the end of your CMakeLists.txt file: | |
orocos_generate_package(DEPENDS some-other-oro-pkg) | |
# See the Orocos RTT documentation (or cheat sheet) for more info on these macros. | |
# NOTE: You still need to call find_package(catkin ...) and catkin_package(...) for non-orocos dependencies and targets, | |
# but you shuold use the orocos_*() CMake macros for Orocos-based code. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Install ITaSC - http://www.orocos.org/wiki/orocos/itasc-wiki/itasc-quick-start | |
# The following explanation uses the ROS workspace and rosinstall tools, it is however easy to follow the | |
# same instructions without these tools, as will be hinted further on. | |
# IMPORTANT: We combine catkin packages and rosbuild packages by combining catkin and rosws workspaces!! | |
#Pre-requisites | |
#ROS Indigo | |
#Orocos (installation instructions on https://github.com/orocos/rtt_ros_integration) | |
#rtt_ros_integration (https://github.com/orocos/rtt_ros_integration) | |
#geometry (https://github.com/ros/geometry) | |
#robot-model (https://github.com/ros/robot_model) | |
#rtt_geometry (https://github.com/orocos/rtt_geometry) | |
#orocos_kinematics_dynamics (https://github.com/orocos/orocos_kinematics_dynamics) | |
# IMPORTANT: You need to install everything (except ROS Indigo) from source, it currently doesn't work using debian packages. | |
# You need first to install the following debian packages upon which they rely to have successful compilation: | |
sudo apt-get install libeigen3-dev sip-dev liburdfdom-dev ros-indigo-angles ros-indigo-tf2-ros ros-indigo-geometric-shapes liblua5.1-0 liblua5.1-0-dev collada-dom-dev | |
# IMPORTANT: your workspace setup should look as follows: | |
# ws/ --CATKIN WORKSPACE | |
# underlay_isolated | |
# build_isolated | |
# install_isolated | |
# devel_isolated | |
# src | |
# orocos | |
# orocos_kinematics_dynamics | |
# orocos_toolchain | |
# underlay | |
# build | |
# devel | |
# src | |
# geometry | |
# robot_model | |
# rtt_geometry | |
# rtt_ros_integration | |
# Afterwards add the following to your .bashrc file: | |
source /opt/ros/indigo/setup.bash | |
source ~/ws/underlay/devel/setup.sh | |
# Make a new rosbuild workspace (for instance ~/ros_ws) that overlays the catkin workspace: | |
# http://wiki.ros.org/catkin/Tutorials/using_rosbuild_with_catkin | |
mkdir ~/ros_ws | |
cd ~/ros_ws | |
rosws init . ~/ws/devel | |
# Add your rosbuild workspace to your .bashrc: | |
source ~/ros_ws/setup.sh | |
# Installation file | |
# Download the ROS installation file here | |
# Merge this file into your workspace: | |
rosws merge itasc_dsl.rosinstall | |
rosws update | |
# OR manually clone each repository mentioned in the file, switch to the correct branch/tag, and add to | |
# your ROS_PACKAGE_PATH (NOT RECOMMENDED) | |
# Application dependent install files | |
# The KUKA youBot and PR2 have not yet been tested in Indigo. | |
# Setup | |
# Download this file, move and rename it to ~/.bash_itasc_dsl | |
# https://gitlab.mech.kuleuven.be/rob-itasc/itasc_install_examples/blob/indigo/bash_itasc_dsl | |
# Add at the following at the end of your ~/.bashrc file, in following order: | |
source /path/to/your/rosworkspace/setup.bash | |
source .bash_itasc_dsl | |
useITaSC_deb | |
# re-source your .bashrc | |
source ~/.bashrc | |
# Changes to iTaSC files | |
# As iTaSC was originally based on ROS Groovy, some adaptations of the code are necessary for it to compile in Indigo. | |
# Unfortunately these changes are still manual work. | |
# orocos toolchain 2.7 | |
# First change to be made is that the Orocos toolchain packages, although they have a package.xml, are no ROS packages | |
# anymore starting from Toolchain 2.7. So all manifests of itasc packages have to be adapted as one can no longer | |
# directly depend on rtt and ocl, one has to depend on rtt_ros which serves as a replacement for the previous ROS | |
# package rtt and depends on the system (rosdep) packages rtt, ocl, orogen and a minimal set of packages to support | |
# ROS native types and to provide a service to import ROS packages recursively. So for all manifests: | |
<depend package="rtt_ros"/> | |
<!-- <depend package="rtt"/> --> | |
<!-- <depend package="ocl"/> --> | |
<!-- <depend package="orogen"/> --> | |
# trajectory_generators/fixed_joint_generator/CMakeLists.txt | |
#find_package(Eigen REQUIRED) | |
#include_directories(${Eigen_INCLUDE_DIRS}) | |
# trajectory_generators/fixed_joint_generator/manifest.xml | |
<rosdep name="eigen"/> | |
<depend package="rtt_ros" /> | |
<depend package="orocos_kdl"/> | |
# itasc_tasks/sixDof_pff/manifest.xml | |
<rosdep name="eigen"/> | |
<depend package="orocos_kdl"/> | |
<depend package="rtt_ros" /> | |
<depend package="itasc_core"/> | |
<depend package="kdl_typekit"/> | |
# Build the packages | |
# Build the core packages | |
rosmake itasc_core trajectory_generators itasc_tasks rFSM rttlua_completion itasc_solvers fixed_object itasc_robot_object moving_object moving_object_tf | |
# Build application dependent packages | |
# Compile the dedicated itasc components for the PR2 or Youbot, located in the itasc_robots_objects stack (not yet tested in Indigo) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# https://github.com/orocos/rFSM/tree/master/doc | |
# Overview | |
# rFSM is a small and powerful Statechart implementation. It is mainly designed for Coordination of complex | |
# systems but is not limited to that. rFSM is written in pure Lua and is therefore highly portable and embeddable. | |
# As a Lua domain specific language rFSM inherits the extensibility of its host language. | |
# rFSM is dual licensed under LGPL/BSD. | |
# This README is also available in HTML and Text format in the doc/ subdirectory. | |
# Setup | |
# Make sure you have Lua 5.1 installed and the rFSM folder is in your LUA_PATH. For example: | |
export LUA_PATH=";;;/home/mk/src/git/rfsm/?.lua" | |
# If your LUA_PATH is already set to something, then just add the rFSM path instead of overwriting it: | |
export LUA_PATH="$LUA_PATH;/home/mk/src/git/rfsm/?.lua" | |
# Information about how to use rFSM using the OROCOS RTT Framework can be found here. | |
# http://www.orocos.org/wiki/orocos/toolchain/LuaCookbook |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment