FeatherCLI¶
feathercli is the command-line tool installed with the Feather SDK. Use it to install the robot onto the machine,
configure the Teensy ethernet link, scan and flash motors, change a Robstride motor’s id, teleoperate, and copy the example notebook.
Run feathercli --help (or feathercli <command> --help) for the live flag list.
Commands¶
–> feathercli install¶
Install Feather onto the machine, or verify that a previous install looks correct. --all copies the versioned configs, installs conda and the required apt packages, and configures the Teensy ethernet link.
sudo feathercli install --all -v YOUR_VERSION
feathercli install --verify
YOUR_VERSION must match a bundled config set (for example v0.5.1). The available values are the directory names
under the SDK’s configs/user_configs/ package data; feathercli install --help lists the current choices.
This requires sudo privelages when installing certain files/packages.
Note
If feathersdk is not installed in your system /usr/bin/python environment, sudo won’t be able to find the correct
feathercli. You would instead need to activate your environment you wish to use and run:
sudo -E $(which feathercli) install --all -v YOUR_VERSION
--all turns on every install step. Each step also has its own flag, and a matching --no-install-* flag turns that
step back off even when --all is set. Passing both the enable flag and its --no-install-* pair is an error. With
no step flags, the command installs nothing.
Flag |
Description |
|---|---|
|
Install configs, conda, system packages, and the Teensy ethernet link. |
|
Copy the versioned robot configs. Required unless you pass |
|
Skip copying configs, including when |
|
Robot revision to install. Required when installing configs. |
|
Root directory to install into. Defaults to |
|
Overwrite an existing configs directory. Without this flag, an existing destination raises an error. |
|
Install Archiconda for the login user if it is not already present, and source |
|
Skip the conda install, including when |
|
Install missing apt packages |
|
Skip system packages, including when |
|
Configure the Jetson ethernet link to the Teensy. Same behavior as |
|
Skip ethernet setup, including when |
|
|
|
Check that the install looks correct. Does not copy or overwrite anything. |
--verify confirms that:
key folders/files exist and are accessible.
the robot config file imports successfully.
–> feathercli control¶
Start an interactive teleop session. The robot is initialized from the system configs unless you pass --configs.
feathercli control keyboard
feathercli control ps4
feathercli control keyboard --configs /path/to/configs
control_method is one of keyboard/k, or ps4.
Flag |
Description |
|---|---|
|
How to drive the robot: |
|
Path to the configs to load. Defaults to the system configs. |
Both modes initialize a FeatherRobot and stop motion on exit.
Keyboard¶
feathercli control keyboard
Use the keyboard to control the robot.
Keys |
Action |
|---|---|
|
Forward / left / backward / right |
|
Rotate left / right (combine with WASD) |
|
Torso up / down |
|
Neck up / left / down / right |
|
Decrease / increase speed multiplier |
|
Exit |
PS4 controller¶
feathercli control ps4
Use a ps4 controller to control the robot.
Requires pygame (pip install pygame) and a connected DualShock 4.
Control |
Action |
|---|---|
Left stick |
Holonomic translate (forward/back, left/right) |
Right stick |
Yaw (left/right only; up/down is ignored) |
L2 / R2 |
Torso down / up |
D-pad |
Neck pitch (up/down) and yaw (left/right) |
Circle ( |
Abort the robot and exit |
|
Quit and stop the base and torso |
To pair a DualShock 4 over Bluetooth, hold Share + PS until the lights blink, then:
bluetoothctl
power on
agent on
default-agent
scan on
# wait for "Wireless Controller"
pair XX:XX:XX:XX:XX:XX
trust XX:XX:XX:XX:XX:XX
connect XX:XX:XX:XX:XX:XX
NOTE: On startup the command samples the pad at rest and picks an axis layout, so keep the sticks centered and the triggers released for about half a second.
–> feathercli example¶
Copy the bundled feathersdk_example.ipynb notebook into a working directory. The notebook shows
initialize_feather_system() and a few motion snippets.
feathercli example
feathercli example -o /path/to/dir
feathercli example -o ./my_notebook.ipynb
Flag |
Description |
|---|---|
|
Destination path. Defaults to |
–> feathercli setup-ethernet¶
Configure the Jetson ethernet NIC used to reach the Teensy. This is the same step
feathercli install --install-setup-ethernet runs.
There are two main configurations for the teensy ethernet connection: static (meaning the teensy is connected directly
to the jetson, or through a pure ethernet switch), and dynamic (meaning both teensy and jetson are connected to
a router/something providing dhcp service).
feathercli setup-ethernet
feathercli setup-ethernet static
feathercli setup-ethernet dhcp
With no method, the command probes the ethernet port. A DHCP lease selects dhcp. No answer selects static
(192.168.10.1/24). Auto-detect requires exactly one ethernet NIC; pass static or dhcp when there are several.
Argument |
Description |
|---|---|
|
Optional. |
If you wish to switch from one method of ethernet connection to another, you will have to run this cli command to update the jetson ethernet interface appropriately.
–> feathercli scancan¶
Scan the Teensy CAN buses for motors. Each id in [0, MAX_NUM_ACTUATORS) is initialized, then probed, unless --ids
lists a subset. A motor counts as present when its reply moves that parameter’s telemetry timestamp.
By default this scans Robstride motors (LIMIT_TORQUE) and EZMotion motors (POSITION). The two motor types are
scanned in separate processes.
feathercli scancan
feathercli scancan can0 can2
feathercli scancan --only-robstride --attempts 3
feathercli scancan --ids=1,4,0x43
Bus names are Teensy bus indexes (can0, can1, vcan0), not host SocketCAN device names.
Flag |
Description |
|---|---|
|
Optional bus names. Default: every bus the Teensy reports. |
|
Robot config path. Defaults to the system robot config. Only needed to know if we are using real/emulated teensy. |
|
Scan Robstride motors only. |
|
Scan EZMotion motors only. Mutually exclusive with |
|
Seconds between transmit frames. Default: |
|
Seconds to wait for replies after a probe burst. Default: |
|
Probe attempts per bus. Default: |
|
Comma-separated ids to probe instead of every id in |
–> feathercli flash-motor¶
Download the known-good Robstride firmware bins (if they are not already cached) and flash every Robstride motor found on the Teensy CAN buses, or only the ids you list. EZMotion motors found by the scan are left alone.
Bins are cached under ~/.cache/feathersdk/rob_bins. A motor whose version already matches that file is
skipped unless you pass --force.
feathercli flash-motor
feathercli flash-motor 3 0x15
feathercli flash-motor --force --progress=False
feathercli flash-motor -c /path/to/robot_config.py
Flag |
Description |
|---|---|
|
Optional motor ids, decimal or hex. Default: every Robstride motor that answers. Ids must be in |
|
Flash even when the motor already has this firmware version. |
|
|
|
Robot config path. Defaults to the system robot config. Only needed to know if we are using real/emulated teensy. |
–> feathercli set-motor-id¶
Change one Robstride motor’s CAN id. EZMotion motors are not supported.
The command scans for old_id and new_id as Robstride motors. old_id must answer on exactly one bus; if it answers on more than one, pass --iface. The change is refused when new_id already answers on that same bus. After the id is written, the command reads LIMIT_TORQUE from new_id and fails if that motor does not reply.
Ids are decimal or hex and must be in [0, MAX_NUM_ACTUATORS). old_id and new_id must differ.
feathercli set-motor-id 1 0x43
feathercli set-motor-id 3 0x15 --iface can0
feathercli set-motor-id 4 5 -c /path/to/robot_config.py
Flag |
Description |
|---|---|
|
Current Robstride motor id. |
|
Id to assign. Must not already answer on the same bus as |
|
Teensy bus to scan, for example |
|
Robot config path. Defaults to the system robot config. Only needed to know if we are using real/emulated teensy. |