Depthimage_to_laserscan Installation and execution

Source: Internet
Author: User

Depthimage_to_laserscan Installation and execution

( Prerequisite: To properly install the Kinect driver )

1, download the Fuerte version, and put in the ROS implementation path, that is, Ros_package_path.

2, the implementation of Roscore.

3, execute Make,make all,maketest, in the bin file will generate 3 executable files, respectively, is

Depthimage_to_laserscan,libtest,test_dtl. Where Depthimage_to_laserscan is the primary node.

4, the implementation of Rostopic List–v, there will be a lot of camera under the topic, including the subscription of the topic scan.

5. mkdir build the. launch file and add the following content.

-------------Simple Version----------------

<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 Node---------

Published topic:

Image (Sensor_msgs/image)

Camera_info (Sensor_msgs/camerainfo)

Subscribe to the topic:

Scan (Sensor_msgs/laserscan)

6. Execute Roslaunch package name. launch File

7. Load the Openni.launch file in the. launch file (because to launch the Asusxtion Pro Live camera), the launch file must contain the camera node information.

The following is the nesting of other packages in a package.

As follows:

---------------------contain openni.launch files-----------------------

<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, the implementation of Roslaunch Depthimage_to_laserscan Depthimage_to_laserscan.launch

Execute Rosrun depthimage_to_laserscan Depthimage_to_laserscanimage:=/camera/depth/image_raw

9, the implementation of Rosrun Rviz Rviz, add camera and Laserscan, you can correctly output depth image and pseudo-laser point, as follows:

10. Accessories

Complex. Launch files

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

<launch>

<!--"Camera" should uniquelyidentify the device. All topics is pushed down

Into the "camera" namespace, and it's 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 the lazy subscribing, so would 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 generate the Laserscan. For each column,the scan would

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

<param name= "Scan_height" value= "ten"/>

<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>

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

Summarize:

input and output is the so-called topic, with Rviz to display

Published topic:

Image (Sensor_msgs/image)

Camera_info (Sensor_msgs/camerainfo)

Subscribe to the topic:

Scan (Sensor_msgs/laserscan)

Question: What is the difference between rosmake and make?

Rosmake is a compilation of workspaces created with Rosbuild (roscreate-pkg), Rosbuild is the traditional Ros compilation system, which belongs to the old version.

And make is the compilation of a package that already exists.

Depthimage_to_laserscan Installation and execution

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.