From 2990f1a9f35b8078dc65c93dbadd10fda4083e82 Mon Sep 17 00:00:00 2001 From: maroqijalil Date: Sun, 18 Jun 2023 17:11:17 +0700 Subject: [PATCH] refactor: change based on comments and run linter --- LICENSE | 2 +- include/akushon/action/action.hpp | 2 +- include/akushon/action/model/action.hpp | 2 +- include/akushon/action/model/action_name.hpp | 2 +- include/akushon/action/model/pose.hpp | 2 +- include/akushon/action/node/action_manager.hpp | 2 +- include/akushon/action/node/action_node.hpp | 5 +++-- include/akushon/action/process/interpolator.hpp | 2 +- include/akushon/action/process/joint_process.hpp | 2 +- include/akushon/akushon.hpp | 2 +- include/akushon/config/config.hpp | 2 +- include/akushon/config/node/config_node.hpp | 2 +- include/akushon/config/utils/config.hpp | 2 +- include/akushon/node/akushon_node.hpp | 2 +- src/action_main.cpp | 2 +- src/akushon/action/model/action.cpp | 2 +- src/akushon/action/model/action_name.cpp | 2 +- src/akushon/action/model/pose.cpp | 2 +- src/akushon/action/node/action_manager.cpp | 2 +- src/akushon/action/node/action_node.cpp | 16 ++++++++-------- src/akushon/action/process/interpolator.cpp | 2 +- src/akushon/action/process/joint_process.cpp | 2 +- src/akushon/config/node/config_node.cpp | 2 +- src/akushon/config/utils/config.cpp | 2 +- src/akushon/node/akushon_node.cpp | 2 +- src/akushon_main.cpp | 2 +- src/interpolator_main.cpp | 2 +- 27 files changed, 36 insertions(+), 35 deletions(-) diff --git a/LICENSE b/LICENSE index 2ae239c..c22a5bc 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 Ichiro ITS +Copyright (c) 2021-2023 Ichiro ITS Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/include/akushon/action/action.hpp b/include/akushon/action/action.hpp index 8a85f14..f10e32d 100644 --- a/include/akushon/action/action.hpp +++ b/include/akushon/action/action.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 ICHIRO ITS +// Copyright (c) 2021-2023 ICHIRO ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/include/akushon/action/model/action.hpp b/include/akushon/action/model/action.hpp index f582262..409d48e 100644 --- a/include/akushon/action/model/action.hpp +++ b/include/akushon/action/model/action.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/include/akushon/action/model/action_name.hpp b/include/akushon/action/model/action_name.hpp index ac04d30..245b3de 100644 --- a/include/akushon/action/model/action_name.hpp +++ b/include/akushon/action/model/action_name.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/include/akushon/action/model/pose.hpp b/include/akushon/action/model/pose.hpp index 2f1ab7e..9c6af2f 100644 --- a/include/akushon/action/model/pose.hpp +++ b/include/akushon/action/model/pose.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/include/akushon/action/node/action_manager.hpp b/include/akushon/action/node/action_manager.hpp index 1062134..099d58a 100644 --- a/include/akushon/action/node/action_manager.hpp +++ b/include/akushon/action/node/action_manager.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/include/akushon/action/node/action_node.hpp b/include/akushon/action/node/action_node.hpp index 8914f48..ed213fb 100644 --- a/include/akushon/action/node/action_node.hpp +++ b/include/akushon/action/node/action_node.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -55,7 +55,8 @@ class ActionNode static std::string brake_action_topic(); static std::string status_topic(); - explicit ActionNode(rclcpp::Node::SharedPtr node, std::shared_ptr action_manager); + explicit ActionNode( + rclcpp::Node::SharedPtr node, std::shared_ptr & action_manager); bool start(const std::string & action_name); bool start(const Action & action); diff --git a/include/akushon/action/process/interpolator.hpp b/include/akushon/action/process/interpolator.hpp index b767c3d..e47631e 100644 --- a/include/akushon/action/process/interpolator.hpp +++ b/include/akushon/action/process/interpolator.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/include/akushon/action/process/joint_process.hpp b/include/akushon/action/process/joint_process.hpp index 71a2556..9393238 100644 --- a/include/akushon/action/process/joint_process.hpp +++ b/include/akushon/action/process/joint_process.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/include/akushon/akushon.hpp b/include/akushon/akushon.hpp index 232f76e..387fcaf 100644 --- a/include/akushon/akushon.hpp +++ b/include/akushon/akushon.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 ICHIRO ITS +// Copyright (c) 2021-2023 ICHIRO ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/include/akushon/config/config.hpp b/include/akushon/config/config.hpp index 12da550..6b79d89 100644 --- a/include/akushon/config/config.hpp +++ b/include/akushon/config/config.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 ICHIRO ITS +// Copyright (c) 2021-2023 ICHIRO ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/include/akushon/config/node/config_node.hpp b/include/akushon/config/node/config_node.hpp index 6e84c8c..f97c804 100644 --- a/include/akushon/config/node/config_node.hpp +++ b/include/akushon/config/node/config_node.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/include/akushon/config/utils/config.hpp b/include/akushon/config/utils/config.hpp index 268e443..20e53d5 100644 --- a/include/akushon/config/utils/config.hpp +++ b/include/akushon/config/utils/config.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/include/akushon/node/akushon_node.hpp b/include/akushon/node/akushon_node.hpp index 60144fe..17e0820 100644 --- a/include/akushon/node/akushon_node.hpp +++ b/include/akushon/node/akushon_node.hpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/action_main.cpp b/src/action_main.cpp index b705747..d09b48a 100644 --- a/src/action_main.cpp +++ b/src/action_main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/akushon/action/model/action.cpp b/src/akushon/action/model/action.cpp index 3e735c7..70da59f 100644 --- a/src/akushon/action/model/action.cpp +++ b/src/akushon/action/model/action.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/akushon/action/model/action_name.cpp b/src/akushon/action/model/action_name.cpp index 4661d79..e955fef 100644 --- a/src/akushon/action/model/action_name.cpp +++ b/src/akushon/action/model/action_name.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/akushon/action/model/pose.cpp b/src/akushon/action/model/pose.cpp index 3f18e5a..e1b9edc 100644 --- a/src/akushon/action/model/pose.cpp +++ b/src/akushon/action/model/pose.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/akushon/action/node/action_manager.cpp b/src/akushon/action/node/action_manager.cpp index 326f37e..b14ef80 100644 --- a/src/akushon/action/node/action_manager.cpp +++ b/src/akushon/action/node/action_manager.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/akushon/action/node/action_node.cpp b/src/akushon/action/node/action_node.cpp index 7aaa767..6a93872 100755 --- a/src/akushon/action/node/action_node.cpp +++ b/src/akushon/action/node/action_node.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -21,7 +21,6 @@ #include "akushon/action/node/action_node.hpp" #include -#include #include #include #include @@ -38,15 +37,16 @@ namespace akushon { -std::string ActionNode::get_node_prefix() { return "action"; } +std::string ActionNode::get_node_prefix() {return "action";} -std::string ActionNode::run_action_topic() { return get_node_prefix() + "/run_action"; } +std::string ActionNode::run_action_topic() {return get_node_prefix() + "/run_action";} -std::string ActionNode::brake_action_topic() { return get_node_prefix() + "/brake_action"; } +std::string ActionNode::brake_action_topic() {return get_node_prefix() + "/brake_action";} -std::string ActionNode::status_topic() { return get_node_prefix() + "/status"; } +std::string ActionNode::status_topic() {return get_node_prefix() + "/status";} -ActionNode::ActionNode(rclcpp::Node::SharedPtr node, std::shared_ptr action_manager) +ActionNode::ActionNode( + rclcpp::Node::SharedPtr node, std::shared_ptr & action_manager) : node(node), action_manager(action_manager), initial_pose(Pose("initial_pose")) { { @@ -86,7 +86,7 @@ ActionNode::ActionNode(rclcpp::Node::SharedPtr node, std::shared_ptrcreate_subscription( brake_action_topic(), 10, - [this](std::shared_ptr message) { this->action_manager->brake(); }); + [this](std::shared_ptr message) {this->action_manager->brake();}); } bool ActionNode::start(const std::string & action_name) diff --git a/src/akushon/action/process/interpolator.cpp b/src/akushon/action/process/interpolator.cpp index ab664fa..7822e91 100644 --- a/src/akushon/action/process/interpolator.cpp +++ b/src/akushon/action/process/interpolator.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/akushon/action/process/joint_process.cpp b/src/akushon/action/process/joint_process.cpp index c496cea..5e237a3 100644 --- a/src/akushon/action/process/joint_process.cpp +++ b/src/akushon/action/process/joint_process.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/akushon/config/node/config_node.cpp b/src/akushon/config/node/config_node.cpp index 4125da7..7baa907 100644 --- a/src/akushon/config/node/config_node.cpp +++ b/src/akushon/config/node/config_node.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/akushon/config/utils/config.cpp b/src/akushon/config/utils/config.cpp index f38f666..462eaab 100644 --- a/src/akushon/config/utils/config.cpp +++ b/src/akushon/config/utils/config.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/akushon/node/akushon_node.cpp b/src/akushon/node/akushon_node.cpp index c13fb7e..0db0315 100644 --- a/src/akushon/node/akushon_node.cpp +++ b/src/akushon/node/akushon_node.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/akushon_main.cpp b/src/akushon_main.cpp index 16265c4..235997a 100644 --- a/src/akushon_main.cpp +++ b/src/akushon_main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal diff --git a/src/interpolator_main.cpp b/src/interpolator_main.cpp index 5e2813d..4400612 100644 --- a/src/interpolator_main.cpp +++ b/src/interpolator_main.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2021 Ichiro ITS +// Copyright (c) 2021-2023 Ichiro ITS // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal