This commit is contained in:
Max 2021-09-21 13:43:07 +01:00
parent 035928260d
commit 5c3106935d
2 changed files with 2 additions and 1 deletions

View File

@ -172,6 +172,7 @@ def queue_executor_thread():
if DO_FORK_ALIGN: if DO_FORK_ALIGN:
FORKLIFT.set_state("MANIPULATING_CARGO") FORKLIFT.set_state("MANIPULATING_CARGO")
FORKLIFT.zero_fork_vert_pickup() FORKLIFT.zero_fork_vert_pickup()
executor_logger.info("Aligning forks with holes...")
align_forks_sucess = __align_forks_with_holes(HOLE_ALIGNMENT_SYSTEM) align_forks_sucess = __align_forks_with_holes(HOLE_ALIGNMENT_SYSTEM)
if not align_forks_sucess: if not align_forks_sucess:
executor_logger.critical("Fork hole alignment was not successful, check logs !") executor_logger.critical("Fork hole alignment was not successful, check logs !")

View File

@ -167,7 +167,7 @@ class VisionCargoApproacher:
delta = self.steering_law.calculate(error_x, error_theta) # getting the steering angle from the control law delta = self.steering_law.calculate(error_x, error_theta) # getting the steering angle from the control law
# delta_PWM = remap(delta, -0.8, 0.8, 1000, 2000) # delta_PWM = remap(delta, -0.8, 0.8, 1000, 2000)
delta_PWM = remap(delta, 0.7, -0.7, 1900, 1100) # Converting steering law output into PWM values delta_PWM = remap(delta, 0.7, -0.7, 1900, 1100) # Converting steering law output into PWM values
little_log = f"Error y: {delta} | error theta {error_x} | steering_raw {error_theta} | steering_conv: {delta_PWM}, tag_area: {area}" little_log = f"Error y: {delta} | error theta {error_x} | steering_raw {error_theta} | steering_conv: {delta_PWM}, tag_area: {area};;;"
self.log.info(little_log) self.log.info(little_log)
with open(self.steering_log_file, 'a+') as myfile: with open(self.steering_log_file, 'a+') as myfile: