Skip to content

Commit

Permalink
upgrade to catkinization complete. The segway_rmpX rosbuild package h…
Browse files Browse the repository at this point in the history
…as been catkinized and promoted to segway_rmp. (closes segwayrmp#10)
  • Loading branch information
piyushk committed May 3, 2013
1 parent 9ebae97 commit 0f626a1
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 45 deletions.
68 changes: 46 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,30 +1,54 @@
cmake_minimum_required(VERSION 2.4.6)
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake)
cmake_minimum_required(VERSION 2.8.3)
project(segway_rmp)
# Load catkin and all dependencies required for this package
find_package(catkin REQUIRED COMPONENTS roscpp tf message_generation geometry_msgs nav_msgs serial)

# Set the build type. Options are:
# Coverage : w/ debug symbols, w/o optimization, w/ code-coverage
# Debug : w/ debug symbols, w/o optimization
# Release : w/o debug symbols, w/ optimization
# RelWithDebInfo : w/ debug symbols, w/ optimization
# MinSizeRel : w/o debug symbols, w/ optimization, stripped binaries
#set(ROS_BUILD_TYPE RelWithDebInfo)

rosbuild_init()
# libsegwyarmp provides segwayrmp and ftd2xx
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBSEGWAYRMP REQUIRED libsegwayrmp)
find_library(LIBSEGWAYRMP_LIBRARY
NAMES segwayrmp
PATHS ${LIBSEGWAYRMP_LIBRARY_DIRS}
)
find_library(LIBFTD2XX_LIBRARY
NAMES ftd2xx
PATHS ${LIBSEGWAYRMP_LIBRARY_DIRS}
)

#set the default path for built executables to the "bin" directory
set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/bin)
#set the default path for built libraries to the "lib" directory
set(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/lib)

#uncomment if you have defined messages
rosbuild_genmsg()
#uncomment if you have defined services
#rosbuild_gensrv()

#common commands for building c++ executables and libraries
#rosbuild_add_library(${PROJECT_NAME} src/example.cpp)
#target_link_libraries(${PROJECT_NAME} another_library)
rosbuild_add_boost_directories()
rosbuild_add_executable(segway_rmp_node src/segway_rmp_node.cpp)
rosbuild_link_boost(segway_rmp_node system thread)
#target_link_libraries(example ${PROJECT_NAME})
add_message_files(
DIRECTORY msg
FILES SegwayStatus.msg SegwayStatusStamped.msg
)

## Generate added messages and services with any dependencies listed here
generate_messages(
DEPENDENCIES std_msgs
)

include_directories(${Boost_INCLUDE_DIRS} ${LIBSEGWAYRMP_INCLUDE_DIRS})

add_executable(segway_rmp_node src/segway_rmp_node.cpp)
find_package(Boost REQUIRED COMPONENTS system thread)

target_link_libraries(
segway_rmp_node
${Boost_LIBRARIES}
${LIBSEGWAYRMP_LIBRARY}
${LIBFTD2XX_LIBRARY}
${catkin_LIBRARIES}
)

## DEPENDS: system dependencies of this project that dependent projects also need
## CATKIN_DEPENDS: catkin_packages dependent projects also need
## INCLUDE_DIRS:
## LIBRARIES: libraries you create in this project that dependent projects also need
catkin_package(
DEPENDS libsegwayrmp
CATKIN_DEPENDS roscpp tf geometry_msgs nav_msgs std_msgs serial
)
1 change: 0 additions & 1 deletion Makefile

This file was deleted.

19 changes: 0 additions & 19 deletions manifest.xml

This file was deleted.

36 changes: 36 additions & 0 deletions package.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<package>
<name>segway_rmp</name>
<version>0.1.0</version>
<description>segway_rmp</description>

<license>BSD</license>

<url type="website">http://ros.org/wiki/segway_rmp</url>
<url type="bugtracker">https://github.com/segwayrmp/segway-rmp-ros-pkg/issues</url>

<maintainer email="[email protected]">William Woodall</maintainer>
<maintainer email="[email protected]">Piyush Khandelwal</maintainer>
<author>William Woodall</author>

<buildtool_depend>catkin</buildtool_depend>

<build_depend>roscpp</build_depend>
<build_depend>tf</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>nav_msgs</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>libsegwayrmp</build_depend>
<build_depend>serial</build_depend>

<run_depend>roscpp</run_depend>
<run_depend>tf</run_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>nav_msgs</run_depend>
<run_depend>std_msgs</run_depend>
<run_depend>libsegwayrmp</run_depend>
<run_depend>serial</run_depend>

<export>

</export>
</package>
6 changes: 3 additions & 3 deletions src/segway_rmp_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
#include <tf/transform_broadcaster.h>
#include "geometry_msgs/Twist.h"
#include "nav_msgs/Odometry.h"
#include "segway_rmpX/SegwayStatusStamped.h"
#include "segway_rmp/SegwayStatusStamped.h"

#include "segwayrmp/segwayrmp.h"

Expand Down Expand Up @@ -387,7 +387,7 @@ class SegwayRMPNode {
// Subscribe to command velocities
this->cmd_velSubscriber = n->subscribe("cmd_vel", 1000, &SegwayRMPNode::cmd_velCallback, this);
// Advertise the SegwayStatusStamped
this->segway_status_pub = n->advertise<segway_rmpX::SegwayStatusStamped>("segway_status", 1000);
this->segway_status_pub = n->advertise<segway_rmp::SegwayStatusStamped>("segway_status", 1000);
// Advertise the Odometry Msg
this->odom_pub = n->advertise<nav_msgs::Odometry>("odom", 50);
}
Expand Down Expand Up @@ -606,7 +606,7 @@ class SegwayRMPNode {

bool connected;

segway_rmpX::SegwayStatusStamped sss_msg;
segway_rmp::SegwayStatusStamped sss_msg;
geometry_msgs::TransformStamped odom_trans;
nav_msgs::Odometry odom_msg;

Expand Down

0 comments on commit 0f626a1

Please sign in to comment.