Skip to content

Commit

Permalink
Removed trailing white spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
JacopoPan committed Oct 1, 2020
1 parent f5de43d commit 478ce8c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def step_callback(self):
msg.data[5], msg.data[6], msg.data[7], msg.data[8], msg.data[9],
msg.data[10], msg.data[11], msg.data[12], msg.data[13], msg.data[14],
msg.data[15], msg.data[16], msg.data[17], msg.data[18], msg.data[19]))

#### Read the action (RPMs) to apply to CtrlAviary from topic 'action' #############################
def get_action_callback(self, msg):
self.get_logger().info('I received action: "%f" "%f" "%f" "%f"' % (msg.data[0], msg.data[1], msg.data[2], msg.data[3]))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,14 @@ def __init__(self):
self.timer = self.create_timer(timer_period_sec, self.action_callback)
#### Subscribe to topic 'obs' ######################################################################
self.obs_subscription = self.create_subscription(Float32MultiArray, 'obs', self.get_obs_callback, 1); self.obs_subscription # prevent unused variable warning

#### Publish random RPMs on topic 'action' #########################################################
def action_callback(self):
random_rpm13 = random.uniform(.9,1.1)*self.env.HOVER_RPM; random_rpm24 = random.uniform(.9,1.1)*self.env.HOVER_RPM
msg = Float32MultiArray(); msg.data = [random_rpm13,random_rpm24,random_rpm13,random_rpm24]
self.publisher_.publish(msg)
self.get_logger().info('Publishing action: "%f" "%f" "%f" "%f"' % (msg.data[0], msg.data[1], msg.data[2], msg.data[3]))

#### Read the state of drone 0 from topic 'obs' ####################################################
def get_obs_callback(self, msg):
self.get_logger().info('I received obs: "%f" "%f" "%f" "%f" "%f" "%f" "%f" "%f" "%f" "%f" "%f" "%f" "%f" "%f" "%f" "%f" "%f" "%f" "%f" "%f"' \
Expand Down

0 comments on commit 478ce8c

Please sign in to comment.