Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ROS 2 port #12

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,26 +1,33 @@
cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.5)
project(random_numbers)

find_package(catkin REQUIRED)

catkin_package(
LIBRARIES ${PROJECT_NAME}
INCLUDE_DIRS include
)
# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()

find_package(ament_cmake REQUIRED)
find_package(Boost REQUIRED date_time system thread)
include_directories(${Boost_INCLUDE_DIR})

include_directories(include)
include_directories(include
${Boost_INCLUDE_DIR})

add_library(${PROJECT_NAME}
src/random_numbers.cpp)
src/random_numbers.cpp
)

target_link_libraries(${PROJECT_NAME} ${Boost_LIBRARIES})
ament_target_dependencies(${PROJECT_NAME})
ament_export_libraries(${PROJECT_NAME})
ament_export_include_directories(include)

install(
TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)

install(TARGETS ${PROJECT_NAME}
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION})
install(DIRECTORY include/
DESTINATION include)

install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION})
ament_package()
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# random_numbers

*This branch has been ported to ROS 2.0*

This library contains wrappers for generating floating point values, integers, quaternions using boost libraries.

## Build Status
Expand All @@ -9,4 +11,3 @@ master branch: [![Build Status](https://travis-ci.org/ros-planning/random_number
## Features

New: you can pass in a custom random number generator seed to allow optional deterministic behavior during debugging, testing, etc. using the secondary constructor.

14 changes: 9 additions & 5 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
<package>
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>random_numbers</name>
<version>0.3.2</version>
<description>
Expand All @@ -8,13 +10,15 @@
Seeds are obtained using a separate and different random number generator.
</description>
<author email="[email protected]">Ioan Sucan</author>
<maintainer email="[email protected]">Anas M'chichou</maintainer>
<maintainer email="[email protected]">Steven! Ragnarök</maintainer>
<license>BSD</license>
<url type="website">http://ros.org/wiki/random_numbers</url>

<buildtool_depend>catkin</buildtool_depend>

<buildtool_depend>ament_cmake</buildtool_depend>
<build_depend>boost</build_depend>

<run_depend>boost</run_depend>
<exec_depend>boost</exec_depend>
<export>
<build_type>ament_cmake</build_type>
</export>
</package>