MCPcopy Create free account
hub / github.com/LimHyungTae/patchwork / pub_score

Function pub_score

nodes/ros_kitti.cpp:34–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

32bool is_kitti;
33
34void pub_score(std::string mode, double measure) {
35 static int SCALE = 5;
36 visualization_msgs::Marker marker;
37 marker.header.frame_id = PatchworkGroundSeg->frame_patchwork;
38 marker.header.stamp = ros::Time();
39 marker.ns = "my_namespace";
40 marker.id = 0;
41 marker.type = visualization_msgs::Marker::TEXT_VIEW_FACING;
42 marker.action = visualization_msgs::Marker::ADD;
43 if (mode == "p") marker.pose.position.x = 28.5;
44 if (mode == "r") marker.pose.position.x = 25;
45 marker.pose.position.y = 30;
46
47 marker.pose.position.z = 1;
48 marker.pose.orientation.x = 0.0;
49 marker.pose.orientation.y = 0.0;
50 marker.pose.orientation.z = 0.0;
51 marker.pose.orientation.w = 1.0;
52 marker.scale.x = SCALE;
53 marker.scale.y = SCALE;
54 marker.scale.z = SCALE;
55 marker.color.a = 1.0; // Don't forget to set the alpha!
56 marker.color.r = 0.0;
57 marker.color.g = 1.0;
58 marker.color.b = 0.0;
59 // only if using a MESH_RESOURCE marker type:
60 marker.text = mode + ": " + std::to_string(measure);
61 if (mode == "p") PrecisionPublisher.publish(marker);
62 if (mode == "r") RecallPublisher.publish(marker);
63}
64
65template <typename T>
66pcl::PointCloud<T> cloudmsg2cloud(sensor_msgs::PointCloud2 cloudmsg) {

Callers 1

callbackNodeFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected