Commit 3ad91fc5 authored by wangqibing's avatar wangqibing

add type3

parent c5b1c0a4
......@@ -870,10 +870,16 @@ void TrackingRos::ThreadTrackingProcess()
t_marker.scale.y = 4;
t_marker.scale.z = 4;
}
if(mark_type_text==3)
{
t_marker.scale.x = 4;
t_marker.scale.y = 4;
t_marker.scale.z = 4;
}
t_marker.color.a = 1.0;
t_marker.color.r = 0;
t_marker.color.g = 0;
t_marker.color.b = 1.0;
t_marker.color.g = 1.0;
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}",
......@@ -891,6 +897,11 @@ void TrackingRos::ThreadTrackingProcess()
t_marker.text = str;
}
if(mark_type_text==2)
{
sprintf(str,"%llu:%d",obj.obj_id,obj.type);
t_marker.text = str;
}
if(mark_type_text==3)
{
sprintf(str,"%llu:%.2f",obj.obj_id,sqrt(obj.v_x* obj.v_x + obj.v_y * obj.v_y) * 10);
t_marker.text = str;
......
......@@ -67,5 +67,5 @@ public:
std::string m_root_dir;//存储统一的根目录路径
std::string m_nodeName;//点位信息,现在就是10-1,1-1等信息
YAML::Node m_config;//配置的yaml文件
int mark_type_text = 0;//0-type,1-object_id,2-text...
int mark_type_text = 0;//0-type,1-object_id,2-object-type,3-text...
};
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