I get the error below. I have restarted the jetbot and searched on various platforms,but no luck. I think there should be some custom sparkfun jetbot_motors.py. Anyhow, i need help to resolve this.
Traceback (most recent call last):
File "/home/jetbot/workspace/catkin_ws/src/jetbot_ros/scripts/jetbot_motors.py", line 5, in <module>
from Adafruit_MotorHAT import Adafruit_MotorHAT
ImportError: No module named Adafruit_MotorHAT
I managed to resolve it. First the adafruits import is not needed. Since we are using sparkfun jetbot with qwiic motor drivers, we need to install and import only that. That is import qwiic_scmd. The drivers can be located at: https://github.com/sparkfun/Qwiic_SCMD_Py. One must play a little with the examples in the folder to understand how the motors are controlled. Having done this, one can then replace the adafruits commands with the sparkfun qwiic commands. One issue that can crop up is failure to import qwiic_scmd. This might be caused by qwiic_scmd being installed in python3 instead of python2. Install it in python2 by running:
Thanks for sharing, I’ve been running into this exact issue as well. Would you be willing to share what changes you made exactly to jetbot_ros? (perhaps via github)?
Hey, If someone could help me figure out what the new rosrun command needs to be with the qwiic repo installed that would be great. It’s weird I keep trying to input:
“rosrun Qwiic_SCMD_Py qwiic_scmd.py”
but it just keeps telling me:
“[rospack] Error: package ‘Qwiic_SCMD_Py’ not found”
I used the pip2 install command within my catkin_ws/src space. I then input catkin_make. I then input cd ~ and tried my modified rosrun command from there. What am I missing? Am I sourcing the space wrong? Is that the wrong rosrun command?