Navigation

    蓝鲸ROS机器人论坛

    • Register
    • Login
    • Search
    • Categories
    • Tags
    • Popular
    ROS交流群
    ROS Group
    产品服务
    Product Service
    开源代码库
    Github
    官网
    Official website
    技术交流
    Technological exchanges
    激光雷达
    LIDAR
    ROS教程
    ROS Tourials
    深度学习
    Deep Learning
    机器视觉
    Computer Vision

    小强机器人红外传感器如何关闭?

    技术交流
    2
    2
    2220
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • 思念远方
      思念远方 last edited by

      小强的红外传感器如何关闭?我记得之前您说过在launch文件中加如下代码可以关闭,但现在无法关闭啊


      weijiz 1 Reply Last reply Reply Quote 0
      • weijiz
        weijiz @思念远方 last edited by

        @思念远方 可以查看这里的代码。这里就是控制红外开关的。然后上面的32行订阅了/barDetectFlag topic,所以只要向这个topic发送消息就可以控制红外开关了。

        打开红外

        rostopic pub /barDetectFlag std_msgs/Bool '{data: true}'  -1
        

        关闭红外

        rostopic pub /barDetectFlag std_msgs/Bool '{data: false}'  -1
        
        1 Reply Last reply Reply Quote 0
        • 1 / 1
        • First post
          Last post
        Copyright © 2015-2023 BlueWhale community