Jetbot ROS

Having a hard time configuring ros on my sparkfun jetbot v3. I am following the installation instruction at:

https://github.com/dusty-nv/jetbot_ros

I am stuck at the command:

rosrun jetbot_ros jetbot_motors.py

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

You might try [filing an issue on that repo to see if the author can help.](Issues · dusty-nv/jetbot_ros · GitHub)

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:

pip2 install sparkfun-qwiic-scmd

I hope this helps someone.

I hope this post helps someone, too. We appreciate you taking the time to post this information here.

If we don’t hear back from you we wish you a happy New Year!

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?