Skip to content

Instantly share code, notes, and snippets.

@wjwwood
Created October 15, 2014 21:15
Show Gist options
  • Select an option

  • Save wjwwood/489ffcc4ecca797b54b3 to your computer and use it in GitHub Desktop.

Select an option

Save wjwwood/489ffcc4ecca797b54b3 to your computer and use it in GitHub Desktop.
william@eatable:/tmp/testing_ws
$ tree
.
└── src
├── CMakeLists.txt -> /opt/ros/hydro/share/catkin/cmake/toplevel.cmake
└── example
├── CMakeLists.txt
├── msg
│   └── Test.msg
└── package.xml
3 directories, 4 files
william@eatable:/tmp/testing_ws
$ cat src/example/CMakeLists.txt
cmake_minimum_required(VERSION 2.8.3)
project(example)
find_package(catkin REQUIRED COMPONENTS message_generation std_msgs)
add_message_files(FILES Test.msg)
generate_messages(DEPENDENCIES std_msgs)
catkin_package()
william@eatable:/tmp/testing_ws
$ cat src/example/package.xml
<?xml version="1.0"?>
<package>
<name>example</name>
<version>0.0.0</version>
<description>The example package</description>
<maintainer email="william@todo.todo">william</maintainer>
<license>TODO</license>
<buildtool_depend>catkin</buildtool_depend>
<build_depend>message_generation</build_depend>
<build_depend>std_msgs</build_depend>
<run_depend>message_runtime</run_depend>
<run_depend>std_msgs</run_depend>
</package>
william@eatable:/tmp/testing_ws
$ cat src/example/msg/Test.msg
Header header
william@eatable:/tmp/testing_ws
$ cat /etc/apt/sources.list.d/ros-latest.list
#deb http://repos.ros.org/repos/ros/ubuntu precise main
deb http://packages.ros.org/ros/ubuntu precise main
william@eatable:/tmp/testing_ws
$ sudo apt-get update -qq
william@eatable:/tmp/testing_ws
$ sudo apt-get dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
william@eatable:/tmp/testing_ws
$ sudo apt-get install ros-hydro-gencpp
Reading package lists... Done
Building dependency tree
Reading state information... Done
ros-hydro-gencpp is already the newest version.
ros-hydro-gencpp set to manually installed.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
william@eatable:/tmp/testing_ws
$ dpkg -l | grep ros-hydro-gen
ii ros-hydro-gencpp 0.4.17-0precise-20140617-0316-+0000 C++ ROS message and service generators.
ii ros-hydro-genlisp 0.4.14-0precise-20140617-0316-+0000 Common-Lisp ROS message and service generators.
ii ros-hydro-genmsg 0.4.25-0precise-20140617-0313-+0000 Standalone Python library for generating ROS message and service data structures for various languages.
ii ros-hydro-genpy 0.4.17-0precise-20140617-0316-+0000 Python ROS message and service generators.
william@eatable:/tmp/testing_ws
$ source /opt/ros/hydro/setup.bash
william@eatable:/tmp/testing_ws
$ catkin_make
Base path: /tmp/testing_ws
Source space: /tmp/testing_ws/src
Build space: /tmp/testing_ws/build
Devel space: /tmp/testing_ws/devel
Install space: /tmp/testing_ws/install
####
#### Running command: "cmake /tmp/testing_ws/src -DCATKIN_DEVEL_PREFIX=/tmp/testing_ws/devel -DCMAKE_INSTALL_PREFIX=/tmp/testing_ws/install" in "/tmp/testing_ws/build"
####
-- The C compiler identification is GNU
-- The CXX compiler identification is GNU
-- Check for working C compiler: /usr/local/bin/gcc
-- Check for working C compiler: /usr/local/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Using CATKIN_DEVEL_PREFIX: /tmp/testing_ws/devel
-- Using CMAKE_PREFIX_PATH: /opt/ros/hydro
-- This workspace overlays: /opt/ros/hydro
-- Found PythonInterp: /usr/bin/python (found version "2.7.3")
-- Using PYTHON_EXECUTABLE: /usr/bin/python
-- Python version: 2.7
-- Using Debian Python package layout
-- Using CATKIN_ENABLE_TESTING: ON
-- Call enable_testing()
-- Using CATKIN_TEST_RESULTS_DIR: /tmp/testing_ws/build/test_results
-- Looking for include files CMAKE_HAVE_PTHREAD_H
-- Looking for include files CMAKE_HAVE_PTHREAD_H - found
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE
-- Found gtest sources under '/usr/src/gtest': gtests will be built
-- catkin 0.5.89
-- BUILD_SHARED_LIBS is on
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- ~~ traversing 1 packages in topological order:
-- ~~ - example
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- +++ processing catkin package: 'example'
-- ==> add_subdirectory(example)
-- Using these message generators: gencpp;genlisp;genpy
-- example: 1 messages, 0 services
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/testing_ws/build
####
#### Running command: "make -j8 -l8" in "/tmp/testing_ws/build"
####
Scanning dependencies of target std_msgs_generate_messages_lisp
Scanning dependencies of target std_msgs_generate_messages_py
Scanning dependencies of target std_msgs_generate_messages_cpp
[ 0%] [ 0%] Built target std_msgs_generate_messages_lisp
Built target std_msgs_generate_messages_py
[ 0%] Built target std_msgs_generate_messages_cpp
Scanning dependencies of target example_generate_messages_lisp
Scanning dependencies of target example_generate_messages_py
Scanning dependencies of target example_generate_messages_cpp
[ 25%] [ 50%] [ 75%] Generating Lisp code from example/Test.msg
Generating Python from MSG example/Test
Generating C++ code from example/Test.msg
[ 75%] [100%] Built target example_generate_messages_lisp
Generating Python msg __init__.py for example
[100%] Built target example_generate_messages_py
[100%] Built target example_generate_messages_cpp
Scanning dependencies of target example_generate_messages
[100%] Built target example_generate_messages
william@eatable:/tmp/testing_ws
$ cat devel/include/example/Test.h | grep HasHeader -B1 -A2
// BOOLTRAITS {'IsFixedSize': False, 'IsMessage': True, 'HasHeader': True}
// {'std_msgs': ['/opt/ros/hydro/share/std_msgs/cmake/../msg'], 'example': ['/tmp/testing_ws/src/example/msg']}
--
template <class ContainerAllocator>
struct HasHeader< ::example::Test_<ContainerAllocator> >
: TrueType
{ };
--
template <class ContainerAllocator>
struct HasHeader< ::example::Test_<ContainerAllocator> const>
: TrueType
{ };
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment