-
Notifications
You must be signed in to change notification settings - Fork 183
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Testing Errors in jetbot_motors.py and jetbot_oled.py #37
Comments
Hi @asoong98 , I think the SparkFun components may required their own drivers based on Qwiic. I think that because they have their own image for SparkFun JetBot: https://learn.sparkfun.com/tutorials/assembly-guide-for-sparkfun-jetbot-ai-kit/5-software-setup-guide-from-nvidia Although I think they have their own ROS nodes too. |
Hi @dusty-nv, thanks for the response. I think you're right, my problem is that my version of the Jetbot uses the Qwiic connectors. I've reflashed my SD card with the SparkFun image, but the jetbot_ros library that they have preinstalled is yours, which is written for Adafruit. Do you happen to know of any Qwiic alternatives? I'll also follow up with SparkFun and see what they say. Thanks! |
I'm encountering this same error. I found a thread on Sparkfun's forums about it here: Here's the repo they say you need: If you open up this package you'll see that there's a python node seemingly comparable to the jetbot_motors.py node. I've still been struggling with getting this to work for me. I cloned this repo as well as another dependency that was required which is also mentioned on the same page, into my ~/catkin_ws/src. I then performed catkin_make and sourced my devel space before trying to rosrun the proper node from this sparkfun package and I got a "rospack: error no package by that exists" error. I played around by using the rospack command to find the jetbot_ros package and it worked so now I'm mystified completely haha. But maybe we can all put our heads together and figure it out? |
@asoong98 There is a fork of this repo, for the SparkFun hardware: https://github.com/sparkfun/jetbot_ros I originally, didn't put in changes for the OLED display because the code from the jetbot repo would be running as a background service, on our custom images anyways. Also, having two different sets of code controlling the screen caused issues. I just started a new branch to allow for the use or either of the Adafruit or SparkFun recommended hardware: https://github.com/sparkfun/jetbot_ros/tree/update-hardware_scan |
wow this is awesome. Thanks for reaching out!
…On Fri, Jun 25, 2021 at 6:17 AM santaimpersonator ***@***.***> wrote:
@asoong98 <https://github.com/asoong98> There is a fork of this repo, for
the SparkFun hardware: https://github.com/sparkfun/jetbot_ros
I originally, didn't put in changes for the OLED display because the code
from the jetbot repo would be running as a background service, on our
custom images anyways. Also, having two different sets of code controlling
the screen caused issues.
I just started a new branch to allow for the use or either of the Adafruit
or SparkFun recommended hardware:
https://github.com/sparkfun/jetbot_ros/tree/update-hardware_scan
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#37 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADDZ5CPPGCUWA6MVH6LOWPLTUR6U7ANCNFSM4V6VC4SA>
.
|
Well, after testing a debugging a bunch. SparkFun can't provide support for the OLED display with Jetbot ROS. Unfortunately, Jetbot ROS relies on Python 2, which breaks the utilization of the OLED Python package functionality at multiple points. Our package was intended to be utilized with Python 3, since Python 2 has long been deprecated.
That being said, tying in the Qwiic SCMD package was straight forward and the code appears to work with our hardware. Currently, I don't have an Adafruit Motor HAT to test. If someone could verify the functionality, that would be awesome. Then I can submit a pull request. To test the new code implementation, checkout this branch of our repo:
|
Aw man, that's too bad!
Forgive me but it's been a while since I've returned to this so I'm just
trying to understand where this is right now. So you're saying I would be
able to get the jetbot to work with the current hardware setup sans the
OLED display?
I'm confused by the repo though, it appears that it's still written only
for adafruit hardware, but the sparkfun hardware is a different motor
driver, no?
…On Mon, Jun 28, 2021 at 11:29 AM santaimpersonator ***@***.***> wrote:
Well, after testing a debugging a bunch. SparkFun can't provide support
for the OLED display with Jetbot ROS.
Unfortunately, Jetbot ROS relies on Python 2, which breaks the utilization
of the OLED Python package functionality at multiple points. Our package
was intended to be utilized with Python 3, since Python 2 has long been
deprecated.
- *I did my best with a workarounds for the various errors, but now I
am at the point where the package just isn't compatible with this
implementation.*
That being said, tying in the Qwiic SCMD package was straight forward and
the code appears to work with our hardware. Currently, I don't have an
Adafruit Motor HAT to test. If someone could verify the functionality, that
would be awesome. Then I can submit a pull request.
To test the new code implementation, checkout this branch of our repo
<https://github.com/sparkfun/jetbot_ros/tree/update-hardware_scan>:
- git clone -b update-hardware_scan
https://github.com/sparkfun/jetbot_ros
- If anyone finds a way to get Jetbot ROS to work with Python 3, let
me know.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#37 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ADDZ5CILV6PEUJLUNXPBCALTVC5R5ANCNFSM4V6VC4SA>
.
|
Our kit uses a different motor driver and OLED display, so the code needs to support the different hardware. The fork I created provides support for the motor driver. There is no support for the OLED due to the Python 2 issues.
You will also need to install the Python package for the motor driver in the SparkFun kit: sparkfun@dc782f6
|
@santaimpersonator Your PR #42 is very helpful. However, it is based on an older version (ros1 without docker) and could not merge. Let me add support for sparkfun jetbot to the current version (ros2 with docker). |
@alanyuchenhou Thanks for doing that. I'll close my pull request (#42). |
Jetson Nano (Developer Kit Vesion) - Jetpack 4.4.1 [L4T 32.4.4]
I've followed the configuration, installation, and build steps as they were listed, but I get IOError: [Errno 121] Remote I/O error for the following commands.
$ rosrun jetbot_ros jetbot_oled.py
$ rosrun jetbot_ros jetbot_motors.py
I've double checked my connections and tried running my own script to test the qwiic oled. I'm able to connect and use the qwiic oled using the sparkfun-qwiic-micro-oled Python3 library.
import qwiic_micro_oled
my_oled = qwiic_micro_oled.QwiicMicroOled()
my_oled.begin()
my_oled.clear(my_oled.PAGE)
my_oled.print("Hello")
my_oled.display()
However, it doesn't seem to work with the Adafruit_SSD1306 library.
The fact that I'm able to connect and use the qwiic oled leads me to believe that this is not a connection issue... However, I am a beginner to these things so I may be wrong. Please let me know if I should provide more information
The error is as follows for
$ rosrun jetbot_ros jetbot_oled.py
:Traceback (most recent call last):
File "/home/jetbot/jbworkspace/catkin_ws/src/jetbot_ros/scripts/jetbot_oled.py", line 43, in
disp.begin()
File "/home/jetbot/.local/lib/python2.7/site-packages/Adafruit_SSD1306/SSD1306.py", line 148, in begin
self._initialize()
File "/home/jetbot/.local/lib/python2.7/site-packages/Adafruit_SSD1306/SSD1306.py", line 292, in _initialize
self.command(SSD1306_DISPLAYOFF) # 0xAE
File "/home/jetbot/.local/lib/python2.7/site-packages/Adafruit_SSD1306/SSD1306.py", line 129, in command
self._i2c.write8(control, c)
File "/home/jetbot/.local/lib/python2.7/site-packages/Adafruit_GPIO/I2C.py", line 114, in write8
self._bus.write_byte_data(self._address, register, value)
File "/home/jetbot/.local/lib/python2.7/site-packages/Adafruit_PureIO/smbus.py", line 268, in write_byte_data
self._device.write(data)
IOError: [Errno 121] Remote I/O error
This is the output when I run
$ i2cdetect -y -r 1
. Seems like the Nano is able to detect the motor driver and micro oled.00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- 3d -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- 5d -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
The text was updated successfully, but these errors were encountered: