ROS相机数据转LaserScan

来源:互联网 发布:谭铁牛 人工智能 编辑:程序博客网 时间:2024/06/07 16:40

1.点云转LaserScan

<launch>    <node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="-0.0 0.0 0 0 0.0 0.0 base_link camera_link 100"/>    <!-- run pointcloud_to_laserscan node -->    <node pkg="pointcloud_to_laserscan" type="pointcloud_to_laserscan_node" name="pointcloud_to_laserscan">        <remap from="cloud_in" to="/camera/depth/points"/>        <remap from="scan" to="/orbbec/scan"/>        <rosparam>            target_frame: camera_link # Leave disabled to output scan in pointcloud frame            transform_tolerance: 0.01            min_height: 0.0            max_height: 1.0            angle_min: -1.5708 # -M_PI/2            angle_max: 1.5708 # M_PI/2            angle_increment: 0.0087 # M_PI/360.0            scan_time: 0.3333            range_min: 0.45            range_max: 4.0            use_inf: true            # Concurrency level, affects number of pointclouds queued for processing and number of threads used            # 0 : Detect number of cores            # 1 : Single threaded            # 2->inf : Parallelism level            concurrency_level: 1        </rosparam>    </node></launch>
  • 本人使用的是奥比中光的深度相机
  • 使用点云的数据量较大,会影响发布频率

2.深度图转LaserScan

<launch>    <!-- <node pkg="tf" type="static_transform_publisher" name="base_to_camera" args="-0.17 0.0 0 0 0.0 0.0 base_link camera_link 100"/> -->    <node pkg="depthimage_to_laserscan" type="depthimage_to_laserscan" name="depthimage_to_laserscan" args="standalone depthimage_to_lasersacn/DepthImageToLaserScanNodelet" >        <remap from="image" to="camera/depth/image_raw"/>        <remap from="camera_info" to="camera/depth/camera_info"/>        <remap from="scan" to="/scan"/>        <param name="range_max" type="double" value="4" />        <param name="scan_height" type="int" value="449" />    </node></launch>
  • depthimage_to_laserscan使用的是lazy subscribing,即当scan被订阅时才发布。

3.多个LaserScan融合

  • 使用ira_laser_tools
  • 注意提供tf数据
<launch>        <node pkg="ira_laser_tools" name="laserscan_multi_merger" type="laserscan_multi_merger" output="screen">        <param name="destination_frame" value="/base_link"/>        <param name="cloud_destination_topic" value="/merged_cloud"/>        <param name="scan_destination_topic" value="/scan"/>                <param name="laserscan_topics" value ="/orbbec/scan /rplidar/scan" /> <!-- LIST OF THE LASER SCAN TOPICS TO SUBSCRIBE -->    </node></launch>
原创粉丝点击