Robot control system for Stringman
Project description
nf_robot
Control code for the Stringman household robotic crane from Neufangled Robotics
Build Guides and Documentation
Purchase assembled robots or kits at neufangled.com
Installation of stringman controller
Linux (python 3.11 or later)
sudo apt install python3-dev python3-virtualenv python3-pip ffmpeg
python3 -m virtualenv venv
source venv/bin/activate
pip install "nf_robot[host]"
Start headless robot controller in LAN-only mode. The particular robot details will be read from/saved to bedroom.conf
stringman-headless --config=bedroom.conf
Minimum system specs
At least 8 cores and 8GB of ram. In order to perform local inference, some kind of pytorch accelertion is necessary. Mini PC's or laptops based on the Ryzen 7 7840HS are probably about the cheapest machines that can run stringman's motion controller since it has an NPU that can be used to accelerate pytorch. A mac mini is also a viable option.
Otherwise, any gaming PC is usually more than enough.
Installation of Robot Control Panel (developers)
git clone https://github.com/nhnifong/cranebot3-firmware.git
sudo apt install python3-dev python3-virtualenv python3-pip ffmpeg
python -m virtualenv venv
source venv/bin/activate
pip install -e ".[host,dev,pi]"
If you have an RTX 5090
pip install --force-reinstall torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 torchcodec==0.6.0 --index-url https://download.pytorch.org/whl/cu129
Run tests
pytest tests
Setting up a component
Robot components that boot from the stringman-zero2w.img (1.6GB) image should begin looking for wifi share codes with their camera immediately. You can produce a code with qifi.org
Once the pi sees the code it will connect to the network and remember those settings. It should then be discoverable by the control panel via multicast DNS (Bonjour)
Starting from a base rpi image
Alternatively the software can be set up from a fresh raspberry pi lite 64 bit image. After booting any raspberry pi from a fresh image, perform an update
sudo apt update -y && sudo apt full-upgrade -y -o Dpkg::Options::="--force-confold" && sudo apt install -y git python3-dev python3-virtualenv rpicam-apps i2c-tools
Clone the cranebot-firmware repo
git clone https://github.com/nhnifong/cranebot3-firmware.git && cd cranebot3-firmware
Set the component type by uncommenting the appropriate line in server.conf
nano server.conf
Install stringman
chmod +x install.sh
sudo ./install.sh
Additional settings for anchors
Setup for any raspberry pi that will be part of an anchor Enable uart serial harware interface interactively.
sudo raspi-config
In interface optoins, select serial port. disable the login shell, but enable hardware serial.
add the following lines lines to to /boot/firmware/config.txt at the end this disables bluetooth, which would otherwise occupy the uart hardware.
Then reboot after this change
enable_uart=1
dtoverlay=disable-bt
Additional settings for gripper
Setup for the raspberry pi in the gripper with the inventor hat mini Enable i2c
sudo raspi-config nonint do_i2c 0
Add this line to /boot/firmware/config.txt just under dtparam=i2c_arm=on and reboot
dtparam=i2c_baudrate=400000
Rebuilding the python module
within a venv install the build tools
python3 -m pip install --upgrade build twine
Bump the version number in pyproject.toml then at this repo's root, build the module. Artifacts will be in dist/
python3 -m build
Upload the particular version you just built to PyPi
python3 -m twine upload dist/nf_robot-3.4.4*
QA scripts
Note that if you are proceeding to QA scripts right after doing the steps above you must reboot and then stop the service before running those scrips.
sudo reboot now
log back in
sudo systemctl stop cranebot.service
Run QA scripts for the specific component type
/opt/robot/env/bin/qa-anchor anchor|power_anchor
/opt/robot/env/bin/qa-gripper
/opt/robot/env/bin/qa-gripper-arp
These scripts both check whether everything is connected as it should be and in the case of anchors, set whether it is a power anchor or not.
To update to the lastest nf_robot version in a component
/opt/robot/env/bin/pip install --upgrade "nf_robot[pi]"
Training models
Windows
A self contained windows installer can be generated. The exact installation of stringman that ends up in the installer depends on what was in the virtualenv these commands are run from, so make a new one.
python3 -m venv winvenv
source winvenv/bin/activate
pip install nf_robot[host]
pip install pyinstaller
pyinstaller --onefile --windowed --name "Stringman" win_main.py
Support this project
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nf_robot-3.11.0.tar.gz.
File metadata
- Download URL: nf_robot-3.11.0.tar.gz
- Upload date:
- Size: 182.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4ab5b54d1c4ea4e1f1a30129020473cebe883809f19702d6742d54e755c0c51d
|
|
| MD5 |
4bd4f9664433618bcbee5b1d1e5b9a7d
|
|
| BLAKE2b-256 |
8e503194165d3730e4111f7f6eb94da14f935e3d698c9eb187548913e1e7bac3
|
File details
Details for the file nf_robot-3.11.0-py3-none-any.whl.
File metadata
- Download URL: nf_robot-3.11.0-py3-none-any.whl
- Upload date:
- Size: 208.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bcb308a925eb998a69d479d6b3322f285df1c0493513907d4fbdb8c4fa3a2ae
|
|
| MD5 |
17593e6aef5f524b7b0d7a119e5e421c
|
|
| BLAKE2b-256 |
b93cf4ee69a73d857ae500be17dd55d862284e567925c20fc03f717c8db0cdda
|