Skip to content

Commit

Permalink
Cleaning up code
Browse files Browse the repository at this point in the history
  • Loading branch information
NEStock committed Apr 18, 2021
1 parent 39def69 commit afefca3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
3 changes: 2 additions & 1 deletion cart_endpoints/scripts/motor_endpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ def motion_callback(self, planned_vel_angle):
# reset obstacle distance and brake time
self.obstacle_distance = -1
self.brake_time_used = 0
self.full_stop_count = 0

if self.vel > 0 and (self.state == STOPPED or self.state == BRAKING) and (time.time()- self.stopping_time) > 10:
self.state = MOVING
Expand All @@ -96,7 +97,7 @@ def motion_callback(self, planned_vel_angle):
self.state = BRAKING
self.brake = 0 # ramp up braking from 0
self.stopping_time = time.time()

self.new_vel = True

def debug_callback(self, msg):
Expand Down
1 change: 0 additions & 1 deletion cart_planning/scripts/local_planner.py
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,6 @@ def update(self, state, a, delta):
self.steering_pub.publish(display_angle)

# Check if any node wants us to stop
print(self.stop_requests)
for x in self.stop_requests.values():
if x[0]: # stop requested
msg.vel = 0
Expand Down

0 comments on commit afefca3

Please sign in to comment.