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

Function main

nodes/ros_kitti.cpp:180–213  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

178}
179
180int main(int argc, char **argv) {
181 ros::init(argc, argv, "Benchmark");
182 ros::NodeHandle nh;
183 condParam<string>(&nh, "/algorithm", algorithm, "patchwork", "");
184 condParam<string>(&nh, "/seq", seq, "00", "");
185 condParam<bool>(&nh, "/is_kitti", is_kitti, true, "");
186
187 PatchworkGroundSeg.reset(new PatchWork<PointType>(&nh));
188
189 LabeledCloudPublisher =
190 nh.advertise<sensor_msgs::PointCloud2>("/benchmark/labeled_cloud", 100, true);
191
192 CloudPublisher = nh.advertise<sensor_msgs::PointCloud2>("/benchmark/cloud", 100, true);
193 TPPublisher = nh.advertise<sensor_msgs::PointCloud2>("/benchmark/TP", 100, true);
194 FPPublisher = nh.advertise<sensor_msgs::PointCloud2>("/benchmark/FP", 100, true);
195 FNPublisher = nh.advertise<sensor_msgs::PointCloud2>("/benchmark/FN", 100, true);
196 GroundPublisher = nh.advertise<sensor_msgs::PointCloud2>("/patchwork/ground", 100, false);
197 NonGroundPublisher = nh.advertise<sensor_msgs::PointCloud2>("/patchwork/non_ground", 100, false);
198
199 PrecisionPublisher = nh.advertise<visualization_msgs::Marker>("/precision", 1, true);
200 RecallPublisher = nh.advertise<visualization_msgs::Marker>("/recall", 1, true);
201
202 ros::Subscriber NodeSubscriber =
203 nh.subscribe<sensor_msgs::PointCloud2>("/patchwork/cloud", 5000, callbackNode);
204
205 if (is_kitti) {
206 std::cout << "\033[1;33mKITTI mode is activated. If not, please check "
207 "`is_kitti` parameter\033[0m"
208 << std::endl;
209 }
210 ros::spin();
211
212 return 0;
213}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected