点云技术相关产学研社区

 找回密码
 立即注册加入PCL中国点云技术相关产学研社区

扫一扫,访问微社区

查看: 2708|回复: 2

openptrack中person tracking学习(行人的位置信息)

[复制链接]
发表于 2018-2-5 18:34:01 | 显示全部楼层 |阅读模式
官网上persontracking教程    (https://github.com/OpenPTrack/open_ptrack/wiki/Tracking
       运行以上命令,在打开的rviz中,添加显示类型PointCloud2,选择topic,如/tracker/history,在显示窗口中就可以观察到相应人员的行动轨迹。
1、执行rosrun  rqt_graphrqt_graph命令可显示当前运行的节点和话题:
    发现tracking  node与ground_based_people_detector_node间通过haardispada  node(在detector_kinect1.launch中启动)联系。可通过launch中type参数和CMakeLists.txt文件确定node的cpp文件,以下是前面提到的三个node中相关topic和消息类型:
查看detection包下ground_based_people_detector_node.cpp:
//Publishers:
detection_pub= nh.advertise<DetectionArray>(output_topic,3);                                                     其中output_topic(查看launch文件可知) 为:/ground_based_people_detector_$(arg camera_name)/detections

查看tracking包下tracker_node.cpp:
//Subscribers
ros::Subscriber input_sub = nh.subscribe("input", 5,detection_cb);               
    其中input (查看launch文件可知)  为: /detector/detections
    回调函数 void detection_cb(const opt_msgs::DetectionArray::ConstPtr&msg){…}

查看haardispada_node .cpp:
pub_detections_=node_advertise<DetectionArray>("/detector/detections",3);
sub_detections_.subscribe(node_,"input_detections",qs);
    其中input_detections(查看launch文件可知) 为:/ground_based_people_detector_$(arg camera_name)/detections
2、DetectionArray(openptrack自定义消息类型)结构如下
Header header
opt_msgs/Detection[] detections
float64[] intrinsic_matrix
string confidence_type
string image_type
     其中opt_msgs/Detection[] 结构如下:
         opt_msgs/BoundingBox3D box_3D
         opt_msgs/BoundingBox2D box_2D

         geometry_msgs/Vector3 centroid
         geometry_msgs/Vector3 bottom
         geometry_msgs/Vector3 top

         float64 height
         float64 confidence
         float64 distance
         bool occluded

3、在命令行中打出上文中两个topic的信息(通过rostopic echo [topic]命令):

图片左边为topic--/ground_based_people_detector_$(arg camera_name)/detections
右边为topic-- /detector/detections
对比可发现,在相同ros time时,两个topic中DetectionArray消息的各参数值除seq,confidence,confidence_type,image_type不同外均相同,与行人位置信息有关的centroid,bottom,top并未改变。


本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册加入PCL中国点云技术相关产学研社区

x
回复

使用道具 举报

 楼主| 发表于 2018-3-29 10:14:17 | 显示全部楼层
  ros 下声音的播放 :
    
(
const std::string &
s
)

  播放WAVOGG文件。播放一次WAVOGG文件。 播放可以通过stopWavestopAll停止。
 参数:
 s  WAVOGG文件的文件名。 必须是运行sound_play节点的计算机上的绝对路径。并且路径中不能含有下划线。

    使用时必须先运行sound_play节点。
回复 支持 反对

使用道具 举报

 楼主| 发表于 2018-4-2 10:24:38 | 显示全部楼层
本帖最后由 ssyy123 于 2018-4-2 10:50 编辑
ssyy123 发表于 2018-3-29 10:14
ros 下声音的播放 :

  播放WAV或OGG文件。播放一次WAV或OGG文件。 播放可以通过stopWave或stopAll停止 ...

sound_play::SoundClient Class
将消息发布到sound_play节点的类。

该类是一个辅助类,用于通过sound_play :: SoundRequest消息与sound_play节点进行通信。 它有两种使用方式:

它可以创建代表可以播放,重复或停止的特定声音的Sound类。
它为每个可以调用sound_play :: SoundRequest消息的方式提供方法。

并且在创建sound_play::SoundClient实例时,使用了ros::NodeHandle的对象,因此不能在定义ros::NodeHandle对象前定义sound_play::SoundClient对象。

参考网址:http://docs.ros.org/jade/api/sou ... 1_1SoundClient.html
回复 支持 反对

使用道具 举报

本版积分规则

QQ|小黑屋|点云技术相关产学研社区 ( 陕ICP备13001629号 )

GMT+8, 2024-5-1 10:58 , Processed in 1.698037 second(s), 17 queries .

Powered by Discuz! X3.4

© 2001-2017 Comsenz Inc.

快速回复 返回顶部 返回列表