Alternative API for the ThunderBorg Controllers
Forums:
Hi all, I've just uploaded to PyPi an alternative API for the ThunderBorg controller. This code has been around for a few years and already has some users. I just fixed a few bugs and decided to release the code so it can be pip installed.
I'm a professional Python developer with over 20 years of experience and have been writing code in general for over 40 years.
My repository is: https://github.com/cnobile2012/python-thunderborg
The PIP website is: https://pypi.org/project/python-thunderborg/
The same code works on both Python 2.7 and 3.4 and higher. I've tried it with 3.8 with no issues.
It features auto-detection of the supply voltage and a few other features. The examples use the newer hand controller API approxeng package (https://github.com/ApproxEng/approxeng.input) that's specifically written for robotics.
You can contact me at carl.nobile@gmail.com.
icemonk
Sun, 10/24/2021 - 06:35
Permalink
hi cnobile2017
hi cnobile2017,
thanks for posting this, i am taking a look now. One question i have is why you are saying not to use print() statements. Does it cause a problem for smooth timing ? I am running ros2 from a Docker container , so using Docker's standard capture and logging system...
Thanks,
icemonk
cnobile2017
Sun, 10/24/2021 - 17:47
Permalink
print() statements
Hi @icemonk,
1. If your code is running as a daemon you will never see the stuff you put in print() statements because there is no terminal for them to print to. This is also true if you are just running your code in the background and you leave the terminal, which will also kill you app unless you use nohup.
2. Using print() statements also means that you have no record of what happened after the terminal is closed. Log files will preserve everything assuming you set up the logging correctly.
3. I don't really have any experience with docker, but using proper logging allows you to format logs consistently which print statements will not do even if they can be captured.
I hope this helps,
Carl