Giter VIP home page Giter VIP logo

Comments (2)

Martin2kid avatar Martin2kid commented on June 29, 2024

jiyoon,

Are you using Pimorini pan-tilt hat?
If you are, you might want to check Sym-link smbus to your virtual environment

Example (should be linked to your venv folder & installed python version package folder)
$ cd ~/.virtualenvs/py3cv4/lib/python3.5/site-packages/
$ ln -s /usr/lib/python3/dist-packages/smbus.cpython-35m-arm-linux-gnueabihf.so smbus.so

If you are not, I'd recommend you to check I2c address of Pan-tilt device & modify accordingly, will probably need rpi-deep-pantilt code change too.

Please see this article relate to Pimorini Pan & Tilt install detail here;
https://www.pyimagesearch.com/2019/04/01/pan-tilt-face-tracking-with-a-raspberry-pi-and-opencv/

Leigh also posted excellent newsletter relating to Tensor-flow & Pi with different HW comparison here;
https://www.bitsy.ai/3-ways-to-install-tensorflow-on-raspberry-pi/

Hope that works or help you in anyway...

from rpi-object-tracking.

Sreehar avatar Sreehar commented on June 29, 2024

I followed all the instructions but keep on getting this error. Can someone help me?

(.venv) pi@raspberrypi:~ $ rpi-deep-pantilt test pantilt

-- output 

(.venv) pi@raspberrypi:~ $ rpi-deep-pantilt test pantilt
INFO:root:Starting Pan-Tilt HAT test!
INFO:root:Pan-Tilt HAT should follow a smooth sine wave
Traceback (most recent call last):
  File "/home/pi/.venv/bin/rpi-deep-pantilt", line 8, in <module>
    sys.exit(main())
  File "/home/pi/.venv/lib/python3.7/site-packages/rpi_deep_pantilt/cli.py", line 153, in main
    cli()
  File "/home/pi/.venv/lib/python3.7/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/home/pi/.venv/lib/python3.7/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/home/pi/.venv/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/pi/.venv/lib/python3.7/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/home/pi/.venv/lib/python3.7/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/home/pi/.venv/lib/python3.7/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/home/pi/.venv/lib/python3.7/site-packages/rpi_deep_pantilt/cli.py", line 141, in pantilt
    return pantilt_test()
  File "/home/pi/.venv/lib/python3.7/site-packages/rpi_deep_pantilt/control/hardware_test.py", line 38,
    pantilthat.pan(a)
  File "/home/pi/.venv/lib/python3.7/site-packages/pantilthat/pantilt.py", line 466, in servo_one
    self.setup()
  File "/home/pi/.venv/lib/python3.7/site-packages/pantilthat/pantilt.py", line 80, in setup
    self._set_config()
  File "/home/pi/.venv/lib/python3.7/site-packages/pantilthat/pantilt.py", line 118, in _set_config
    self._i2c_write_byte(self.REG_CONFIG, config)
  File "/home/pi/.venv/lib/python3.7/site-packages/pantilthat/pantilt.py", line 209, in _i2c_write_byte
    raise IOError("Failed to write byte")
OSError: Failed to write byte

it says OSError: Failed to write byte does anyone know how to fix this?

Did you fix the issue ?
If you did, how was it done?
I get the same thing as error .
Traceback (most recent call last):
File "/home/pi/track/facetracker.py", line 37, in
pan(cam_pan-90)
File "/usr/lib/python3/dist-packages/pantilthat/pantilt.py", line 466, in servo_one
self.setup()
File "/usr/lib/python3/dist-packages/pantilthat/pantilt.py", line 80, in setup
self._set_config()
File "/usr/lib/python3/dist-packages/pantilthat/pantilt.py", line 118, in _set_config
self._i2c_write_byte(self.REG_CONFIG, config)
File "/usr/lib/python3/dist-packages/pantilthat/pantilt.py", line 209, in _i2c_write_byte
raise IOError("Failed to write byte")
OSError: Failed to write byte

from rpi-object-tracking.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.