Skip to content

Commit

Permalink
update lidar indices
Browse files Browse the repository at this point in the history
  • Loading branch information
IanLalonde committed Nov 11, 2024
1 parent 766cc95 commit a93d663
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions racecar_autopilot/racecar_autopilot/wall_estimator.py
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def read_scan( self, scan_msg ):
theta_data = []
n_good_scan = 0

for i in range(70,110):
for i in range(140,220):

scan_is_good = (( ranges[i] > scan_msg.range_min) &
( ranges[i] < scan_msg.range_max) )
Expand Down Expand Up @@ -83,7 +83,7 @@ def read_scan( self, scan_msg ):
theta_data = []
n_good_scan = 0

for i in range(250,290):
for i in range(500,580):

scan_is_good = (( ranges[i] > scan_msg.range_min) &
( ranges[i] < scan_msg.range_max) )
Expand Down Expand Up @@ -126,16 +126,16 @@ def pub_estimate( self ):

msg = Twist()

msg.linear.y = self.y_estimation
msg.angular.z = self.theta_estimation
msg.linear.y = float(self.y_estimation)
msg.angular.z = float(self.theta_estimation)

# debug

msg.linear.x = self.y_left
msg.linear.z = self.y_right
msg.linear.x = float(self.y_left)
msg.linear.z = float(self.y_right)

msg.angular.x = self.theta_left
msg.angular.y = self.theta_right
msg.angular.x = float(self.theta_left)
msg.angular.y = float(self.theta_right)


self.pub_y.publish( msg )
Expand All @@ -150,4 +150,4 @@ def main(args=None):
##############################################

if __name__ == '__main__':
main()
main()

1 comment on commit a93d663

@MarcOlivierFecteau
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: the person(s) who found the bug didn't get credit ;)

Please sign in to comment.