Skip to content
Permalink
Browse files

added battery status

  • Loading branch information...
martind
martind committed May 13, 2015
1 parent 346cf33 commit b2fbb84a10484e7c3f7744b1681ede96e6ddf0af
Showing with 5 additions and 1 deletion.
  1. +1 −1 ros/go.py
  2. +4 −0 ros/huskyros.py
@@ -92,7 +92,7 @@ def go( metalog, assertWrite, ipPair ):
prev = minDist[0]/1000.0
turnDiff = 160-minDist[1] # only flip
obstacleDir = -math.radians(turnDiff)/4.0 # TODO calibration via FOV
print prev, turnDiff
print prev, turnDiff, robot.power

if prev is None or prev < safeDist:
robot.setSpeedPxPa( 0, 0 )
@@ -35,6 +35,7 @@ def __init__( self, filename=None, replay=False, assertWrite=True, ipPair=None )
self.angularSpeed = 0.0
self.enc = None # unknown
self.time = None
self.power = None
self.imu = None
self.mag = None
self.azimuth = None
@@ -74,6 +75,9 @@ def update( self ):
self.time = data[0]
self.enc = data[1][0], data[2][0] # only distance traveled

if topic == '/husky/data/power_status':
self.power = data

def setSpeedPxPa( self, speed, angularSpeed ):
self.speed = speed
self.angularSpeed = angularSpeed

0 comments on commit b2fbb84

Please sign in to comment.
You can’t perform that action at this time.