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

Add thread dependency to examples (Rolling) #237

Merged
merged 13 commits into from
Jan 25, 2022
6 changes: 3 additions & 3 deletions rclc/test/rclc/test_action_client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@

#include <gtest/gtest.h>

#include <rclcpp/rclcpp.hpp>
#include <rclcpp_action/rclcpp_action.hpp>

extern "C"
{
#include <rclc/rclc.h>
#include <rclc/executor.h>
#include <example_interfaces/action/fibonacci.h>
}

#include <rclcpp/rclcpp.hpp>
#include <rclcpp_action/rclcpp_action.hpp>

#include <example_interfaces/action/fibonacci.hpp>

#include <chrono>
Expand Down
5 changes: 3 additions & 2 deletions rclc/test/rclc/test_action_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,6 @@

#include <gtest/gtest.h>

#include <rclcpp/rclcpp.hpp>
#include <rclcpp_action/rclcpp_action.hpp>

extern "C"
{
Expand All @@ -26,6 +24,9 @@ extern "C"
#include <example_interfaces/action/fibonacci.h>
}

#include <rclcpp/rclcpp.hpp>
#include <rclcpp_action/rclcpp_action.hpp>

#include <example_interfaces/action/fibonacci.hpp>
#include <chrono>
#include <thread>
Expand Down
2 changes: 2 additions & 0 deletions rclc_examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ find_package(std_msgs REQUIRED)
find_package(lifecycle_msgs REQUIRED)
find_package(example_interfaces REQUIRED)
find_package(rclc_parameter REQUIRED)
find_package(Threads REQUIRED)

include_directories(include)

Expand Down Expand Up @@ -57,6 +58,7 @@ add_executable(example_pingpong src/example_pingpong.cpp)
ament_target_dependencies(example_pingpong rcl rclc std_msgs)

add_executable(example_action_server src/example_action_server.c)
target_link_libraries(example_action_server Threads::Threads)
ament_target_dependencies(example_action_server rcl rcl_action rclc example_interfaces)

add_executable(example_action_client src/example_action_client.c)
Expand Down
1 change: 0 additions & 1 deletion rclc_examples/src/example_action_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@

#include <stdio.h>
#include <unistd.h>
#include <pthread.h>

#include <rcl/rcl.h>
#include <rcl/error_handling.h>
Expand Down
4 changes: 2 additions & 2 deletions rclc_parameter/test/rclc_parameter/test_parameter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@

#include <gtest/gtest.h>

#include <rclcpp/rclcpp.hpp>

extern "C"
{
#include <rclc/node.h>
#include <rclc_parameter/rclc_parameter.h>
}

#include <rclcpp/rclcpp.hpp>

#include <string>
#include <memory>
#include <vector>
Expand Down