Depthimage_to_laserscan安装并执行

Depthimage_to_laserscan安装并执行

前提:以正确安装kinect驱动

1、下载fuerte版本的,并放在ros的执行路径,即ROS_PACKAGE_PATH。

2、执行roscore。

3、执行make,make all,maketest,在bin文件里会生成3个可执行文件,分别是

depthimage_to_laserscan,libtest,test_dtl。其中depthimage_to_laserscan为主要节点。

4、执行rostopic list –v,会有很多camera下的话题,包括订阅的话题scan。

5、mkdir构建.launch文件,并加入以下内容。

-------------简洁版----------------

<launch>

<nodepkg="depthimage_to_laserscan"  type="depthimage_to_laserscan"name="depthimage_to_laserscan" args= “standalone depthimage_to_lasersacn/DepthImageToLaserScanNodelet”>

<remap from="image"    to="/camera/depth_registered/image_raw"/>

<remap from="camera_info" to="/camera/depth_registered/camera_info"/>

<remap from="scan" to="/kinect_scan"/>

<param name="range_max" type="double"value="4"/>

</node>

</launch>

-----------------------------------

----------- depthimage_to_laserscan节点---------

发布的话题:

Image(sensor_msgs/Image)

Camera_info(sensor_msgs/CameraInfo)

订阅的话题:

Scan(sensor_msgs/LaserScan)

6、执行roslaunch 包名 .launch文件

7、在.launch文件中加载openni.launch文件(因为要启动ASUSXtion pro live摄像头),launch文件必须包含摄像头节点信息。

以下就是在一个包里嵌套其它的包。

如下:

---------------------包含openni.launch文件-----------------------

<launch>

<include file="$(find openni_launch)/launch/openni.launch"/ >

<nodepkg="depthimage_to_laserscan"  type="depthimage_to_laserscan"name="depthimage_to_laserscan" args= “standalone depthimage_to_lasersacn/DepthImageToLaserScanNodelet  /camera/rgb/image_viewer”>

<remap from="image"    to="/camera/depth_registered/image_raw"/>

<remap from="camera_info"to="/camera/depth_registered/camera_info"/>

<remap from="scan" to="/kinect_scan"/>

<param name="range_max"type="double" value="4"/>

</node>

</launch>

--------------------------------------------

8、执行roslaunch depthimage_to_laserscan depthimage_to_laserscan.launch

执行 rosrun depthimage_to_laserscan depthimage_to_laserscanimage:=/camera/depth/image_raw

9、执行rosrun rviz rviz,添加camera和laserscan,就能正确输出depth image和伪激光点,如下所示:

10、附件

复杂的.launch文件

-------------------------------------------

<launch>

<!-- "camera" should uniquelyidentify the device. All topics are pushed down

into the "camera" namespace, and it is prepended to tf frameids. -->

<arg name="camera"     default="camera"/>

<arg name="publish_tf" default="true"/>

<!-- Factory-calibrated depth registration -->

<arg name="depth_registration"              default="true"/>

<arg     if="$(argdepth_registration)" name="depth"value="depth_registered" />

<arg unless="$(arg depth_registration)"name="depth" value="depth" />

<!--Driver parameters -->

<arg name="color_depth_synchronization"     default="false" />

<arg name="auto_exposure"                   default="true"/>

<arg name="auto_white_balance"              default="true" />

<!-- Processing Modules -->

<argname="rgb_processing"                 default="true"/>

<arg name="ir_processing"                  default="true"/>

<arg name="depth_processing"                default="true"/>

<arg name="depth_registered_processing"     default="true"/>

<arg name="disparity_processing"            default="true"/>

<arg name="disparity_registered_processing"default="true"/>

<arg name="scan_processing"                 default="true"/>

<!-- Worker threads for the nodelet manager -->

<arg name="num_worker_threads" default="4" />

<include file="$(findopenni_launch)/launch/openni.launch">

</include>

<!-- Laserscan topic -->

<arg name="scan_topic" default="scan"/>

<!--                       Laserscan

This uses lazy subscribing, so will not activate until scan isrequested.

-->

<group if="$(arg scan_processing)">

<node pkg="depthimage_to_laserscan"type="depthimage_to_laserscan"name="depthimage_to_laserscan" args="loaddepthimage_to_laserscan/DepthImageToLaserScanNodelet $(arg camera)/$(argcamera)_nodelet_manager">

<!-- Pixel rows to use to generate the laserscan. For each column,the scan will

return the minimum value for those pixels centered vertically in theimage. -->

<param name="scan_height" value="10"/>

<param name="output_frame_id" value="/$(argcamera)_depth_frame"/>

<param name="range_min" value="0.45"/>

<remap from="image" to="$(arg camera)/$(argdepth)/image_raw"/>

<remap from="scan" to="$(arg scan_topic)"/>

<remap from="$(arg camera)/image" to="$(argcamera)/$(arg depth)/image_raw"/>

<remap from="$(arg camera)/scan" to="$(argscan_topic)"/>

</node>

</group>

</launch>

--------------------------------------------

总结:

输入输出就是所谓的话题,用rviz进行显示

发布的话题:

Image(sensor_msgs/Image)

Camera_info(sensor_msgs/CameraInfo)

订阅的话题:

Scan(sensor_msgs/LaserScan)

问题:rosmake与make的区别?

rosmake是用在rosbuild(roscreate-pkg)创建工作空间的编译,rosbuild是ROS传统的编译系统,属于老版本。

而make是对已经存在了的包进行的编译。

时间: 2024-07-28 20:23:18

Depthimage_to_laserscan安装并执行的相关文章

lnmp源码安装-脚本执行

lnmp 源码安装- 脚本执行 源码包版本: nginx1.9 mysql5.6.4 php5.6 使用: 将lnmp.tar.gz 解压至 根目录下,进入/lnmp/install/目录下,执行install.sh脚本即可.选择性安装! 安装过程中会有些警告信息显示,不影响. 整合包地址:http://pan.baidu.com/s/1dFp7gqP =======================代码============================= #!/bin/bash #####

Inno Setup入门(十一)——完成安装后执行某些程序

Inno Setup入门(十一)——完成安装后执行某些程序 2011-02-16 16:24:23|  分类: Inno Setup |  标签:inno  setup   |举报 |字号 订阅 下载LOFTER客户端 有些时候我们的程序虽然能够很好的完成安装,但是程序的配置工作可能需要其他的一些程序来辅助完成,如果不执行这些程序,主程序就不能很好的完成工作,甚至不能完成工作,一个很明显的例子是,目前许多程序是通过NET技术开发的,这就要求计算机上必须安装有.net Framework,否则主程

《深入浅出pig系列之中的一个》pig-0.12.0-cdh5.1.2的安装与执行

这里使用的版本号是cdh发行的pig-0.12.0-cdh5.1.2 下载地址点这里 1.Pig简单介绍: Pig是yahoo捐献给apache的一个项目.它是SQL-like语言.是在MapReduce上构建的一种高级查询语言,把一些运算编译进MapReduce模型的Map和Reduce中,而且用户能够定义自己的功能.这是Yahoo开发的又一个克隆Google的项目:Sawzall. Pig是一个client应用程序,就算你要在Hadoop集群上执行Pig.也不须要在集群上装额外的东西 2.安

一步一步讲解如何安装并执行Grunt-contrib-watch插件

我们已经学会了如何配置NodeJS Git Grunt 这章我们将要学习如何使用watch任务 如果还没有学习NodeJS Git Grunt的童鞋们请先阅读以下三章:NodeJs教程: http://blog.csdn.net/itpinpai/article/details/48103845Git教程: http://blog.csdn.net/itpinpai/article/details/48105445Grunt教程:http://blog.csdn.net/itpinpai/art

Inno Setup入门(十一)&mdash;&mdash;完成安装后执行某些程序

有些时候我们的程序虽然能够很好的完成安装,但是程序的配置工作可能需要其他的一些程序来辅助完成,如果不执行这些程序,主程序就不能很好的完成工作,甚至不能完成工作,一个很明显的例子是,目前许多程序是通过NET技术开发的,这就要求计算机上必须安装有.net Framework,否则主程序运行不了,只有预先安装了NET Framework后主程序才能得以运行.这个时候可以通过Run段,指定程序完成安装后.在安装程序显示最终对话框之前要执行的程序. 设想有个主程序为ipmsg.exe,初始化程序为init

Linux下安装网卡执行make install失败

先安装的SuSE12系统,没有网卡驱动,试着自己安装 在网上下载了tar安装包,加压后执行make编译,出现如下错误: [/usr/src/e1000e-1.9.5/src]# makeMakefile:71: *** Kernel header files not in any of the expected locations.Makefile:72: *** Install the appropriate kernel development package, e.g.Makefile:7

【Hadoop】MAC下hadoop2.6安装以及执行wordcount

首先简单介绍下博主的配置环境 MAC 10.10.0 hadoop 2.6 JDK 1.6(可以在shell里用jdk -version查询) hadoop安装 安装的话推荐使用mac下面的brew,理由就是用brew安装的话,它会自动给帮你配置好相应的路径.当然也可以到官网下载,注意jdk和hadoop版本要对应. brew install hadoop 安装好了之后,可以使用brew list hadoop 来查看. 位置应该是在:/usr/local/Cellar/hadoop/ 这时候就

aix7.1安装12c执行root.sh无法启动ohasd服务案例

一.安装环境 操作系统版本:IBM AIX 7100-03-05-1524 ORACLE版本:ORACLE DATABASE 12C 12.1.0.2.0-64BIT RAC 二.安装报错 该环境安装的为12c RAC,在节点一执行root.sh脚本时,出现如下信息: 2018/03/29 17:11:43 CLSRSC-330: ADDing clusterware entries to file '/etc/inittab' 2018/03/29 17:13:49 CLSRSC-214: F

安装oracle执行runInstaller文件时报错:“……/install/.oui:Permission denied”

一:问题描述 二:出错原因 将windows下未解压的Oracle安装软件上传到了linux服务器,导致有三个文件的执行权限丢失. 三:解决方法 为其赋予相应权限即可. 1: [root@MyPc ~]# chmod 777 /download/database_10g_64/runInstaller 2: [root@MyPc install]# chmod 777 /download/database_10g_64/install/.oui 3: [root@MyPc install]# c