This tutorial is targeted towards rosbuild users wanting to know more about qiBuild
First, qiBuild and rosbuild have much in common.
They are both based on CMake, and provide a set of tools written in Python to manage multiple projects, and dependencies between projects.
The CMake frameworks have both a public and a private API.
rosbuild is more used, has better documentation, and a large community. qiBuild is still a work in progress :)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
rosbuild_init()
Need a few environment variables to be set.
include(${CMAKE_CURRENT_SOURCE_DIR}/qibuild.cmake)
User has to copy/paste a qibuild.cmake files everywhere, but this file can update itself.
Code generation
rosbuild_genmsg()
rosbuild_gensrv()
N/A : loose coupling between the messaging library and the build framework. Could be implemented in qibuild/cmake ?
N/A : automatically set. Default SDK layout.
Output path is inside build dir, in a directory named sdk/ (temporary build results are NOT in build/sdk)
rospack : command line tool, may be used by any build system
rosbuild_add_boost_directories()
rosbuild_link_boost(${PROJECT_NAME} thread)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
rosbuild_init()
find_package(PythonLibs REQUIRED)
rosbuild_add_swigpy_library(python_foo foo foo_swig_generated.cpp bar.cpp)
target_link_libraries(python_foo ${PYTHON_LIBRARIES})
include(qibuild.cmake)
qi_swig_wrap_python(_foo foo.i
SRC bar.cpp
DEPENDS ...)
Nao’s users would be glad to be able to use the great Ros framework with their robot.
Using qibuild’s strong cross-platform support would be great for ros ! Ros could become compatible with Visual Studio with reduced effort.
One way we could do it:
When qibuild is run from a source dir where there is a manifest.xml, it will
The rosbuild.cmake files then calls something like
include(qibuild/compat/ros/compat.cmake)
function(ros_build_init)
# other cmake magic can go here :)
message(STATUS "Using qibuild!")
endfunction()
function(rosbuild_add_executable)
# re-parse arguments
# ...
qi_create_bin(_args)
endfunction()
function(rosbuild_genmsg)
message(STATUS "not implemented yet!"
endfunction()
This could be a nice first step to see how things go from there