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

RSDK 1845 #1

Closed
wants to merge 3,435 commits into from
Closed

RSDK 1845 #1

wants to merge 3,435 commits into from

Conversation

bazile-clyde
Copy link
Owner

edaniels and others added 30 commits November 11, 2022 09:52
…amrobotics#1593)

For less trusted environments where an untrusted user may update the config and we cannot trust them to run arbitrary code.

Note: This shouldn't be relied upon for completely untrusted environments.
edaniels and others added 28 commits January 31, 2023 12:52
Tried on a Jetson Orin: both reading and writing both high and low values work great! Also tried on a BeagleBone AI-64: GPIO behavior is unchanged.

As Nicolas notes, it sucks to have 3 different implementations of GPIO stuff, and it would be wonderful to get down to a single approach that works everywhere. It's obvious why the pigpio approach doesn't work on a non-rpi board, and we've discussed why the periph.io approach doesn't work on the Orin. It would be neat to use the ioctl approach everywhere eventually, but that doesn't need to happen immediately.

I learned great things from https://blog.lxsang.me/post/id/33 about how to use ioctl, and from https://github.com/mkch/gpio for how to do this in Go.

I don't like how much duplication there is between `ioctlPin.Set` and `ioctlPin.Get`, but couldn't see an easy way to remove it: abstracting out a helper function to, say, open the device actually makes the code longer because you need to check the return value for errors, and the values to construct a `gpioHandleRequest` object are different enough that a helper function feels contrived to me.
Robot now exposes a PackageManager service that allows other components/services to reference a Package based on their config.

The local robot will load and sync all config.Packages before reconfiguring the robot.

Note: Today this will block reconfiguring until the packages are loaded or fail to load. This can be problematic if there are very large files that need t be downloaded but a decent compromise for v0.

After reconfiguration the local robot will cleanup the package manager. This is done after reconfiguration to ensure no running processes / services / components are referencing the files before removing them.
This is a follow-up to viamrobotics#1810. Data is taken from https://github.com/NVIDIA/jetson-gpio/blob/master/lib/python/Jetson/GPIO/gpio_pin_data.py#L53-L80. I can't test this out because the Jetson Orin NX hardware is not yet on the market (we have the higher-end Orin AGX, whose pin definitions are already in here and are different from the NX). but I'd sure expect that NVidia's github repo contains accurate data regarding NVidia's own hardware.
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

Successfully merging this pull request may close these issues.