17 #include "wire_msgs/WorldEvidence.h" 18 #include "wire_msgs/ObjectEvidence.h" 35 void addEvidence(wire_msgs::WorldEvidence& world_evidence,
double x,
double y,
double z,
const string& class_label) {
36 wire_msgs::ObjectEvidence obj_evidence;
38 obj_evidence.certainty = 1.0;
41 wire_msgs::Property posProp;
42 posProp.attribute =
"position";
44 obj_evidence.properties.push_back(posProp);
47 wire_msgs::Property classProp;
48 classProp.attribute =
"class_label";
52 obj_evidence.properties.push_back(classProp);
55 world_evidence.object_evidence.push_back(obj_evidence);
65 wire_msgs::WorldEvidence world_evidence;
67 world_evidence.header.frame_id =
"/map";
77 EVIDENCE_PUB.
publish(world_evidence);
79 time_last_cycle_ = time_now;
81 ROS_INFO(
"Published evidence with size %zu", world_evidence.object_evidence.size());
87 int main(
int argc,
char **argv) {
90 ros::init(argc,argv,
"dummy_evidence_publisher");
94 EVIDENCE_PUB = nh.
advertise<wire_msgs::WorldEvidence>(
"/world_evidence", 100);
ros::Publisher EVIDENCE_PUB
void publish(const boost::shared_ptr< M > &message) const
void addEvidence(wire_msgs::WorldEvidence &world_evidence, double x, double y, double z, const string &class_label)
ros::Time time_last_cycle_
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
int main(int argc, char **argv)
Publisher advertise(const std::string &topic, uint32_t queue_size, bool latch=false)
void setProbability(const std::string &value, double p)
void PDFtoMsg(const PDF &pdf, problib::PDF &msg)