Skip to content
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

tof_node.py is trying to open i2c-13 which does not exist, causing duckiebot-interface to restart #51

Open
mjmdavis opened this issue Feb 5, 2021 · 3 comments

Comments

@mjmdavis
Copy link

mjmdavis commented Feb 5, 2021

I'm on DB21M.

Here's a docker logs duckiebot-interface extract:

[INFO] [1612482947.918640]: [/ducky/front_center_tof_driver_node] Initializing...
[INFO] [1612482948.128942]: [/ducky/front_center_tof_driver_node] Health status changed [STARTING] -> [STARTED]
Traceback (most recent call last):
File "/code/catkin_ws/src/dt-duckiebot-interface/packages/tof_driver/src/tof_node.py", line 152, in
node = ToFNode()
File "/code/catkin_ws/src/dt-duckiebot-interface/packages/tof_driver/src/tof_node.py", line 61, in init
self._sensor.open()
File "/usr/local/lib/python3.8/dist-packages/dt_vl53l0x/VL53L0X.py", line 125, in open
self._i2c.open(bus=self._i2c_bus)
File "/usr/local/lib/python3.8/dist-packages/smbus2/smbus2.py", line 310, in open
self.fd = os.open(filepath, os.O_RDWR)
FileNotFoundError: [Errno 2] No such file or directory: '/dev/i2c-13'

Here's the list of i2c interfaces I see:

$ ls /dev/i2*
/dev/i2c-0 /dev/i2c-1 /dev/i2c-2 /dev/i2c-3 /dev/i2c-4 /dev/i2c-5 /dev/i2c-6

duckiebot-interface_log.txt

@mjmdavis
Copy link
Author

mjmdavis commented Feb 5, 2021

Should it really be opening I2C bus 13? Is this a config error or are the I2C buses not coming up on my DB21M? https://github.com/duckietown/dt-duckiebot-interface/blob/daffy/packages/tof_driver/config/tof_node/front_center.yaml#L1

@mjmdavis
Copy link
Author

mjmdavis commented Feb 5, 2021

@afdaniele Do you know what my next steps should be?

@Ezward
Copy link

Ezward commented Apr 4, 2021

I found the same thing. Jetson nano can use I2C buses 0 and 1. So the config seems incorrect, at least for a Jetson Nano. Further the PCA9685 code and the SSD1306 OLED display code both assume I2C bus 1 and they work correctly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants