4

解析nav2_controller

 2 years ago
source link: https://charon-cheung.github.io/2022/06/23/ROS/ROS2/%E8%A7%A3%E6%9E%90nav2_controller/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

解析nav2_controller | 沉默杀手

解析nav2_controller
2022-06-23|ROSROS2|
Word count: 103|Reading time: 1 min

nav2_controller主要是实现了一个中间件的功能,具体的工作还是各种插件完成的,统一了接口,固定了流程,使得开发变得规范

nav2_controller/main.cpp

int main(int argc, char ** argv)
{
rclcpp::init(argc, argv);
auto node = std::make_shared<nav2_controller::ControllerServer>();
rclcpp::spin(node->get_node_base_interface());
rclcpp::shutdown();

return 0;
}

主要看ControllerServer的构造函数

单独开了一个cost_map的线程

rclcpp_lifecycle::LifecyclePublisher::on_activate

auto node = shared_from_this();

©2018 - 2022 By Charon Cheung
Driven - Hexo|Theme - Melody

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK