Skip to content

Commit

Permalink
Gaussian to uniform random RPMs
Browse files Browse the repository at this point in the history
  • Loading branch information
JacopoPan committed Oct 1, 2020
1 parent 86d805b commit f5de43d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def __init__(self):

#### Publish random RPMs on topic 'action' #########################################################
def action_callback(self):
random_rpm13 = random.gauss(self.env.HOVER_RPM+25, 500); random_rpm24 = random.gauss(self.env.HOVER_RPM+25, 500)
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]))
Expand Down

0 comments on commit f5de43d

Please sign in to comment.