If, like me, you desire the most accurate turns possible when using the egpg.turn_degrees(90) method, the best wheel base parameter may end up having a two digit precision, such as 114.05 mm.
The latest Raspbian For Robots desktop GoPiGo3 Control Panel app will cut off the last digit. I have submitted an issue on github for this.
If you want to fix this temporarily, edit /home/pi/Dexter/GoPiGo3/Software/Python/Examples/Control_Panel/control_panel_gui_3.py
# self.wheel_base_input = wx.TextCtrl(self, value=str(wheel_base_width), size=(60, 40))
self.wheel_base_input = wx.TextCtrl(self, value=str(wheel_base_width), size=(70, 40))
Sounds simple enough. Do you want to go ahead and submit a Pull Request?
I will incorporate this into my updated control panel code.
How do we submit a pull request? What credentials/access rights do we need, if any?
I will be happy to send you one with.my updated code if you wish.
Do you think both parameters would benefit from the extra precision?
Because Wheel dia. Only has two digits before the decimal point the edit box already allows for two digit precision.
I have been looking at this, as I have incorporated the size change for the extra precision in the distance between wheels box.
One issue I notice, the input box strips trailing zeros and does not enforce two digit precision. (i.e. If you enter a number with a trailing zero in either of the two boxes, the trailing zero disappears. Excessive input precision causes the number to be chopped off on either side.)
I did a bit of looking at the wxPython classes/methods as well as the “param” class and its methods, and I believe that constraining and formatting the inputs there can be done. But it would be a BEAST (IMHO, based on my limited skill), requiring extensive modifications to the control panel software. (Your own evaluation would be valuable)
If, (and that’s a big if), I get the time to mess with the control panel In The Big Way, I would be looking at a total re-write as a tabbed interface that will allow tuning of a number of different parameters.
That’s in the distant future. I still want to figure out why the Pi-4 chews up the firmware and I have not figured out how the bit-clock constants are calculated - so I cannot confirm or deny that there might be issue with that, (These need to be calculated based on processor speed, and that can vary, so there’s a potential problem right there.)
I also want to continue work on the joystick controlled robot, so major rework to the control panel will have to wait in line unless an old code-hound like yourself wants to chew on it. (Yea, right!)
I’m always sniffing out stuff, but with the edit box showing two digits (when the last isn’t 0) solved my issue with the control panel.
Other sniffings of late:
- updated my HuskyLens firmware from 0.4.7stable to the latest 0.5.1norm
- investigated if python decorators with wrapped functions would allow @logrun to automatically add a “[file.main]Started” and “[file.main]Finished” to the run.log file - (Didn’t work right)
- Getting RPI-Monitor to work on PiOS
I really need to finish the OccupancyGrid project, and Carl really needs me to investigate line following the floor boards back to his dock so he can wander off without needing my assistance.
My “deep psychological reason” for not finishing either of those two so far is fear of failure. When things get tough, I seem to find something new and interesting to distract me. Months now, and I can’t bring myself to start to finish.
I don’t fear “failure”, I expect it. Mr. Murphy has been a close, dear friend of mine for decades. Sort of like pain. I’m the only person I know who can fall UP a flight of stairs and seriously injure himself. My friend Andy flat-out refuses to get within ten feet of me if I have knives or sharp tools in my hands. He does know where I keep the bandages, so it’s OK.
I already know that I will fail. I’m accustomed to failure so it holds no surprises for me. One of my favorite sayings is that when something doesn’t go as expected, you haven’t failed, you just haven’t finished succeeding yet.
Pegs the “angst” meter? Righty-Oh!
But there ain’t a dawggone thing I can do about it either, so why worry?
My “deep psychological reason” for not finishing things is that I get either bored or distracted. It keeps getting pushed further and further down the list until it falls off the table. A year or two later I find the remnants and say “I wonder what THAT was supposed to be?” Or, I find them and say “Damn it all! I forgot all about that!”, and then proceed to forget about it again. . .
Stinks being us, don’t it?