commit
28175f458d
1 changed files with 6 additions and 2 deletions
|
@ -123,13 +123,17 @@ public:
|
||||||
void spin_node_some(rclcpp::node::Node::SharedPtr & node)
|
void spin_node_some(rclcpp::node::Node::SharedPtr & node)
|
||||||
{
|
{
|
||||||
this->add_node(node, false);
|
this->add_node(node, false);
|
||||||
// non-blocking = true
|
spin_some();
|
||||||
|
this->remove_node(node, false);
|
||||||
|
}
|
||||||
|
|
||||||
|
virtual void spin_some()
|
||||||
|
{
|
||||||
while (AnyExecutable::SharedPtr any_exec =
|
while (AnyExecutable::SharedPtr any_exec =
|
||||||
get_next_executable(std::chrono::milliseconds::zero()))
|
get_next_executable(std::chrono::milliseconds::zero()))
|
||||||
{
|
{
|
||||||
execute_any_executable(any_exec);
|
execute_any_executable(any_exec);
|
||||||
}
|
}
|
||||||
this->remove_node(node, false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Support dynamic switching of memory strategy
|
// Support dynamic switching of memory strategy
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue