ROS相机数据转LaserScan

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

<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>
  • 0
    点赞
  • 22
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 5
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

刀么克瑟拉莫

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值