[ros-users] [Discourse.ros.org] [ROS Projects] Tractobots, my attempts at field robots

Kyler Laird ros.discourse at gmail.com
Thu Apr 13 00:34:30 UTC 2017

BTW, here's the meat of my steering code.  (Prepare to be amazed.)

                                pid_output = self.pid_captured(self.cross_track_distance)
                                desired_heading = (self.course + minmax(-90, 90, pid_output)) % 360
                                bearing = degdiff(desired_heading - heading)
                                steer_for_bearing(bearing)  # horribly uncalibrated

Yup, that's right; I send the cross-track distance into a PID and then use the PID output to determine how big my intercept angle should be.  This was basically my first shot at a steering algorithm and it worked so well that I just kept using it.  But it's not working well enough now and there are so many parts that need improvement.

I'm thinking that if I throw an IMU into the mix, I could still use my algorithm but make the steering changes in response to IMU updates (at a very high rate).  So I'd use the old code to say "Steer 385 degrees" but use the IMU to help me direct the steering wheels there.

[Visit Topic](https://discourse.ros.org/t/tractobots-my-attempts-at-field-robots/1486/36) or reply to this email to respond.

More information about the ros-users mailing list