21 #include <boost/optional.hpp> 24 #include <visualization_msgs/MarkerArray.h> 25 #include <std_msgs/UInt8.h> 28 #include "psen_scan_v2/ZoneSetConfiguration.h" 62 catch (std::out_of_range
const&
e)
66 <<
" of your scanner does not exist in the provided configuration!");
92 for (
const auto& marker : new_markers)
102 auto has_lm_namespace = [&lm](visualization_msgs::Marker& x) {
return x.ns == lm.ns; };
105 auto marker = visualization_msgs::Marker();
106 marker.action = visualization_msgs::Marker::DELETE;
112 last_markers_.clear();
117 auto ma = visualization_msgs::MarkerArray();
void publishCurrentMarkers()
static const std::string DEFAULT_ACTIVE_ZONESET_TOPIC
#define ROS_ERROR_STREAM_THROTTLE(period, args)
void addMarkers(std::vector< visualization_msgs::Marker > &new_markers)
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
void zonesetCallback(const ZoneSetConfiguration &zoneset_config)
ros::Subscriber active_zoneset_subscriber_
bool isAllInformationAvailable() const
static const std::string DEFAULT_ZONECONFIGURATION_TOPIC
ZoneSet activeZoneset() const
Contains the events needed to define and implement the scanner protocol.
void activeZonesetCallback(const std_msgs::UInt8 &zoneset_config)
void publish(const boost::shared_ptr< M > &message) const
boost::optional< ZoneSetConfiguration > zoneset_config_
ros::Publisher zoneset_markers_
ZoneSet getActiveZoneset() const
Root namespace for the ROS part.
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
boost::optional< std_msgs::UInt8 > active_zoneset_id_
ros::Subscriber zoneset_subscriber_
static const std::string DEFAULT_ZONESET_MARKER_ARRAY_TOPIC
std::vector< visualization_msgs::Marker > current_markers_
ActiveZonesetNode(ros::NodeHandle &nh)
Constructor.
std::vector< visualization_msgs::Marker > toMarkers(const ZoneSet &zoneset)
std::vector< visualization_msgs::Marker > last_markers_
void addDeleteMessageForUnusedLastMarkers()