Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions action_tutorials/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,3 @@ Once the action is finished executing, the action client logs the resulting sequ

- [action_tutorials_cpp](./action_tutorials_cpp) implements the described action server and client using the rclcpp library in C++.
- [action_tutorials_py](./action_tutorials_py) implements the described action server and client using the rclpy library in Python.
- [action_tutorials_interfaces](./action_tutorials_interfaces) defines the interface for the Fibonacci action.
This interface takes an *order* as a goal, returns a *partial sequence* as feedback and a *sequence* as a result.
23 changes: 12 additions & 11 deletions action_tutorials/action_tutorials_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,29 @@ endif()

# find dependencies
find_package(ament_cmake REQUIRED)
find_package(action_tutorials_interfaces REQUIRED)
find_package(example_interfaces REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rclcpp_action REQUIRED)
find_package(rclcpp_components REQUIRED)

include_directories(include)

add_library(action_tutorials SHARED
src/fibonacci_action_client.cpp
src/fibonacci_action_server.cpp)
rclcpp_components_register_node(action_tutorials PLUGIN "action_tutorials_cpp::FibonacciActionClient" EXECUTABLE fibonacci_action_client)
rclcpp_components_register_node(action_tutorials PLUGIN "action_tutorials_cpp::FibonacciActionServer" EXECUTABLE fibonacci_action_server)
target_compile_definitions(action_tutorials
PRIVATE "ACTION_TUTORIALS_CPP_BUILDING_DLL")
ament_target_dependencies(action_tutorials
"action_tutorials_interfaces"
"rclcpp"
"rclcpp_action"
"rclcpp_components")

install(TARGETS
action_tutorials
target_include_directories(action_tutorials PRIVATE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>")
target_link_libraries(action_tutorials PRIVATE
${example_interfaces_TARGETS}
rclcpp::rclcpp
rclcpp_action::rclcpp_action
rclcpp_components::component
)

install(TARGETS action_tutorials
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)
Expand Down
2 changes: 1 addition & 1 deletion action_tutorials/action_tutorials_cpp/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<buildtool_depend>ament_cmake</buildtool_depend>

<depend>action_tutorials_interfaces</depend>
<depend>example_interfaces</depend>
<depend>rclcpp</depend>
<depend>rclcpp_action</depend>
<depend>rclcpp_components</depend>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#include <string>
#include <sstream>

#include "action_tutorials_interfaces/action/fibonacci.hpp"
#include "example_interfaces/action/fibonacci.hpp"
#include "rclcpp/rclcpp.hpp"
#include "rclcpp_action/rclcpp_action.hpp"
#include "rclcpp_components/register_node_macro.hpp"
Expand All @@ -28,7 +28,7 @@ namespace action_tutorials_cpp
class FibonacciActionClient : public rclcpp::Node
{
public:
using Fibonacci = action_tutorials_interfaces::action::Fibonacci;
using Fibonacci = example_interfaces::action::Fibonacci;
using GoalHandleFibonacci = rclcpp_action::ClientGoalHandle<Fibonacci>;

ACTION_TUTORIALS_CPP_PUBLIC
Expand Down Expand Up @@ -82,7 +82,7 @@ class FibonacciActionClient : public rclcpp::Node
{
std::stringstream ss;
ss << "Next number in sequence received: ";
for (auto number : feedback->partial_sequence) {
for (auto number : feedback->sequence) {
ss << number << " ";
}
RCLCPP_INFO(this->get_logger(), "%s", ss.str().c_str());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

#include <memory>

#include "action_tutorials_interfaces/action/fibonacci.hpp"
#include "example_interfaces/action/fibonacci.hpp"
#include "rclcpp/rclcpp.hpp"
#include "rclcpp_action/rclcpp_action.hpp"
#include "rclcpp_components/register_node_macro.hpp"
Expand All @@ -26,7 +26,7 @@ namespace action_tutorials_cpp
class FibonacciActionServer : public rclcpp::Node
{
public:
using Fibonacci = action_tutorials_interfaces::action::Fibonacci;
using Fibonacci = example_interfaces::action::Fibonacci;
using GoalHandleFibonacci = rclcpp_action::ServerGoalHandle<Fibonacci>;

ACTION_TUTORIALS_CPP_PUBLIC
Expand Down Expand Up @@ -85,7 +85,7 @@ class FibonacciActionServer : public rclcpp::Node
rclcpp::Rate loop_rate(1);
const auto goal = goal_handle->get_goal();
auto feedback = std::make_shared<Fibonacci::Feedback>();
auto & sequence = feedback->partial_sequence;
auto & sequence = feedback->sequence;
sequence.push_back(0);
sequence.push_back(1);
auto result = std::make_shared<Fibonacci::Result>();
Expand Down
203 changes: 0 additions & 203 deletions action_tutorials/action_tutorials_interfaces/CHANGELOG.rst

This file was deleted.

31 changes: 0 additions & 31 deletions action_tutorials/action_tutorials_interfaces/CMakeLists.txt

This file was deleted.

10 changes: 0 additions & 10 deletions action_tutorials/action_tutorials_interfaces/README.md

This file was deleted.

This file was deleted.

28 changes: 0 additions & 28 deletions action_tutorials/action_tutorials_interfaces/package.xml

This file was deleted.

Loading