Skip to content

Commit

Permalink
Merge pull request #11 from PickNikRobotics/master
Browse files Browse the repository at this point in the history
Port to ROS2
  • Loading branch information
jonbinney committed Jul 24, 2020
2 parents c6f2241 + 467db61 commit 196045d
Show file tree
Hide file tree
Showing 6 changed files with 66 additions and 29 deletions.
57 changes: 44 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,22 +1,53 @@
cmake_minimum_required(VERSION 3.0.2)
cmake_minimum_required(VERSION 3.5)
project(object_recognition_msgs)

# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()

# Disable Wredundant-decls warnings since rosidl generates redundant function declarations
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic -Wno-redundant-decls")
endif()

# generate the messages and the actionlib server for ROS
find_package(catkin REQUIRED actionlib_msgs genmsg geometry_msgs sensor_msgs shape_msgs std_msgs)
find_package(ament_cmake REQUIRED)
find_package(rosidl_default_generators REQUIRED)
find_package(action_msgs REQUIRED)
find_package(std_msgs REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(shape_msgs REQUIRED)

add_action_files(DIRECTORY action FILES ObjectRecognition.action)
add_service_files(DIRECTORY srv FILES GetObjectInformation.srv)
set(msg_files
"msg/ObjectInformation.msg"
"msg/ObjectType.msg"
"msg/RecognizedObject.msg"
"msg/RecognizedObjectArray.msg"
"msg/Table.msg"
"msg/TableArray.msg"
)
set(srv_files
"srv/GetObjectInformation.srv"
)
set(action_files
"action/ObjectRecognition.action"
)

add_message_files(DIRECTORY msg
FILES ObjectType.msg
ObjectInformation.msg
RecognizedObject.msg
RecognizedObjectArray.msg
Table.msg
TableArray.msg
rosidl_generate_interfaces(${PROJECT_NAME}
${msg_files}
${srv_files}
${action_files}
DEPENDENCIES
action_msgs
std_msgs
geometry_msgs
sensor_msgs
shape_msgs
)

generate_messages(DEPENDENCIES actionlib_msgs geometry_msgs sensor_msgs shape_msgs std_msgs)
ament_export_dependencies(rosidl_default_runtime)

# define the project
catkin_package(CATKIN_DEPENDS actionlib_msgs geometry_msgs sensor_msgs shape_msgs std_msgs)
ament_package()
2 changes: 1 addition & 1 deletion msg/RecognizedObject.msg
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
##################################################### HEADER ###########################################################

# The header frame corresponds to the pose frame, NOT the point_cloud frame.
Header header
std_msgs/Header header

################################################## OBJECT INFO #########################################################

Expand Down
2 changes: 1 addition & 1 deletion msg/RecognizedObjectArray.msg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
##################################################### HEADER ###########################################################
Header header
std_msgs/Header header

# This message type describes a potential scene configuration: a set of objects that can explain the scene
object_recognition_msgs/RecognizedObject[] objects
Expand Down
2 changes: 1 addition & 1 deletion msg/Table.msg
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Informs that a planar table has been detected at a given location

Header header
std_msgs/Header header

# The pose gives you the transform that take you to the coordinate system
# of the table, with the origin somewhere in the table plane and the
Expand Down
2 changes: 1 addition & 1 deletion msg/TableArray.msg
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Header header
std_msgs/Header header

# Just an array of tables
object_recognition_msgs/Table[] tables
30 changes: 18 additions & 12 deletions package.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<package>
<package format="3">
<name>object_recognition_msgs</name>
<version>0.4.2</version>
<description>Object_recognition_msgs contains the ROS message and the actionlib definition used in object_recognition_core</description>
Expand All @@ -8,23 +8,29 @@

<url>https://www.ros.org/wiki/object_recognition</url>

<build_depend>actionlib_msgs</build_depend>
<buildtool_depend>ament_cmake</buildtool_depend>

<buildtool_depend>rosidl_default_generators</buildtool_depend>

<build_depend>rosidl_default_generators</build_depend>

<build_depend>action_msgs</build_depend>
<build_depend>std_msgs</build_depend>
<build_depend>geometry_msgs</build_depend>
<build_depend>message_generation</build_depend>
<build_depend>sensor_msgs</build_depend>
<build_depend>shape_msgs</build_depend>
<build_depend>std_msgs</build_depend>

<run_depend>actionlib_msgs</run_depend>
<run_depend>geometry_msgs</run_depend>
<run_depend>message_runtime</run_depend>
<run_depend>sensor_msgs</run_depend>
<run_depend>shape_msgs</run_depend>
<run_depend>std_msgs</run_depend>
<exec_depend>rosidl_default_runtime</exec_depend>

<exec_depend>action_msgs</exec_depend>
<exec_depend>geometry_msgs</exec_depend>
<exec_depend>sensor_msgs</exec_depend>
<exec_depend>shape_msgs</exec_depend>
<exec_depend>std_msgs</exec_depend>

<buildtool_depend>catkin</buildtool_depend>
<member_of_group>rosidl_interface_packages</member_of_group>

<export>
<architecture_independent/>
<build_type>ament_cmake</build_type>
</export>
</package>

0 comments on commit 196045d

Please sign in to comment.