Skip to content

Commit

Permalink
Upgrade packages into foxy distro version from dashing distro version
Browse files Browse the repository at this point in the history
  • Loading branch information
hyunseok-yang committed Sep 24, 2020
1 parent 5b3267e commit f452069
Show file tree
Hide file tree
Showing 20 changed files with 202 additions and 195 deletions.
10 changes: 9 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,15 @@
# SPDX-License-Identifier: MIT
#

logs/
build/
install/

.vscode
*.code-workspace

tags

# Swap
[._]*.s[a-v][a-z]
!*.svg # comment out if you don't need vector files
Expand All @@ -32,4 +37,7 @@ tags


# to ignore generated code
driver_sim/include/protobuf/*
driver_sim/include/protobuf/*

# COLCON custom files
COLCON_IGNORE
6 changes: 3 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM ubuntu:18.04

ENV HOSTNAME sim-device
ENV ROS_DISTRO=dashing
ENV ROS_DISTRO=foxy

RUN apt update && apt upgrade -q -y && \
apt install -q -y locales curl gnupg2 lsb-release && \
Expand All @@ -17,8 +17,8 @@ RUN sh -c 'echo "deb [arch=$(dpkg --print-architecture)] http://packages.ros.org

RUN export DEBIAN_FRONTEND=noninteractive && \
apt update && \
apt install -y ros-${ROS_DISTRO}-ros-base git python3-colcon-common-extensions && \
apt install -y python3-websocket libzmq3-dev libprotobuf-dev protobuf-compiler ros-${ROS_DISTRO}-camera-info-manager && \
apt install -y ros-${ROS_DISTRO}-ros-base git python3-colcon-common-extensions g++ && \
apt install -y python3-websocket libzmq3-dev libprotobuf-dev protobuf-compiler ros-${ROS_DISTRO}-image-transport-plugins ros-${ROS_DISTRO}-camera-info-manager && \
apt autoclean && rm -rf /var/lib/apt/lists/*

RUN mkdir -p /opt/lge-ros2/src
Expand Down
65 changes: 26 additions & 39 deletions camera_driver_sim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -20,62 +20,49 @@ find_package(rclcpp REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(camera_info_manager REQUIRED)
find_package(image_transport REQUIRED)
find_package(sim_bridge REQUIRED)
find_package(driver_sim REQUIRED)

################################################################################
# Build
################################################################################
include_directories(include)

add_library(${PROJECT_NAME} SHARED
src/CameraDriverSim.cpp
)

ament_target_dependencies(${PROJECT_NAME}
set(dependencies
rclcpp
sensor_msgs
camera_info_manager
image_transport
sim_bridge
driver_sim)


add_executable(${PROJECT_NAME}-bin
src/main.cpp
driver_sim
)

target_link_libraries(${PROJECT_NAME}-bin ${PROJECT_NAME})

ament_target_dependencies(${PROJECT_NAME}-bin
rclcpp
sim_bridge
driver_sim)

################################################################################
# Install (Execution)
# Build
################################################################################
install(TARGETS ${PROJECT_NAME}-bin DESTINATION lib/${PROJECT_NAME})
set_target_properties(${PROJECT_NAME}-bin PROPERTIES OUTPUT_NAME ${PROJECT_NAME})
add_library(${PROJECT_NAME} SHARED
src/main.cpp
src/CameraDriverSim.cpp
)

################################################################################
# Install (Library)
################################################################################
ament_export_interfaces(export_${PROJECT_NAME} HAS_LIBRARY_TARGET)
ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME} ${dependencies})
target_include_directories(${PROJECT_NAME} PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)

install(
DIRECTORY include/
DESTINATION include
ament_target_dependencies(${PROJECT_NAME}
${dependencies}
)

install(
TARGETS ${PROJECT_NAME}
EXPORT export_${PROJECT_NAME}
################################################################################
# Install
################################################################################
install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION lib/${PROJECT_NAME}
INCLUDES DESTINATION include
)

install(DIRECTORY include/
DESTINATION include
)

ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})
ament_export_dependencies(${dependencies})

ament_package()
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#define _CameraDriverSim_H_

#include <driver_sim/driver_sim.hpp>
#include <image_transport/image_transport.h>
#include <camera_info_manager/camera_info_manager.h>
#include <image_transport/image_transport.hpp>
#include <camera_info_manager/camera_info_manager.hpp>
#include <sensor_msgs/msg/camera_info.hpp>
#include <protobuf/image_stamped.pb.h>
#include <protobuf/camerasensor.pb.h>
Expand Down
23 changes: 10 additions & 13 deletions depth_camera_driver_sim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@ endif()
################################################################################
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(camera_info_manager REQUIRED)
find_package(image_transport REQUIRED)
find_package(sim_bridge REQUIRED)
find_package(driver_sim REQUIRED)
find_package(camera_driver_sim REQUIRED)

set(dependencies
rclcpp
camera_driver_sim
)

################################################################################
# Build
################################################################################
Expand All @@ -35,17 +35,14 @@ add_executable(${PROJECT_NAME}
)

ament_target_dependencies(${PROJECT_NAME}
rclcpp
sensor_msgs
camera_info_manager
image_transport
sim_bridge
driver_sim
camera_driver_sim)
${dependencies}
)

################################################################################
# Install
################################################################################
install(TARGETS ${PROJECT_NAME} DESTINATION lib/${PROJECT_NAME})
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION lib/${PROJECT_NAME}
)

ament_package()
54 changes: 30 additions & 24 deletions driver_sim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,47 +16,53 @@ endif()

find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(geometry_msgs REQUIRED)
find_package(tf2_geometry_msgs REQUIRED)
find_package(tf2_ros REQUIRED)
find_package(sim_bridge REQUIRED)

file(GLOB protobuf_msg_srcs
./include/protobuf/*.pb.cc
)

set(dependencies
rclcpp
tf2_geometry_msgs
tf2_ros
sim_bridge
)

################################################################################
# Build
################################################################################
include_directories(include)

FILE(GLOB PROTOBUF_MSG_SRCS
./include/protobuf/*.pb.cc)

add_library(${PROJECT_NAME} SHARED
src/driver_sim.cpp
${PROTOBUF_MSG_SRCS})
${protobuf_msg_srcs}
)

target_include_directories(${PROJECT_NAME} PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:include>
)

ament_target_dependencies(${PROJECT_NAME}
rclcpp
geometry_msgs
tf2_ros
sim_bridge)
${dependencies}
)

################################################################################
# Install
################################################################################
ament_export_interfaces(export_${PROJECT_NAME} HAS_LIBRARY_TARGET)
ament_export_libraries(${PROJECT_NAME} ${dependencies})
ament_export_include_directories(include)

install(
DIRECTORY include/
DESTINATION include
)

install(
TARGETS ${PROJECT_NAME}
EXPORT export_${PROJECT_NAME}
install(TARGETS ${PROJECT_NAME}
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
RUNTIME DESTINATION bin
INCLUDES DESTINATION include
)

install(DIRECTORY include/
DESTINATION include
)

ament_export_dependencies(${dependencies})
ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})

ament_package()
2 changes: 1 addition & 1 deletion driver_sim/src/driver_sim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ SimBridge* DriverSim::GetSimBridge(const uint bridge_index)
{
if (bridge_index >= m_simBridgeList.capacity())
{
DBG_SIM_WRN("Wrong bridge index(%d) / total sim bridges(%d)", bridge_index, m_simBridgeList.capacity());
DBG_SIM_WRN("Wrong bridge index(%d) / total sim bridges(%lu)", bridge_index, m_simBridgeList.capacity());
return nullptr;
}

Expand Down
25 changes: 12 additions & 13 deletions elevator_system_sim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,17 @@ endif()
# Find colcon packages and libraries for colcon and system dependencies
################################################################################
find_package(ament_cmake REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_lifecycle REQUIRED)
find_package(driver_sim REQUIRED)
find_package(sim_bridge REQUIRED)
find_package(elevator_system_msgs REQUIRED)

set(dependencies
rclcpp_lifecycle
rosgraph_msgs
elevator_system_msgs
driver_sim
)

################################################################################
# Build
################################################################################
Expand All @@ -32,20 +37,14 @@ add_executable(${PROJECT_NAME}
src/main.cpp)

ament_target_dependencies(${PROJECT_NAME}
rclcpp
rclcpp_lifecycle
rosgraph_msgs
elevator_system_msgs
driver_sim
sim_bridge)
${dependencies}
)

################################################################################
# Install
################################################################################
install(TARGETS ${PROJECT_NAME} DESTINATION lib/${PROJECT_NAME})

################################################################################
# Test
################################################################################
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION lib/${PROJECT_NAME}
)

ament_package()
22 changes: 12 additions & 10 deletions gps_driver_sim/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ find_package(geometry_msgs REQUIRED)
find_package(sim_bridge REQUIRED)
find_package(driver_sim REQUIRED)

set(dependencies
rclcpp
sensor_msgs
geometry_msgs
driver_sim
)

################################################################################
# Build
################################################################################
Expand All @@ -32,19 +39,14 @@ add_executable(${PROJECT_NAME}
src/GPSDriverSim.cpp)

ament_target_dependencies(${PROJECT_NAME}
rclcpp
sensor_msgs
geometry_msgs
sim_bridge
driver_sim)
${dependencies}
)

################################################################################
# Install
################################################################################
install(TARGETS ${PROJECT_NAME} DESTINATION lib/${PROJECT_NAME})

################################################################################
# Test
################################################################################
install(TARGETS ${PROJECT_NAME}
RUNTIME DESTINATION lib/${PROJECT_NAME}
)

ament_package()
Loading

0 comments on commit f452069

Please sign in to comment.