mjbots / pi3hat Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
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.
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
Observed by @stephane-caron
When a 64 Raspberry Pi OS is used, flashing moteus controllers over the pi3hat's CAN-FD ports often fails.
Reference.md states that the pihat accepts power input from 8-34V, but the product description states 8-44V.
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)
The title says it all.
This is likely because the CAN controller in the stm32 only has a buffer that is 3 deep. We can probably fix it either by making the client poll after that many, adding more buffering in the firmware or both.
Hello, may I ask how to compile this project and burn it into the hardware of PI3hat
It almost always reports target 1 as available, and then wedges, requiring a power cycle.
Observed in 2021-08-10
Hello, may I ask how I can communicate with pi3hat through SPI? Could you please provide an example?
Simi on discord reported that the python library did not use their pi3hat without manually constructing a Pi3HatRouter. It should use it automatically.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.