Skip to main content

Bringup with cycloctl

cyclod is the daemon that runs on the robot and owns Wi-Fi mode switching and service management. cycloctl is its command-line client, documented here.

cycloctl talks to cyclod over its local Unix socket, so it only works when run directly on the robot — connect over USB, Ethernet, or Wi-Fi and SSH in first.

Workspace and container shell

On the robot SBC, the AI Sapiens source lives at /data/ai_sapiens. That host directory is volume-mounted into the ai_sapiens container at /root/ros2_ws/src/ai_sapiens.

To open a shell inside the running container:

cd /data/ai_sapiens
./docker/container.sh enter

Or:

docker exec -it ai_sapiens bash

Wi-Fi

cycloctl wifi switches the robot's Wi-Fi radio between hotspot (AP) and station (client) mode — see Networking → Wi-Fi AP/STA Mode Switching.

Services

cycloctl service manages the services running inside the robot's containers (e.g. zenoh_daemon and ai_sapiens_bringup in the ai_sapiens container). --container is only required when the service name exists in more than one container, so you can omit it in normal use.

Status

Show every service's status:

cycloctl service status
ai_sapiens/ai_sapiens_bringup: down
ai_sapiens/ai_sapiens_sim2real: down
ai_sapiens/zenoh_daemon: down

Start

Start the services in order — zenoh_daemon, then ai_sapiens_bringup, then ai_sapiens_sim2real — waiting about 3 seconds between each so the previous one is up before the next depends on it.

cycloctl service start --container ai_sapiens --name zenoh_daemon
sleep 3
cycloctl service start --container ai_sapiens --name ai_sapiens_bringup
sleep 3
cycloctl service start --container ai_sapiens --name ai_sapiens_sim2real

Stop

Stop them in the reverse order.

cycloctl service stop --container ai_sapiens --name ai_sapiens_sim2real
cycloctl service stop --container ai_sapiens --name ai_sapiens_bringup
cycloctl service stop --container ai_sapiens --name zenoh_daemon

Logs

Fetch recent log lines:

cycloctl service logs --container ai_sapiens --name zenoh_daemon --tail 200
cycloctl service logs --container ai_sapiens --name ai_sapiens_bringup --tail 200
cycloctl service logs --container ai_sapiens --name ai_sapiens_sim2real --tail 200

You can also read a service's log file directly instead of going through cycloctl. Open a shell in the ai_sapiens container (see Workspace and container shell) and tail the file:

cd /data/ai_sapiens
./docker/container.sh enter

Or:

docker exec -it ai_sapiens bash
tail -f /var/log/zenoh_daemon/current
tail -f /var/log/ai_sapiens_bringup/current
tail -f /var/log/ai_sapiens_sim2real/current