-
Notifications
You must be signed in to change notification settings - Fork 0
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
AMRNAV-6169 Extend use of composition: ros2 control #1
AMRNAV-6169 Extend use of composition: ros2 control #1
Conversation
… resource manager (backport ros-controls#1271) (ros-controls#1278)" This reverts commit 9387936.
controller_name, namespace_, node_options, false); // disable LifecycleNode service interfaces | ||
controller_name, namespace_, rclcpp::NodeOptions().enable_logger_service(true).arguments({ | ||
"--ros-args", | ||
"--remap", ("__node:=" + controller_name).c_str()}), false); // disable LifecycleNode service interfaces |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remapping with the same name, otherwise the name is overriden from the composable node container (amr_container)
init_timer_ = this->create_wall_timer( | ||
1s, | ||
[this]() -> void { | ||
init_timer_->cancel(); | ||
update_loop(); | ||
}); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Workaround to execute the update_loop thread from outside the constructor
@@ -465,6 +511,52 @@ void ControllerManager::init_resource_manager(const std::string & robot_descript | |||
} | |||
} | |||
|
|||
|
|||
void ControllerManager::update_loop(){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For normal launch this same code is ran from ros2_control_node
. But for launching controller_manager as a composed node we have to run it from inside controller manager
@@ -41,6 +41,7 @@ target_compile_definitions(hardware_interface PRIVATE "HARDWARE_INTERFACE_BUILDI | |||
|
|||
add_library(mock_components SHARED | |||
src/mock_components/generic_system.cpp | |||
src/lexical_casts.cpp |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤷♂️
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm!
Ticket: https://lvserv01.logivations.com/browse/AMRNAV-6169
Documentation: https://coda.io/d/Autonomous-Mobile-Robot_da82dg_s4hc/Composable-Nodes_suvus?searchClick=0d961e16-bddd-4703-ac21-3d9465d6bcfb_a82dg_s4hc#_luraL
Changes in this PR:
See the PR comments for the rest of the changes