Code Monkey home page Code Monkey logo

pi3hat's People

Contributors

brawner avatar isherman avatar jgsuw avatar jpieper avatar stephane-caron avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pi3hat's Issues

Add support for Python 3.11 to pi3hat_tool

I would like to add support for Python 3.11 in building pi3hat_tool. Recently, Python 3.11 headers were added to mjbots/bazel_deps, but this added capability is not currently reflected in the build files for pi3hat. This support would be desirable, since currently python3.11 is the only version that is available for Raspian OS and raspberry pi 4. Older versions, such as 3.7, 3.9, and 3.10, must be built from source, which is time consuming.

I have a local branch that has implemented these changes. The changes are modest, and involves small changes to the following files:

I may be missing a few small changes here, but I would like to open a pull request with the permission of @jpieper to review the necessary changes.

no pi3hat detected

When I tried to run sample code even as root user getting error hat not detected. But HAT (r4.4) is attached on Raspberry Pi 4 Model B Rev 1.5

root@raspberrypi:/home/pidemo/pi3hat/lib/python/examples# python3 raw_can_example.py
Traceback (most recent call last):
File "/home/pidemo/pi3hat/lib/python/examples/raw_can_example.py", line 92, in
asyncio.run(main())
File "/usr/lib/python3.9/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.9/asyncio/base_events.py", line 642, in run_until_complete
return future.result()
File "/home/pidemo/pi3hat/lib/python/examples/raw_can_example.py", line 39, in main
transport = moteus_pi3hat.Pi3HatRouter(can=can_config)
File "/usr/local/lib/python3.9/dist-packages/moteus_pi3hat/pi3hat_router.py", line 108, in init
self._impl = _pi3hat_router.Pi3HatRouter(options)
RuntimeError: No pi3hat detected

Max input voltage

Reference.md states that the pihat accepts power input from 8-34V, but the product description states 8-44V.

Some issues regarding communication with PI3hat boards

Hi author, I am trying to use orangepi or upboard to communicate with pi3hat, after installing moteus-pi3hat, my sample code is as follows,
import asyncio
import math
import moteus
import moteus_pi3hat
import time

async def main():
transport = moteus_pi3hat.Pi3HatRouter(
servo_bus_map={
1:[11]
},
)
controller = moteus.Controller(id=1, transport=transport)

and after running it, the following error occurs, I would like to ask if there is something wrong with my operation?

sudo python demo.py
Traceback (most recent call last):
File "/home/orangepi/Desktop/pi3hat/demo.py", line 96, in
asyncio.run(main())
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()
File "/home/orangepi/Desktop/pi3hat/demo.py", line 11, in main
transport = moteus_pi3hat.Pi3HatRouter(
File "/usr/local/lib/python3.10/dist-packages/moteus_pi3hat/pi3hat_router.py", line 108, in init
self._impl = _pi3hat_router.Pi3HatRouter(options)
RuntimeError: Error setting realtime scheduler, try running as root (use sudo)

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.