Skip to content

Commit

Permalink
removed rebroadcaster
Browse files Browse the repository at this point in the history
  • Loading branch information
ret15108 committed Mar 23, 2018
1 parent dcc1171 commit 2d2fc03
Showing 1 changed file with 11 additions and 10 deletions.
21 changes: 11 additions & 10 deletions src/geo_controller.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,22 @@ def laser_subscriber(msg, thetas):
"""
I've hijacked this method to provide a visual of the thetas we're using
"""
publisher = rospy.Publisher("editscan", LaserScan, queue_size=10)
indices = interp(thetas, [msg.angle_min, msg.angle_max], [0, len(msg.ranges) - 1])
map(lambda x: int(x), indices)
# Drop everything but what we want.
for i in range(len(msg.ranges)):
if i not in indices:
msg.ranges[i] = 0
msg.intensities = 0
publisher.publish(msg)
#publisher = rospy.Publisher("editscan", LaserScan, queue_size=10)
#indices = interp(thetas, [msg.angle_min, msg.angle_max], [0, len(msg.ranges) - 1])
#map(lambda x: int(x), indices)
## Drop everything but what we want.
#for i in range(len(msg.ranges)):
# if i not in indices:
# msg.ranges[i] = 0
# msg.intensities = 0
#publisher.publish(msg)
pass

def main():
print("Geometric Controller Initialized")
rospy.init_node('geometric_controller_filter')
pub = rospy.Publisher("drive_parameters", drive_params)
laser_sub = rospy.Subscriber("scan", LaserScan, laser_subscriber, [-math.pi/2, -11*math.pi/24])
#laser_sub = rospy.Subscriber("scan", LaserScan, laser_subscriber, [-math.pi/2, -11*math.pi/24])
# rospy.spin()
counter = 0
while(not rospy.core.is_shutdown()):
Expand Down

0 comments on commit 2d2fc03

Please sign in to comment.