13 #include "wire_msgs/WorldEvidence.h" 14 #include "wire_msgs/WorldState.h" 51 const wire_msgs::ObjectEvidence& obj_ev = *it;
54 visualization_msgs::MarkerArray markers_msg;
58 world_evidence_marker_pub_.
publish(markers_msg);
74 const wire_msgs::ObjectState& obj = *it;
77 visualization_msgs::MarkerArray markers_msg;
81 world_state_marker_pub_.
publish(markers_msg);
94 if (!n.
getParam(
"marker_frame", marker_frame)) {
95 ROS_WARN(
"No marker_frame defined, using default frame");
101 ROS_ERROR(
"Parameter marker_frame must be of type string, using default frame");
113 int main(
int argc,
char **argv) {
118 if (!world_evidence_visualizer_.
setParameters(n,
"world_evidence")) {
121 if (!world_state_visualizer_.
setParameters(n,
"world_state")) {
138 world_evidence_marker_pub_ = n.
advertise<visualization_msgs::MarkerArray>(
"/visualization_markers/world_evidence", 10);
139 world_state_marker_pub_ = n.
advertise<visualization_msgs::MarkerArray>(
"/visualization_markers/world_state", 10);
int main(int argc, char **argv)
void worldStateCallback(const wire_msgs::WorldState::ConstPtr &msg)
void publish(const boost::shared_ptr< M > &message) const
Visualizer world_state_visualizer_
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
void setTFListener(tf::TransformListener *tf_listener)
Type const & getType() const
ROSCPP_DECL void spin(Spinner &spinner)
bool setParameters(ros::NodeHandle &n, const std::string &ns)
void worldEvidenceCallback(const wire_msgs::WorldEvidence::ConstPtr &msg)
Visualizer world_evidence_visualizer_
const string DEFAULT_MARKER_FRAME
const_iterator(const field< oT > &in_M, const bool at_end=false)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
bool createMarkers(const std_msgs::Header &header, long ID, const std::vector< wire_msgs::Property > &props, std::vector< visualization_msgs::Marker > &markers_out, const std::string &frame_id)
bool getParam(const std::string &key, std::string &s) const
bool getMarkerFrame(ros::NodeHandle &n)
ros::Publisher world_evidence_marker_pub_
ros::Publisher world_state_marker_pub_