Commit 7c3eff67 authored by oscar's avatar oscar

只显示id

parent 52c5171c
......@@ -587,8 +587,9 @@ void TrackingRos::ThreadTrackingProcess()
t_marker.color.b = 0;
t_marker.lifetime = ros::Duration(0.5);
char str[512] = {};
sprintf(str, "id:{%llu},type:{%d},type_name:{%s},v:{%.2f}m/s,No:{%s}\ncolor_name:{%s},timestamp:{%llu}",
obj.obj_id, obj.type, obj.name.c_str(), sqrt(obj.v_x* obj.v_x + obj.v_y * obj.v_y) * 10, obj.license_plate_number.c_str(), obj.color_name.c_str(), obj.frame);
//sprintf(str, "id:{%llu},type:{%d},type_name:{%s},v:{%.2f}m/s,No:{%s}\ncolor_name:{%s},timestamp:{%llu}",
// obj.obj_id, obj.type, obj.name.c_str(), sqrt(obj.v_x* obj.v_x + obj.v_y * obj.v_y) * 10, obj.license_plate_number.c_str(), obj.color_name.c_str(), obj.frame);
sprintf(str, "id:%llu",obj.obj_id);
t_marker.text = str;
//t_marker.text = 'id:{0},type:{1},type_name:{2},v:{3:.2f}m/s,No:{4}\ncolor_name:{5},timestamp:{6}'.format(msg.obj_id, msg.type, msg.name, math.sqrt(msg.v_x * msg.v_x + msg.v_y * msg.v_y) * 10, msg.license_plate_number, msg.color_name, msg.frame)
sendMarkers.markers.emplace_back(t_marker);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment