Skip to content

Commit

Permalink
Adapt to ROS2 Dashing: automatically declare paramter
Browse files Browse the repository at this point in the history
Fix issue intel#55

According to discussion in RCLCPP, for ROS2 Dashing release,
"declare parameter" is expected to load configures from yaml file.

See detail discussion here:
ros2/rclcpp#715

Signed-off-by: Sharron LIU <[email protected]>
  • Loading branch information
Sharron LIU committed Jul 2, 2019
1 parent afdfa10 commit af08271
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
10 changes: 6 additions & 4 deletions realsense_ros2_camera/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,12 @@ if(UNIX OR APPLE)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pie")
endif()

find_package(librealsense2)
if(NOT librealsense2_FOUND)
message(FATAL_ERROR "\n\n Intel RealSense SDK 2.0 is missing, please install it from https://github.com/IntelRealSense/librealsense/releases\n\n")
endif()
#find_package(librealsense2)
#if(NOT librealsense2_FOUND)
# message(FATAL_ERROR "\n\n Intel RealSense SDK 2.0 is missing, please install it from https://github.com/IntelRealSense/librealsense/releases\n\n")
#endif()
find_library(librealsense2_LIBRARIES realsense2)
find_path(librealsense2_INCLUDE_DIRS librealsense2/rs.hpp)

if(CMAKE_BUILD_TYPE EQUAL "RELEASE")
message(STATUS "Create Release Build.")
Expand Down
3 changes: 2 additions & 1 deletion realsense_ros2_camera/src/realsense_camera_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ class RealSenseCameraNode : public rclcpp::Node
{
public:
RealSenseCameraNode()
: Node("RealSenseCameraNode"),
: Node("RealSenseCameraNode",
rclcpp::NodeOptions().automatically_declare_parameters_from_overrides(true)),
_ros_clock(RCL_ROS_TIME),
_serial_no(""),
_base_frame_id(""),
Expand Down

0 comments on commit af08271

Please sign in to comment.