EasyFleet
A simple-by-default framework for multi-robot, multi-capability fleets built on ROS 2
Toggle main menu visibility
Loading...
Searching...
No Matches
routes_publisher.hpp
1
// Copyright 2026 Intelligent Robotics Lab
2
//
3
// This file is part of the project EasyFleet
4
// Licensed under the Apache License, Version 2.0 (the "License");
5
// you may not use this file except in compliance with the License.
6
// You may obtain a copy of the License at
7
//
8
// http://www.apache.org/licenses/LICENSE-2.0
9
//
10
// Unless required by applicable law or agreed to in writing, software
11
// distributed under the License is distributed on an "AS IS" BASIS,
12
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
// See the License for the specific language governing permissions and
14
// limitations under the License.
15
16
#ifndef EASYFLEET_NAVIGATION_MANAGER__ROUTES_PUBLISHER_HPP_
17
#define EASYFLEET_NAVIGATION_MANAGER__ROUTES_PUBLISHER_HPP_
18
19
#include <memory>
20
#include <string>
21
22
#include "easynav_routes_maps_manager/msg/routes_map.hpp"
23
#include "easynav_routes_maps_manager/routes_map.hpp"
24
#include "interactive_markers/interactive_marker_server.hpp"
25
#include "rclcpp/rclcpp.hpp"
26
#include "visualization_msgs/msg/interactive_marker_feedback.hpp"
27
#include "visualization_msgs/msg/marker_array.hpp"
28
29
namespace
easyfleet
30
{
31
80
class
RoutesPublisher
81
{
82
public
:
95
void
publish
(rclcpp::Node & node);
96
97
private
:
99
void
publish_routes_msg();
100
102
void
publish_routes_markers();
103
107
void
publish_interactive_markers();
108
114
void
handle_interactive_feedback(
115
const
visualization_msgs::msg::InteractiveMarkerFeedback::ConstSharedPtr & feedback);
116
121
void
recompute_next_route_id();
122
126
void
save_routes();
127
128
rclcpp::Node * node_ {
nullptr
};
129
std::string map_path_;
130
easynav::RoutesMap routes_;
131
int
next_route_id_ {0};
132
133
rclcpp::Publisher<easynav_routes_maps_manager::msg::RoutesMap>::SharedPtr pub_;
134
rclcpp::Publisher<visualization_msgs::msg::MarkerArray>::SharedPtr markers_pub_;
135
std::shared_ptr<interactive_markers::InteractiveMarkerServer> imarker_server_;
136
rclcpp::TimerBase::SharedPtr markers_republish_timer_;
137
};
138
139
}
// namespace easyfleet
140
141
#endif
// EASYFLEET_NAVIGATION_MANAGER__ROUTES_PUBLISHER_HPP_
easyfleet::RoutesPublisher
Publishes a RoutesMap on /global_routes, and keeps it live-editable.
Definition
routes_publisher.hpp:81
easyfleet::RoutesPublisher::publish
void publish(rclcpp::Node &node)
Read "routes.package"/"routes.map_path_file" from node, load the routes they name,...
Definition
routes_publisher.cpp:37
easyfleet_navigation_manager
include
easyfleet_navigation_manager
routes_publisher.hpp
Generated by
1.17.0