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

Port cartographer_ros_msgs to ROS2. #1542

Draft
wants to merge 1 commit into
base: ros2-dashing
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
87 changes: 47 additions & 40 deletions cartographer_ros_msgs/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,54 +12,61 @@
# See the License for the specific language governing permissions and
# limitations under the License.

cmake_minimum_required(VERSION 2.8.3)
cmake_minimum_required(VERSION 3.5)

project(cartographer_ros_msgs)

set(PACKAGE_DEPENDENCIES
geometry_msgs
std_msgs
)
# Default to C++14.
if(NOT CMAKE_CXX_STANDARD)
set(CMAKE_CXX_STANDARD 14)
endif()

find_package(catkin REQUIRED COMPONENTS message_generation ${PACKAGE_DEPENDENCIES})
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
# We don't use add_compile_options with pedantic in message packages
# because the Python C extensions don't comply with it.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wpedantic")
endif()

add_message_files(
DIRECTORY msg
FILES
BagfileProgress.msg
HistogramBucket.msg
LandmarkEntry.msg
LandmarkList.msg
MetricFamily.msg
MetricLabel.msg
Metric.msg
StatusCode.msg
StatusResponse.msg
SubmapEntry.msg
SubmapList.msg
SubmapTexture.msg
TrajectoryStates.msg
)
find_package(ament_cmake REQUIRED)
find_package(rosidl_default_generators REQUIRED)

find_package(builtin_interfaces REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(std_msgs REQUIRED)

add_service_files(
DIRECTORY srv
FILES
FinishTrajectory.srv
GetTrajectoryStates.srv
ReadMetrics.srv
StartTrajectory.srv
SubmapQuery.srv
TrajectoryQuery.srv
WriteState.srv
set(msg_files
"msg/BagfileProgress.msg"
"msg/HistogramBucket.msg"
"msg/LandmarkEntry.msg"
"msg/LandmarkList.msg"
"msg/MetricFamily.msg"
"msg/MetricLabel.msg"
"msg/Metric.msg"
"msg/StatusCode.msg"
"msg/StatusResponse.msg"
"msg/SubmapEntry.msg"
"msg/SubmapList.msg"
"msg/SubmapTexture.msg"
"msg/TrajectoryStates.msg"
)

generate_messages(
DEPENDENCIES
${PACKAGE_DEPENDENCIES}
set(srv_files
"srv/FinishTrajectory.srv"
"srv/GetTrajectoryStates.srv"
"srv/ReadMetrics.srv"
"srv/StartTrajectory.srv"
"srv/SubmapQuery.srv"
"srv/TrajectoryQuery.srv"
"srv/WriteState.srv"
)

catkin_package(
CATKIN_DEPENDS
${PACKAGE_DEPENDENCIES}
message_runtime
rosidl_generate_interfaces(${PROJECT_NAME}
${msg_files}
${srv_files}
DEPENDENCIES geometry_msgs std_msgs
ADD_LINTER_TESTS
)

ament_export_dependencies(rosidl_default_runtime)

ament_package()
18 changes: 13 additions & 5 deletions cartographer_ros_msgs/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
limitations under the License.
-->

<package format="2">
<package format="3">
<name>cartographer_ros_msgs</name>
<version>1.0.0</version>
<description>
Expand All @@ -32,12 +32,20 @@
The Cartographer Authors
</author>

<buildtool_depend>catkin</buildtool_depend>
<buildtool_depend>ament_cmake</buildtool_depend>
<buildtool_depend>rosidl_default_generators</buildtool_depend>

<depend>geometry_msgs</depend>
<depend>std_msgs</depend>

<build_depend>message_generation</build_depend>

<exec_depend>message_runtime</exec_depend>
<exec_depend>rosidl_default_runtime</exec_depend>

<member_of_group>rosidl_interface_packages</member_of_group>

<test_depend>ament_lint_auto</test_depend>
<test_depend>ament_lint_common</test_depend>

<export>
<build_type>ament_cmake</build_type>
</export>
</package>
2 changes: 1 addition & 1 deletion cartographer_ros_msgs/srv/ReadMetrics.srv
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@
---
cartographer_ros_msgs/StatusResponse status
cartographer_ros_msgs/MetricFamily[] metric_families
time timestamp
builtin_interfaces/Time timestamp