Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/t/u/turtlebot-HEAD/linux_hardware/scripts/laptop_battery.py   turtlebot(Download)
import os  # to check path existence
 
from linux_hardware.msg import LaptopChargeStatus
from diagnostic_msgs.msg import DiagnosticStatus, DiagnosticArray, KeyValue
 
def _check_battery_state(_battery_acpi_path):
    """
    @return LaptopChargeStatus
    """
    rv = LaptopChargeStatus()
        self._last_info_update  = 0
        self._last_state_update = 0
        self._msg = LaptopChargeStatus()
 
        self._power_pub = rospy.Publisher('laptop_charge', LaptopChargeStatus, latch=True)