alros
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
alros [2018/07/24 18:48] – [Building and Running AL ROS Node] keitaronishimura | alros [2018/08/28 22:32] (current) – keitaronishimura | ||
---|---|---|---|
Line 1: | Line 1: | ||
===== Integrating ROS 1 & 2 into AL ===== | ===== Integrating ROS 1 & 2 into AL ===== | ||
- | **Author** [[unlv_nishimura|Keitaro Nishimura]] **Date:** Last modified on <04/25/18> | + | **Author** [[unlv_nishimura|Keitaro Nishimura]] **Date:** Last modified on <08/29/18> |
\\ | \\ | ||
- | The photo above shows a " | + | This page is just a marker for an internal document |
- | + | ||
- | ==== Motivation and Audience ==== | + | |
- | This tutorial' | + | |
- | <fc blue> | + | |
- | \\ | + | |
- | *Knowledge and experience with Hubo and PODO | + | |
- | \\ | + | |
- | *Knowledge and experience with ROS 1 or 2 | + | |
- | \\ | + | |
- | *Knowledge and experience with CPP | + | |
- | </ | + | |
- | \\ | + | |
- | The rest of this tutorial is presented as follows: | + | |
- | \\ | + | |
- | *[[alros# | + | |
- | *[[alros# | + | |
- | *[[alros# | + | |
- | *[[alros# | + | |
- | *[[alros# | + | |
- | + | ||
- | ==== Parts List and Source ==== | + | |
- | + | ||
- | You will need an intel nuc running Ubuntu 16.04 with Xenomai and PODO installed. If you do not have that please follow this tutorial to install Ubuntu 16.04, Xenomai, and PODO. | + | |
- | \\ | + | |
- | *[[Installing Xenomai3, PODO3, and QT]] | + | |
- | ==== Download ROS 1 and or 2 ==== | + | |
- | \\ | + | |
- | You now need to install either ROS 1 or 2 onto the intel nuc. Don't forget to initialize your workspace! | + | |
- | ===ROS 1=== | + | |
- | ROS 1 should be used if you are communicating with other machines running on Ubuntu or if you want to have the widest compatibility with existing ROS packages. ROS Kinetic will be used for this tutorial. Please follow the instructions in the linked installation tutorial for [[http:// | + | |
- | \\ | + | |
- | ===ROS 2=== | + | |
- | If you need to communicate with Windows or OSX based machines you will need to install ROS 2. As of writing this tutorial, it is still early in its development with only version 1.0 available. I would not recommend someone to learn ROS 2 before mastering the basics of ROS 1. It is possible that the following link is not the most current installation tutorial so please | + | |
- | \\ | + | |
- | [[https:// | + | |
- | \\ | + | |
- | This is the link to the ROS 2 installation tutorials for Windows and OSX: | + | |
- | \\ | + | |
- | [[https:// | + | |
- | \\ | + | |
- | [[https:// | + | |
- | ==== Adding AL to ROS Workspace ==== | + | |
- | Once you have the version | + | |
- | \\ | + | |
- | ---- | + | |
- | <fc purple> | + | |
- | ln -s / | + | |
- | </ | + | |
- | ---- | + | |
- | \\ | + | |
- | This creates a " | + | |
- | \\ | + | |
- | ---- | + | |
- | <fc purple> | + | |
- | ln -s ~/ | + | |
- | </ | + | |
- | ---- | + | |
- | \\ | + | |
- | This command connected the directory " | + | |
- | ==== Building and Running AL ROS Node ==== | + | |
- | Now in order to build to PODO code with catkin or ament we will need to add all of it's dependencies to the CMakeLists.txt file. The package.xml does not need to change. An example of a rosified AL's cmakelist is shown bellow. | + | |
- | \\ | + | |
- | <code txt> | + | |
- | cmake_minimum_required(VERSION 2.8.3) | + | |
- | project(mpcwalk) | + | |
- | + | ||
- | set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} " | + | |
- | set(CMAKE_INCLUDE_CURRENT_DIR ON) | + | |
- | set(CMAKE_AUTOMOC ON) | + | |
- | ## Add support for C++11, supported in ROS Kinetic and newer | + | |
- | # add_definitions(-std=c++11) | + | |
- | + | ||
- | ## Find catkin macros and libraries | + | |
- | ## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz) | + | |
- | ## is used, also find other catkin packages | + | |
- | find_package(Qt5Core REQUIRED) | + | |
- | + | ||
- | find_package(catkin REQUIRED COMPONENTS | + | |
- | geometry_msgs | + | |
- | message_runtime | + | |
- | roscpp | + | |
- | std_msgs | + | |
- | ) | + | |
- | + | ||
- | find_library(COPPERPLATE copperplate / | + | |
- | find_library(COBALT cobalt / | + | |
- | find_library(ALCHEMY alchemy / | + | |
- | + | ||
- | + | ||
- | include_directories( src src/ | + | |
- | / | + | |
- | ${catkin_INCLUDE_DIRS} | + | |
- | ) | + | |
- | + | ||
- | | + | |
- | src/ | + | |
- | src/ | + | |
- | src/ | + | |
- | src/ | + | |
- | src/ | + | |
- | src/ | + | |
- | src/ | + | |
- | src/ | + | |
- | src/ | + | |
- | src/ | + | |
- | src/ | + | |
- | src/ | + | |
- | src/ | + | |
- | src/ | + | |
- | src/ | + | |
- | src/ | + | |
- | ) | + | |
- | + | ||
- | + | ||
- | ## Add cmake target dependencies of the executable | + | |
- | ## same as for the library above | + | |
- | | + | |
- | | + | |
- | + | ||
- | ) | + | |
- | qt5_use_modules(mpcwalk Core Gui Widgets Network) | + | |
- | ## Specify libraries to link a library or executable target against | + | |
- | | + | |
- | / | + | |
- | / | + | |
- | ${catkin_LIBRARIES} | + | |
- | ) | + | |
- | + | ||
- | target_include_directories(mpcwalk | + | |
- | PRIVATE / | + | |
- | ~/ | + | |
- | ${catkin_INCLUDE_DIRS}) | + | |
- | + | ||
- | + | ||
- | set_target_properties(mpcwalk PROPERTIES LINK_FLAGS " | + | |
- | + | ||
- | if (${CMAKE_CXX_COMPILER_ID} STREQUAL " | + | |
- | add_definitions(" | + | |
- | endif () | + | |
- | + | ||
- | </ | + | |
- | ==== Final Words ==== | + |
alros.1532483338.txt.gz · Last modified: 2018/07/24 18:48 by keitaronishimura