Skip to content

use events exec instaed of single threded one #1

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

Open
wants to merge 22 commits into
base: iron
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
03bd491
use events exec instaed of single threded one
jplapp Dec 26, 2023
4459c7d
disabe parameter events publishing
Jan 3, 2024
ee36bc8
add backward_ros
Jan 3, 2024
018eb9b
Declare rclcpp callbacks before the rcl entities (#2024)
mauropasse May 15, 2023
4120b79
add mutex to protect events_executor current entity collection (#2187)
alsora May 18, 2023
74f5221
Remove an unused variable from the events executor tests. (#2270)
clalancette Aug 9, 2023
a1a356c
fix(ClientGoalHandle): Made mutex recursive to prevent deadlocks (#2267)
jmachowinski Sep 7, 2023
07e90fd
Add locking to protect the TimeSource::NodeState::node_base_ (#2320)
clalancette Oct 3, 2023
9e4aaed
Revert "Add locking to protect the TimeSource::NodeState::node_base_ …
jplapp Jan 25, 2024
b0a956b
Revert "fix(ClientGoalHandle): Made mutex recursive to prevent deadlo…
jplapp Jan 25, 2024
6698620
Revert "Remove an unused variable from the events executor tests. (#2…
jplapp Jan 25, 2024
16aa7a1
Revert "add mutex to protect events_executor current entity collectio…
jplapp Jan 25, 2024
0e7c782
Revert "Declare rclcpp callbacks before the rcl entities (#2024)"
jplapp Jan 25, 2024
f6dd91d
Add transient local durability support to publisher and subscriptions…
jefferyyjhsu Jan 18, 2024
463fc84
.
HovorunB Jan 29, 2024
eb55410
.
HovorunB Jan 31, 2024
cb248c3
Merge pull request #2 from pixel-robotics/AMRNAV-6258_use_ipc
HovorunB Jan 31, 2024
0b8e250
Updated GenericSubscription to AnySubscriptionCallback (#1928)
DensoADAS Dec 19, 2023
c5cc2c1
Squashed commit of the following:
HovorunB Feb 6, 2024
8ef1ae3
.
HovorunB Feb 8, 2024
4506162
fix
HovorunB Feb 8, 2024
24be5b2
Merge pull request #3 from pixel-robotics/AMRNAV-6339
HovorunB Feb 20, 2024
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: 1 addition & 1 deletion rclcpp/include/rclcpp/node_options.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,7 +433,7 @@ class NodeOptions

bool start_parameter_services_ {true};

bool start_parameter_event_publisher_ {true};
bool start_parameter_event_publisher_ {false};

rcl_clock_type_t clock_type_ {RCL_ROS_TIME};

Expand Down
1 change: 1 addition & 0 deletions rclcpp_components/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
)
endif()

find_package(backward_ros REQUIRED)
find_package(ament_cmake_ros REQUIRED)
find_package(ament_index_cpp REQUIRED)
find_package(class_loader REQUIRED)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,15 @@
#include <unordered_map>

#include "rclcpp_components/component_manager.hpp"
#include <rclcpp/experimental/executors/events_executor/events_executor.hpp>

using rclcpp::experimental::executors::EventsExecutor;


namespace rclcpp_components
{
/// ComponentManagerIsolated uses dedicated single-threaded executors for each components.
template<typename ExecutorT = rclcpp::executors::SingleThreadedExecutor>
template<typename ExecutorT = EventsExecutor>
class ComponentManagerIsolated : public rclcpp_components::ComponentManager
{
using rclcpp_components::ComponentManager::ComponentManager;
Expand Down
1 change: 1 addition & 0 deletions rclcpp_components/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@

<buildtool_depend>ament_cmake_ros</buildtool_depend>

<build_depend>backward_ros</build_depend>
<build_depend>ament_index_cpp</build_depend>
<build_depend>class_loader</build_depend>
<build_depend>composition_interfaces</build_depend>
Expand Down
8 changes: 6 additions & 2 deletions rclcpp_components/src/component_container_isolated.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@
#include "rclcpp/utilities.hpp"
#include "rclcpp_components/component_manager_isolated.hpp"

#include <rclcpp/experimental/executors/events_executor/events_executor.hpp>

using rclcpp::experimental::executors::EventsExecutor;

int main(int argc, char * argv[])
{
/// Component container with dedicated single-threaded executors for each components.
Expand All @@ -33,15 +37,15 @@ int main(int argc, char * argv[])
}
}
// create executor and component manager
auto exec = std::make_shared<rclcpp::executors::SingleThreadedExecutor>();
auto exec = std::make_shared<EventsExecutor>();
rclcpp::Node::SharedPtr node;
if (use_multi_threaded_executor) {
using ComponentManagerIsolated =
rclcpp_components::ComponentManagerIsolated<rclcpp::executors::MultiThreadedExecutor>;
node = std::make_shared<ComponentManagerIsolated>(exec);
} else {
using ComponentManagerIsolated =
rclcpp_components::ComponentManagerIsolated<rclcpp::executors::SingleThreadedExecutor>;
rclcpp_components::ComponentManagerIsolated<EventsExecutor>;
node = std::make_shared<ComponentManagerIsolated>(exec);
}
exec->add_node(node);
Expand Down