This is where the personality code for WireOS exists.
For the entire OS, check out the wire-os repo. This repo, wire-os-victor, is a submodule of that, and just builds the /anki folder which goes into that OS. However, wire-os-victor can still be built standalone and deployed to a robot which is running a good base OTA. This is recommended for developers.
Most changes happen in this repo. If one wants to, for instance, add a new feature; this is where they'd do it.
If you want to add a program to the OS, do that in wire-os.
Check vector-docs for more information about the source code leak, what we can do with this, and general Vector info.
WireOS serves as a stable, up-to-date, easily-buildable base for CFW, and is a continuation of Anki's work.
Any feature added here should be somewhat objectively applicable to other CFW. Feel free to make a PR. Wire encourages PRs which add things like 3rd-party library upgrades, new behaviors which Anki might have planned to add, code documentation, and optimizations. Wire discourages PRs which significantly alter the experience, like transforming him into a (soulless) GPT box or making him into Cozmo. If you want to do something like that, make your own CFW (instructions in vector-docs).
wire-os-victor can be built standalone on most Linux distros (arm64 or amd64) and on macOS (arm64/M-series).
For Linux, the Docker method is recommended for now (especially if you have a weird or old Linux distro installed), though bare metal works nicely too.
Note that if you have built in Docker before and want to build on bare metal now (or vice-versa), you should do a clean build.
Click an option below for instructions.
Docker: x86_64 or arm64 Linux
- Prerequisites: Make sure you have
dockerandgitinstalled.
- Clone the repo and
cdinto it:
cd ~
git clone --recurse-submodules https://github.com/os-vector/wire-os-victor
cd wire-os-victor
- Make sure you can run Docker as a normal user. This will probably involve:
sudo groupadd docker
sudo gpasswd -a $USER docker
newgrp docker
sudo chown root:docker /var/run/docker.sock
sudo chmod 660 /var/run/docker.sock
- Run the build script:
cd ~/wire-os-victor
./build/build-v.sh
Bare Metal: x86_64 or arm64 Linux
- Prerequisites:
- glibc 2.35 or above - this means anything Debian Bookworm-era and newer will work.
- The following packages need to be installed:
git wget curl openssl ninja g++ gcc pkg-config ccache
# Arch Linux:
sudo pacman -S git wget curl openssl ninja gcc pkgconf ccache
# Ubuntu/Debian:
sudo apt-get update && sudo apt-get install -y git wget curl openssl ninja-build gcc g++ pkg-config ccache
# Fedora
sudo dnf install -y git wget curl openssl ninja-build gcc gcc-c++ pkgconf-pkg-config ccache
- Clone the repo and
cdinto it:
cd ~
git clone --recurse-submodules https://github.com/os-vector/wire-os-victor
cd wire-os-victor
- Source
setenv.sh:
source setenv.sh
- (OPTIONAL) Run this so you don't have to perform step 2 every time:
echo "source \"$(pwd)/setenv.sh\"" >> $HOME/.bashrc
- Build:
vbuild
macOS (M-series only)
- Prereqs: Make sure you have brew installed.
- Then:
brew install ccache gcc ninja pkg-config upx wget
- Then:
- Clone the repo and cd into it:
cd ~
git clone --recurse-submodules https://github.com/os-vector/wire-os-victor
cd victor
- Run the build script:
cd ~/wire-os-victor
./build/build-v.sh
- Install WireOS on your robot.
- Get your robot's IP through CCIS:
-
- Place your robot on the charger
-
- Double click the button
-
- Lift the lift up then down
-
- Write down the IP address somewhere
-
- Lift the lift up then down again to exit CCIS
- One of the following:
(Docker: x86_64 or arm64 Linux) or (macOS M-series)
- Run:
./build/deploy-v.sh
Bare Metal: x86_64 or arm64 Linux
- Run:
vdeploy
wire-os-victor can be run in WeBots. A mostly fully-featured Vector experience without needing a real robot to deploy to.
This only works with a relatively beefy x86_64 Linux machine.
To do this:
-
Follow the prereq instructions in "Bare Metal: x86_64 or arm64 Linux" in the above section
-
Install qemu-static-arm and libasound2-dev, make sure systemd-binfmt is set up to handle ARM programs
# Arch:
sudo pacman -S qemu-user-static qemu-user-static-binfmt alsa-lib
sudo systemctl enable --now systemd-binfmt.service
# if already enabled
sudo systemctl restart systemd-binfmt.service
# Debian / Ubuntu:
sudo apt install qemu-user-static qemu-user-binfmt libasound2-dev
sudo systemctl restart systemd-binfmt.service
# Fedora
sudo dnf install qemu-user-static qemu-user-binfmt alsa-lib
sudo systemctl restart systemd-binfmt.service
- Run:
./sim.sh
That will eventually open up mprocs, a program for managing multiple processes. Press q in that terminal window to exit, and click "Close without saving" in WeBots if asked.
You can run the victor processes on your computer and use Cozmo as the vessel.
If you have a beefy x86_64 Linux machine with a Wi-Fi card, go for it!
Follow the simulator instructions, but instead of ./sim.sh, run:
./sim.sh -cozmo
Make sure you're connected to the internet while the script is running, as it downloads dependencies.
If you have more than one network adapter, you can have one connected to the internet and one connected to Cozmo at the same time throughout the whole process.
If you only have one, you can just run the script while connected to the internet, and it will tell you when you should change your network over to Cozmo. Also note that if you have run it once, you don't need the internet to run it a second time.
99% of the time, if you're working on a behavior or something, you don't need to clean any build directories. The CMakeLists are correctly setup to properly rebuild the code which needs to be rebuilt upon a file change.
If you do want to clean anyway:
(Docker: x86_64 or arm64 Linux) or (macOS M-series)
- Run:
./build/clean.sh
Bare Metal: x86_64 or arm64 Linux
- Run:
vclean
- After you build for the first time, two files will be generated and placed in the root of the source directory:
compile_commands.json.clangd
- If you install the
clangdextension for VSCode then relaunch VSCode after a build, it will index the code and you will have speedy code completion, error underlining+explanations, function descriptions, and such for the entire codebase.