From 614316c176655f63541583c0cafce4dde98c688c Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Tue, 6 Oct 2026 17:41:23 -0700 Subject: [PATCH 01/21] fix: loglevel --- scripts/launch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/launch.sh b/scripts/launch.sh index 0aa2012..b3f7af7 100755 --- a/scripts/launch.sh +++ b/scripts/launch.sh @@ -11,4 +11,4 @@ source /home/trickfire/urc-2023/install/setup.bash export PYTHONPATH="/home/trickfire/urc-2023/src/:$PYTHONPATH" -ros2 launch viator_launch robot.launch.py --log-level rosbridge_websocket:=warn +ros2 launch --log-level rosbridge_websocket:=warn viator_launch robot.launch.py From 0128120994c7306f91be17e39acd801def43d351 Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Tue, 6 Oct 2026 17:48:26 -0700 Subject: [PATCH 02/21] fix: drop log level --- scripts/launch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/launch.sh b/scripts/launch.sh index b3f7af7..d85ca13 100755 --- a/scripts/launch.sh +++ b/scripts/launch.sh @@ -11,4 +11,4 @@ source /home/trickfire/urc-2023/install/setup.bash export PYTHONPATH="/home/trickfire/urc-2023/src/:$PYTHONPATH" -ros2 launch --log-level rosbridge_websocket:=warn viator_launch robot.launch.py +ros2 launch viator_launch robot.launch.py From a713116b526580621828056ce393f9e994b078bd Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Tue, 6 Oct 2026 18:15:54 -0700 Subject: [PATCH 03/21] fix: fixed sudoers --- .devcontainer/trickfire-can-sudoers | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer/trickfire-can-sudoers b/.devcontainer/trickfire-can-sudoers index b545cf2..6da4da7 100644 --- a/.devcontainer/trickfire-can-sudoers +++ b/.devcontainer/trickfire-can-sudoers @@ -1,3 +1,3 @@ -Defaults!/home/trickfire/urc-2023/install/can_rmdx8/lib/can_rmdx8/can_rmdx8 !env_reset, env_delete-="PYTHONPATH" +Defaults!/home/trickfire/urc-2023/install/can_rmdx8/lib/can_rmdx8/can_rmdx8 !env_reset, env_delete-="PYTHONPATH LD_LIBRARY_PATH" trickfire ALL=(root) NOPASSWD: /usr/sbin/ip, /usr/sbin/modprobe, /usr/bin/candump, /usr/bin/cansend, /usr/bin/cangen, /usr/bin/cansniffer, /home/trickfire/urc-2023/install/can_rmdx8/lib/can_rmdx8/can_rmdx8 From d603507fb2bfaf957b2b3263808b2cff27528480 Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Tue, 6 Oct 2026 18:16:02 -0700 Subject: [PATCH 04/21] fix: fixed numpy versions --- .devcontainer/Dockerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 3a5df5c..ff7e33e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -20,6 +20,7 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ python3-opencv RUN pip3 install --no-cache-dir \ + "numpy<2" \ moteus \ pyusb \ pybind11 \ From fde5ef3a1618deb05ab103432cf5faabef6bed8c Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Tue, 6 Oct 2026 18:16:20 -0700 Subject: [PATCH 05/21] chore: excluded arm moteus node from launch as its not used and causes errors --- src/viator_launch/launch/robot.launch.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/viator_launch/launch/robot.launch.py b/src/viator_launch/launch/robot.launch.py index 62e2d67..3f2db40 100644 --- a/src/viator_launch/launch/robot.launch.py +++ b/src/viator_launch/launch/robot.launch.py @@ -7,8 +7,6 @@ from launch_xml.launch_description_sources import XMLLaunchDescriptionSource can_moteus_node = Node(package="can_moteus", executable="can_moteus", name="can_moteus_node") - - drivebase_node = Node(package="drivebase", executable="drivebase", name="drivebase_node") # Runs as root via sudo: opening the raw CAN socket for can1 needs CAP_NET_RAW/NET_ADMIN, @@ -54,7 +52,7 @@ def generate_launch_description() -> launch.LaunchDescription: # pylint: disable=invalid-name return launch.LaunchDescription( [ - can_moteus_node, + # can_moteus_node, (dsabeled for now cause arm is not implemented) drivebase_node, can_rmdx8_node, mission_control_updater_node, From 428d4afc032592fa4f55789e067af0f6913377c1 Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Tue, 6 Oct 2026 19:04:58 -0700 Subject: [PATCH 06/21] feat: improved logging clarity --- scripts/launch.sh | 13 +++++++++---- src/heartbeat/heartbeat/heartbeat.py | 15 ++++++++++----- 2 files changed, 19 insertions(+), 9 deletions(-) diff --git a/scripts/launch.sh b/scripts/launch.sh index d85ca13..785a7c8 100755 --- a/scripts/launch.sh +++ b/scripts/launch.sh @@ -1,7 +1,13 @@ #!/usr/bin/env bash +cd "$(dirname "$0")/.." +# enable colored logs +export RCUTILS_COLORIZED_OUTPUT=1 +export PYTHONPATH="$(pwd)/src/:$PYTHONPATH" + +# source ros source /opt/ros/$ROS_DISTRO/setup.bash -source /home/trickfire/urc-2023/install/setup.bash +source ./install/setup.bash #modprobe can #modprobe can_raw @@ -9,6 +15,5 @@ source /home/trickfire/urc-2023/install/setup.bash #ip link set can0 type can bitrate 1000000 dbitrate 5000000 fd on #ip link set can0 up -export PYTHONPATH="/home/trickfire/urc-2023/src/:$PYTHONPATH" - -ros2 launch viator_launch robot.launch.py +# launch using ros +ros2 launch viator_launch robot.launch.py --log-level rosbridge_websocket:=warn diff --git a/src/heartbeat/heartbeat/heartbeat.py b/src/heartbeat/heartbeat/heartbeat.py index 76c6afd..b394246 100644 --- a/src/heartbeat/heartbeat/heartbeat.py +++ b/src/heartbeat/heartbeat/heartbeat.py @@ -41,8 +41,8 @@ def __init__(self) -> None: # give enough time (10s) for others to initialize time.sleep(10) - # flag to store connection status - self._connection_lost = False + # flag to store connection status; starts "lost" until the first heartbeat arrives + self._connection_lost = True # create subscription to mission control self._is_alive_subscriber = self.create_subscription( @@ -81,12 +81,17 @@ def heartbeat_callback(self, msg: Bool) -> None: # Update the timestamp of the last received heartbeat message self._last_heartbeat_time = time.time() - # Log connection active as before # doesn't matter the data, pub always pub True # just check to make sure nothing is wrong with pub if msg.data: - self.get_logger().info(colorStr("Connection active", ColorCodes.GREEN_OK)) - self._connection_lost = False + # Only log at INFO on the transition into a connected state (startup or + # reconnect); the recurring per-second tick goes to DEBUG so it doesn't + # flood the default INFO output. + if self._connection_lost: + self.get_logger().info(colorStr("Connection active", ColorCodes.GREEN_OK)) + self._connection_lost = False + else: + self.get_logger().debug(colorStr("Connection active", ColorCodes.GREEN_OK)) # Tell the client that the heartbeat was received. msg = Bool() From fb0cb4149217d2ea7cf058770bfd3a786ff0a9fc Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Tue, 6 Oct 2026 19:07:57 -0700 Subject: [PATCH 07/21] chore: removed old commented can setup thats not used --- scripts/launch.sh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/scripts/launch.sh b/scripts/launch.sh index 785a7c8..e0f38c0 100755 --- a/scripts/launch.sh +++ b/scripts/launch.sh @@ -9,11 +9,5 @@ export PYTHONPATH="$(pwd)/src/:$PYTHONPATH" source /opt/ros/$ROS_DISTRO/setup.bash source ./install/setup.bash -#modprobe can -#modprobe can_raw -#modprobe mttcan -#ip link set can0 type can bitrate 1000000 dbitrate 5000000 fd on -#ip link set can0 up - # launch using ros ros2 launch viator_launch robot.launch.py --log-level rosbridge_websocket:=warn From 24402d3693d2dd49b0a1bd6bdd18d1f3e78d9a7d Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Tue, 6 Oct 2026 19:08:06 -0700 Subject: [PATCH 08/21] fix: added error flag to setup can --- scripts/setup-can-network.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/setup-can-network.sh b/scripts/setup-can-network.sh index 5cb7670..aaebc33 100755 --- a/scripts/setup-can-network.sh +++ b/scripts/setup-can-network.sh @@ -1,4 +1,5 @@ #!/bin/bash +set -e # Commands START_CMD="8800000000000000" From 96f54c8aa78b420e839abd49a252469cad2c4001 Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Tue, 6 Oct 2026 19:17:21 -0700 Subject: [PATCH 09/21] fix: fixed all occurences of old urc-2023 project name to correct viator, fixed absolute path references and couple of other things --- .devcontainer/devcontainer.json | 2 +- .devcontainer/docker-compose.yml | 6 ++--- .devcontainer/trickfire-can-sudoers | 4 ++-- .vscode/settings.json | 4 ++-- Makefile | 2 +- README.md | 11 +++++----- docs/architecture.mdx | 30 ++++++++++++------------- docs/getting-started.mdx | 34 ++++++++--------------------- docs/launching.mdx | 8 +++---- scripts/build.sh | 4 +++- scripts/sync-to-orin.sh | 18 ++++----------- 11 files changed, 49 insertions(+), 74 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 3f177b6..ab2fe05 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -1,7 +1,7 @@ { "dockerComposeFile": "docker-compose.yml", "service": "viator", - "workspaceFolder": "/home/trickfire/urc-2023", + "workspaceFolder": "/home/trickfire/viator", "postCreateCommand": "pre-commit install", "customizations": { "vscode": { diff --git a/.devcontainer/docker-compose.yml b/.devcontainer/docker-compose.yml index fa5c859..b39b684 100644 --- a/.devcontainer/docker-compose.yml +++ b/.devcontainer/docker-compose.yml @@ -4,12 +4,12 @@ services: context: .. dockerfile: .devcontainer/Dockerfile target: viator - image: urc-2023:latest + image: viator:latest container_name: viator user: trickfire volumes: - - ..:/home/trickfire/urc-2023 + - ..:/home/trickfire/viator # - /dev/video0:/dev/video0 - type: bind source: ${HOME}/.ssh @@ -18,7 +18,7 @@ services: bind: create_host_path: true - working_dir: /home/trickfire/urc-2023 + working_dir: /home/trickfire/viator network_mode: host diff --git a/.devcontainer/trickfire-can-sudoers b/.devcontainer/trickfire-can-sudoers index 6da4da7..ad84900 100644 --- a/.devcontainer/trickfire-can-sudoers +++ b/.devcontainer/trickfire-can-sudoers @@ -1,3 +1,3 @@ -Defaults!/home/trickfire/urc-2023/install/can_rmdx8/lib/can_rmdx8/can_rmdx8 !env_reset, env_delete-="PYTHONPATH LD_LIBRARY_PATH" +Defaults!/home/trickfire/viator/install/can_rmdx8/lib/can_rmdx8/can_rmdx8 !env_reset, env_delete-="PYTHONPATH LD_LIBRARY_PATH" -trickfire ALL=(root) NOPASSWD: /usr/sbin/ip, /usr/sbin/modprobe, /usr/bin/candump, /usr/bin/cansend, /usr/bin/cangen, /usr/bin/cansniffer, /home/trickfire/urc-2023/install/can_rmdx8/lib/can_rmdx8/can_rmdx8 +trickfire ALL=(root) NOPASSWD: /usr/sbin/ip, /usr/sbin/modprobe, /usr/bin/candump, /usr/bin/cansend, /usr/bin/cangen, /usr/bin/cansniffer, /home/trickfire/viator/install/can_rmdx8/lib/can_rmdx8/can_rmdx8 diff --git a/.vscode/settings.json b/.vscode/settings.json index 342c687..3e0c6fa 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -40,12 +40,12 @@ "python.autoComplete.extraPaths": [ "/opt/ros/humble/lib/python3.10/site-packages", "./src", - "/home/trickfire/urc-2023/install/custom_interfaces/local/lib/python3.10/dist-packages" + "/home/trickfire/viator/install/custom_interfaces/local/lib/python3.10/dist-packages" ], "python.analysis.extraPaths": [ "/opt/ros/humble/lib/python3.10/site-packages", "./src", - "/home/trickfire/urc-2023/install/custom_interfaces/local/lib/python3.10/dist-packages" + "/home/trickfire/viator/install/custom_interfaces/local/lib/python3.10/dist-packages" ], "python.analysis.diagnosticSeverityOverrides": { diff --git a/Makefile b/Makefile index 46f87d1..67eb8cc 100644 --- a/Makefile +++ b/Makefile @@ -15,7 +15,7 @@ connect: can-setup: ./scripts/setup-can-network.sh -sync-orin: +sync: ./scripts/sync-to-orin.sh $(IP) $(REMOTE_PATH) format: diff --git a/README.md b/README.md index 2ece3dd..e6e1a2b 100644 --- a/README.md +++ b/README.md @@ -1,12 +1,11 @@ # Viator -Software developed by [Trickfire Robotics](https://www.trickfirerobotics.org/) for the Viator Rover built for the [University Rover Challenge](https://urc.marssociety.org/), using [ROS2 Humble](https://docs.ros.org/en/humble/index.html). +Software developed by [Trickfire Robotics](https://www.trickfirerobotics.org/) for the Viator Rover built for the [University Rover Challenge](https://urc.marssociety.org/). ## Documentation -**Full documentation is at [docs.trickfirerobotics.com/simulations](https://docs.trickfirerobotics.com/simulations).** See also our -[Notion wiki](https://www.notion.so/trickfire/Getting-Started-With-Viator-Rover-1491fd41ff5b801485e0f6ad57e0a0aa). +**Full documentation is at [docs.trickfirerobotics.com/simulations](https://docs.trickfirerobotics.com/viator).** -- [Getting Started](http://docs.trickfirerobotics.com/urc-2023/getting-started) - dev environment setup -- [Architecture](http://docs.trickfirerobotics.com/urc-2023/architecture) - architecture decisions/explanations -- [Rover Launch](http://docs.trickfirerobotics.com/urc-2023/launching) - how to launch Viator +- [Getting Started](http://docs.trickfirerobotics.com/viator/getting-started) - dev environment setup +- [Architecture](http://docs.trickfirerobotics.com/viator/architecture) - architecture decisions/explanations +- [Rover Launch](http://docs.trickfirerobotics.com/viator/launching) - how to launch Viator diff --git a/docs/architecture.mdx b/docs/architecture.mdx index 59459c4..38ff94d 100644 --- a/docs/architecture.mdx +++ b/docs/architecture.mdx @@ -7,7 +7,7 @@ slug: architecture ## Repo layout ``` -urc-2023/ +viator/ ├── src/ # ROS 2 workspace (colcon) │ ├── arm/ # Arm control node │ ├── camera/ # Camera streaming node @@ -31,13 +31,13 @@ urc-2023/ Not a ROS node itself; every node package imports from here. -| File | Purpose | -| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | -| `lib/configs.py` | Static motor configuration (CAN IDs, motor type, gear ratios) shared across the whole robot. | -| `lib/interface/robot_interface.py` | `RobotInterface` — the utility class nodes use to command motors (converts between physical units and raw motor commands, publishes over the CAN bridges). | -| `lib/interface/robot_info.py` | `RobotInfo` — the read-side counterpart: subscribes to motor state topics and exposes the current state of every motor on the robot. | -| `lib/motor_state/` | Typed state objects for each motor backend (`CANMotorState`, `MoteusMotorState`, `RMDX8MotorState`). | -| `lib/color_codes.py`, `lib/json_msg.py` | Small logging/serialization helpers. | +| File | Purpose | +| --- | --- | +| `lib/configs.py` | Static motor configuration (CAN IDs, motor type, gear ratios) shared across the whole robot. | +| `lib/interface/robot_interface.py` | `RobotInterface` — the utility class nodes use to command motors (converts between physical units and raw motor commands, publishes over the CAN bridges). | +| `lib/interface/robot_info.py` | `RobotInfo` — the read-side counterpart: subscribes to motor state topics and exposes the current state of every motor on the robot. | +| `lib/motor_state/` | Typed state objects for each motor backend (`CANMotorState`, `MoteusMotorState`, `RMDX8MotorState`). | +| `lib/color_codes.py`, `lib/json_msg.py` | Small logging/serialization helpers. | ## Motor drivers @@ -62,13 +62,13 @@ Two independent CAN motor controller backends, both bridging to the shared `lib/ ## Robot-facing nodes -| Node | Description | -| -------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| `drivebase` | Subscribes to left/right drive commands and forwards them to the wheel motors via `RobotInterface`. | -| `arm` | Arm control; supports per-motor velocity/position control today (`individual_control_vel.py`), with inverse kinematics stubbed out as a future `ArmModeEnum` mode. Mode is switched at runtime via the `custom_interfaces/srv/ArmMode` service. | -| `camera` | `roscamera` node (`camera/roscamera.py`) enumerates connected USB cameras and publishes compressed image streams over `sensor_msgs/CompressedImage`. | -| `heartbeat` | Connection watchdog: if the base station connection drops, it's responsible for cutting power to the motors as a safety stop. | -| `mission_control_updater` | Periodically collects motor state via `RobotInfo`, serializes it to JSON (`info_to_json_helper.py`), and publishes it for the mission control dashboard (delivered over `ros-humble-rosbridge-server`, installed in the Dockerfile). | +| Node | Description | +| --- | --- | +| `drivebase` | Subscribes to left/right drive commands and forwards them to the wheel motors via `RobotInterface`. | +| `arm` | Arm control; supports per-motor velocity/position control today (`individual_control_vel.py`), with inverse kinematics stubbed out as a future `ArmModeEnum` mode. Mode is switched at runtime via the `custom_interfaces/srv/ArmMode` service. | +| `camera` | `roscamera` node (`camera/roscamera.py`) enumerates connected USB cameras and publishes compressed image streams over `sensor_msgs/CompressedImage`. | +| `heartbeat` | Connection watchdog: if the base station connection drops, it's responsible for cutting power to the motors as a safety stop. | +| `mission_control_updater` | Periodically collects motor state via `RobotInfo`, serializes it to JSON (`info_to_json_helper.py`), and publishes it for the mission control dashboard (delivered over `ros-humble-rosbridge-server`, installed in the Dockerfile). | ## `custom_interfaces` diff --git a/docs/getting-started.mdx b/docs/getting-started.mdx index d53f94e..18fe9e9 100644 --- a/docs/getting-started.mdx +++ b/docs/getting-started.mdx @@ -4,39 +4,28 @@ description: Set up a development environment for the Viator rover software. slug: / --- -This is the software for **Viator**, Trickfire Robotics' rover for the [University Rover -Challenge](https://urc.marssociety.org/), built on [ROS 2 Humble](https://docs.ros.org/en/humble/). +This is the software for **Viator**, Trickfire Robotics' rover for the [University Rover Challenge](https://urc.marssociety.org/), built on [ROS 2 Humble](https://docs.ros.org/en/humble/). ## Prerequisites - [Docker](https://docs.docker.com/get-docker/) -- [Visual Studio Code](https://code.visualstudio.com/) with the - [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) - extension +- [Visual Studio Code](https://code.visualstudio.com/) with the [Dev Containers](https://marketplace.visualstudio.com/items?itemName=ms-vscode-remote.remote-containers) extension -Development happens inside a Docker container so every contributor gets the same ROS 2 Humble -environment, regardless of host OS. +Development happens inside a Docker container so every contributor gets the same ROS 2 Humble environment, regardless of host OS. ## Set up the dev container 1. Clone the repo (with submodules): ```bash title="Terminal" - git clone --recurse-submodules https://github.com/TrickfireRobotics/urc-2023.git + git clone --recurse-submodules https://github.com/TrickfireRobotics/viator.git ``` -2. Open the folder in VS Code and choose **Reopen in Container** when prompted (or run - **Dev Containers: Reopen in Container** from the command palette). This uses - `.devcontainer/docker-compose.yml` to build `.devcontainer/Dockerfile` (which installs - ROS 2 Humble, the CAN/motor tooling, and the - [myactuator_rmd](https://github.com/2b-t/myactuator_rmd) library) and starts it as a - container named `viator`, so it's easy to find with `docker ps`. +2. Open the folder in VS Code and choose **Reopen in Container** when prompted (or run **Dev Containers: Reopen in Container** from the command palette). This uses `.devcontainer/docker-compose.yml` to build `.devcontainer/Dockerfile` (which installs ROS 2 Humble, the CAN/motor tooling, and the [myactuator_rmd](https://github.com/2b-t/myactuator_rmd) library) and starts it as a container named `viator`, so it's easy to find with `docker ps`. ## Build and launch -All common actions are exposed as `make` targets from the repo root — see -[Launching the Rover](launching) for the full workflow. The short version, from inside the -container: +All common actions are exposed as `make` targets from the repo root — see [Launching the Rover](launching) for the full workflow. The short version, from inside the container: ```bash title="Terminal" make build # colcon build --symlink-install @@ -51,20 +40,15 @@ make launch # ros2 launch viator_launch robot.launch.py ## Formatting and linting -Python is formatted/linted with [Ruff](https://docs.astral.sh/ruff/) and type-checked with -[mypy](https://mypy-lang.org/); shell scripts are formatted with -[shfmt](https://github.com/mvdan/sh). Install the recommended VS Code extensions when prompted, -or run everything manually: +Python is formatted/linted with [Ruff](https://docs.astral.sh/ruff/) and type-checked with [mypy](https://mypy-lang.org/); shell scripts are formatted with [shfmt](https://github.com/mvdan/sh). Install the recommended VS Code extensions when prompted, or run everything manually: ```bash title="Terminal" make format ``` -Run `make hooks` once after cloning to install the pre-commit hooks that enforce this -automatically at commit time. +Run `make hooks` once after cloning to install the pre-commit hooks that enforce this automatically at commit time. ## Where to go next - [Architecture](architecture) — what each ROS package does and how they fit together. -- [Launching the Rover](launching) — the full build → CAN setup → launch workflow, including - deploying to the onboard Orin. +- [Launching the Rover](launching) — the full build → CAN setup → launch workflow, including deploying to the onboard Orin. diff --git a/docs/launching.mdx b/docs/launching.mdx index 847db4a..d058d1f 100644 --- a/docs/launching.mdx +++ b/docs/launching.mdx @@ -7,7 +7,7 @@ This walks through the full workflow for getting Viator's software running end t ## Start mission control -Mission control lives in its own repo, separate from `urc-2023`. +Mission control lives in its own repo, separate from `viator`. @@ -37,15 +37,15 @@ Mission control lives in its own repo, separate from `urc-2023`. - Mission control is a plain Node/Vite project - run it on your host, not inside the `urc-2023` - dev container. + Mission control is a plain Node/Vite project - run it on your host, not inside the `viator` dev + container. ## Connect to the rover ```bash title="Terminal" ssh trickfire@192.168.0.112 -cd ~/urc-2023 +cd ~/viator ``` ## Bring up the CAN bus diff --git a/scripts/build.sh b/scripts/build.sh index d294220..148fc8d 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -1,8 +1,10 @@ #!/usr/bin/env bash +cd "$(dirname "$0")/.." + source /opt/ros/$ROS_DISTRO/setup.bash colcon build \ --symlink-install \ - --base-paths /home/trickfire/urc-2023 --cmake-args \ + --base-paths . --cmake-args \ -DCMAKE_BUILD_TYPE=Debug diff --git a/scripts/sync-to-orin.sh b/scripts/sync-to-orin.sh index 90d34fd..ce87dbb 100755 --- a/scripts/sync-to-orin.sh +++ b/scripts/sync-to-orin.sh @@ -1,25 +1,15 @@ #!/bin/bash -# Syncs the local urc-2023 repo to a remote orin over rsync. -# Usage: ./sync-to-orin.sh -# -# ip - IP address of the remote host (e.g. 192.168.0.148) -# remote_path - Absolute path on the remote (e.g. /home/trickfire/urc-2023) +# Syncs the local viator repo to a remote orin over rsync. -if [ -z "$1" ] || [ -z "$2" ]; then - echo "Usage: $0 " - echo " ip IP address of the orin" - echo " remote_path Path on the orin to the repo to sync" - exit 1 -fi +REMOTE_IP="192.168.0.112" -REMOTE_IP="$1" -REMOTE_PATH="$2" +REMOTE_PATH="${1:-/home/trickfire/viator}" LOCAL_PATH="$(cd "$(dirname "$0")/.." && git rev-parse --show-toplevel)/" echo "Syncing to trickfire@${REMOTE_IP}:${REMOTE_PATH} ..." -rsync -avz --progress \ +rsync -avz --delete --progress \ --exclude='.git/' \ --exclude='build/' \ --exclude='install/' \ From ee508d6e489daf67e469ccb6daea78095a32134c Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Wed, 7 Oct 2026 02:22:21 +0000 Subject: [PATCH 10/21] fix: some remaining details --- .devcontainer/devcontainer.json | 2 +- .devcontainer/trickfire.bashrc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index ab2fe05..4573644 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -2,7 +2,7 @@ "dockerComposeFile": "docker-compose.yml", "service": "viator", "workspaceFolder": "/home/trickfire/viator", - "postCreateCommand": "pre-commit install", + "postCreateCommand": "make hooks", "customizations": { "vscode": { "extensions": [ diff --git a/.devcontainer/trickfire.bashrc b/.devcontainer/trickfire.bashrc index 834bd39..0a1edcc 100644 --- a/.devcontainer/trickfire.bashrc +++ b/.devcontainer/trickfire.bashrc @@ -22,7 +22,7 @@ fi [ -x /usr/bin/lesspipe ] && eval "$(SHELL=/bin/sh lesspipe)" # ---------- ROS workspace overlay ---------- -export ROS_WS="${ROS_WS:-/home/trickfire/urc-2023}" +export ROS_WS="${ROS_WS:-/home/trickfire/viator}" _ros_source_env() { if [ -f "/opt/ros/${ROS_DISTRO}/setup.bash" ]; then From 01e74b6a4fbeb8f7aba7a53469d9bcc8ef2f6cbf Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Wed, 7 Oct 2026 02:47:40 +0000 Subject: [PATCH 11/21] feat: make clean --- Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 67eb8cc..55ca2f3 100644 --- a/Makefile +++ b/Makefile @@ -1,8 +1,11 @@ -.PHONY: build launch container connect can-setup sync-orin format hooks +.PHONY: build clean launch container connect can-setup sync-orin format hooks build: ./scripts/build.sh +clean: + rm -rf build install log + launch: ./scripts/launch.sh From 71c46ea2b3e1f06d0bef8780a7f253d6a972267f Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Wed, 7 Oct 2026 02:50:55 +0000 Subject: [PATCH 12/21] fix: remove flag --- scripts/launch.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/launch.sh b/scripts/launch.sh index e0f38c0..5d12e34 100755 --- a/scripts/launch.sh +++ b/scripts/launch.sh @@ -10,4 +10,4 @@ source /opt/ros/$ROS_DISTRO/setup.bash source ./install/setup.bash # launch using ros -ros2 launch viator_launch robot.launch.py --log-level rosbridge_websocket:=warn +ros2 launch viator_launch robot.launch.py From aab0d3d319eb0ed716e6fa5f813bdda02f6f8f57 Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Wed, 7 Oct 2026 02:54:12 +0000 Subject: [PATCH 13/21] fix: add camera deps to supress launch errors --- .devcontainer/Dockerfile | 3 ++- src/camera/package.xml | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index ff7e33e..663fa7c 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -17,7 +17,8 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ python3-numpy \ libboost-python-dev \ libopencv-dev \ - python3-opencv + python3-opencv \ + ros-humble-cv-bridge RUN pip3 install --no-cache-dir \ "numpy<2" \ diff --git a/src/camera/package.xml b/src/camera/package.xml index 2500f65..9bcebe8 100644 --- a/src/camera/package.xml +++ b/src/camera/package.xml @@ -7,6 +7,10 @@ trickfire TODO: License declaration + rclpy + cv_bridge + sensor_msgs + ament_copyright ament_flake8 ament_pep257 From d1c1fbe3d04e8c42a61bb71703c70e160fc7613a Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Wed, 7 Oct 2026 03:19:55 +0000 Subject: [PATCH 14/21] fix: fixed ldpath perm issues --- .devcontainer/Dockerfile | 4 ++++ .devcontainer/trickfire-can-sudoers | 3 +-- src/camera/package.xml | 2 +- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 663fa7c..fef90e2 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -20,6 +20,10 @@ RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ python3-opencv \ ros-humble-cv-bridge +RUN echo "/opt/ros/$ROS_DISTRO/lib" > /etc/ld.so.conf.d/ros2.conf \ + && echo "/opt/ros/$ROS_DISTRO/lib/$(dpkg-architecture -qDEB_HOST_MULTIARCH)" >> /etc/ld.so.conf.d/ros2.conf \ + && ldconfig + RUN pip3 install --no-cache-dir \ "numpy<2" \ moteus \ diff --git a/.devcontainer/trickfire-can-sudoers b/.devcontainer/trickfire-can-sudoers index ad84900..433d106 100644 --- a/.devcontainer/trickfire-can-sudoers +++ b/.devcontainer/trickfire-can-sudoers @@ -1,3 +1,2 @@ -Defaults!/home/trickfire/viator/install/can_rmdx8/lib/can_rmdx8/can_rmdx8 !env_reset, env_delete-="PYTHONPATH LD_LIBRARY_PATH" - +Defaults env_keep+="PYTHONPATH AMENT_PREFIX_PATH" trickfire ALL=(root) NOPASSWD: /usr/sbin/ip, /usr/sbin/modprobe, /usr/bin/candump, /usr/bin/cansend, /usr/bin/cangen, /usr/bin/cansniffer, /home/trickfire/viator/install/can_rmdx8/lib/can_rmdx8/can_rmdx8 diff --git a/src/camera/package.xml b/src/camera/package.xml index 9bcebe8..6b5f9a4 100644 --- a/src/camera/package.xml +++ b/src/camera/package.xml @@ -19,4 +19,4 @@ ament_python - \ No newline at end of file + From 622288c1fc2db23f8614d2478501fd8528b3d2fb Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Wed, 7 Oct 2026 21:23:54 +0000 Subject: [PATCH 15/21] feat: fixed licesnes and package description contacts --- LICENSE | 202 ++++++++++++++++++++++++ src/arm/package.xml | 4 +- src/arm/setup.py | 4 +- src/camera/package.xml | 4 +- src/camera/setup.py | 4 +- src/can_moteus/package.xml | 4 +- src/can_moteus/setup.py | 4 +- src/can_rmdx8/package.xml | 4 +- src/can_rmdx8/setup.py | 4 +- src/custom_interfaces/package.xml | 4 +- src/drivebase/package.xml | 4 +- src/drivebase/setup.py | 4 +- src/heartbeat/package.xml | 4 +- src/heartbeat/setup.py | 4 +- src/mission_control_updater/package.xml | 4 +- src/mission_control_updater/setup.py | 4 +- src/viator_launch/package.xml | 4 +- src/viator_launch/setup.py | 4 +- 18 files changed, 236 insertions(+), 34 deletions(-) create mode 100644 LICENSE diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..d645695 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/src/arm/package.xml b/src/arm/package.xml index 97ba82a..0374ca2 100644 --- a/src/arm/package.xml +++ b/src/arm/package.xml @@ -4,8 +4,8 @@ arm 0.0.0 TODO: Package description - trickfire - TODO: License declaration + trickfire + Apache-2.0 custom_interfaces diff --git a/src/arm/setup.py b/src/arm/setup.py index e475a24..c97e84b 100644 --- a/src/arm/setup.py +++ b/src/arm/setup.py @@ -13,9 +13,9 @@ install_requires=["setuptools"], zip_safe=True, maintainer="trickfire", - maintainer_email="vladimirkupryukhin@gmail.com", + maintainer_email="tfrbtcs@uw.edu", description="TODO: Package description", - license="TODO: License declaration", + license="Apache-2.0", tests_require=["pytest"], entry_points={ "console_scripts": ["arm = arm.arm:main"], diff --git a/src/camera/package.xml b/src/camera/package.xml index 6b5f9a4..1390c0b 100644 --- a/src/camera/package.xml +++ b/src/camera/package.xml @@ -4,8 +4,8 @@ camera 0.0.0 TODO: Package description - trickfire - TODO: License declaration + trickfire + Apache-2.0 rclpy cv_bridge diff --git a/src/camera/setup.py b/src/camera/setup.py index 805334a..11c3085 100644 --- a/src/camera/setup.py +++ b/src/camera/setup.py @@ -13,9 +13,9 @@ install_requires=["setuptools"], zip_safe=True, maintainer="trickfire", - maintainer_email="kimdavid2222@gmail.com", + maintainer_email="tfrbtcs@uw.edu", description="TODO: Package description", - license="TODO: License declaration", + license="Apache-2.0", tests_require=["pytest"], entry_points={ "console_scripts": ["roscamera = camera.roscamera:main"], diff --git a/src/can_moteus/package.xml b/src/can_moteus/package.xml index 025f5ab..3d86979 100644 --- a/src/can_moteus/package.xml +++ b/src/can_moteus/package.xml @@ -4,8 +4,8 @@ can_moteus 0.0.0 TODO: Package description - trickfire - TODO: License declaration + trickfire + Apache-2.0 ament_copyright ament_flake8 diff --git a/src/can_moteus/setup.py b/src/can_moteus/setup.py index 38aceb4..fc2d757 100644 --- a/src/can_moteus/setup.py +++ b/src/can_moteus/setup.py @@ -17,9 +17,9 @@ install_requires=["setuptools"], zip_safe=True, maintainer="trickfire", - maintainer_email="trickfire@todo.todo", + maintainer_email="tfrbtcs@uw.edu", description="TODO: Package description", - license="TODO: License declaration", + license="Apache-2.0", tests_require=["pytest"], entry_points={ "console_scripts": ["can_moteus = can_moteus.ros_moteus_bridge:main"], diff --git a/src/can_rmdx8/package.xml b/src/can_rmdx8/package.xml index 2516577..f90f8b7 100644 --- a/src/can_rmdx8/package.xml +++ b/src/can_rmdx8/package.xml @@ -4,8 +4,8 @@ can_rmdx8 0.0.0 TODO: Package description - trickfire - TODO: License declaration + trickfire + Apache-2.0 ament_copyright ament_flake8 diff --git a/src/can_rmdx8/setup.py b/src/can_rmdx8/setup.py index 7aa0601..4a906c1 100644 --- a/src/can_rmdx8/setup.py +++ b/src/can_rmdx8/setup.py @@ -13,9 +13,9 @@ install_requires=["setuptools"], zip_safe=True, maintainer="trickfire", - maintainer_email="trickfire@todo.todo", + maintainer_email="tfrbtcs@uw.edu", description="TODO: Package description", - license="TODO: License declaration", + license="Apache-2.0", tests_require=["pytest"], entry_points={ "console_scripts": ["can_rmdx8 = can_rmdx8.rmdx8_motor_manager:main"], diff --git a/src/custom_interfaces/package.xml b/src/custom_interfaces/package.xml index 53deff3..572df10 100644 --- a/src/custom_interfaces/package.xml +++ b/src/custom_interfaces/package.xml @@ -4,8 +4,8 @@ custom_interfaces 0.0.0 TODO: Package description - trickfire - TODO: License declaration + trickfire + Apache-2.0 ament_cmake diff --git a/src/drivebase/package.xml b/src/drivebase/package.xml index 474fac5..0fcc9ef 100644 --- a/src/drivebase/package.xml +++ b/src/drivebase/package.xml @@ -4,8 +4,8 @@ drivebase 0.0.0 Connects the controller to the wheel motors - trickfire - TODO: License declaration + trickfire + Apache-2.0 ament_copyright ament_flake8 diff --git a/src/drivebase/setup.py b/src/drivebase/setup.py index 36d76aa..9c9cce0 100644 --- a/src/drivebase/setup.py +++ b/src/drivebase/setup.py @@ -13,9 +13,9 @@ install_requires=["setuptools"], zip_safe=True, maintainer="trickfire", - maintainer_email="cklay@uw.edu", + maintainer_email="tfrbtcs@uw.edu", description="Connects the controller to the wheel motors", - license="TODO: License declaration", + license="Apache-2.0", tests_require=["pytest"], entry_points={ "console_scripts": ["drivebase = drivebase.drivebase:main"], diff --git a/src/heartbeat/package.xml b/src/heartbeat/package.xml index d2ba95b..dcb9976 100644 --- a/src/heartbeat/package.xml +++ b/src/heartbeat/package.xml @@ -4,8 +4,8 @@ heartbeat 0.0.0 Heartbeat Node Package - trickfire - TODO: License declaration + trickfire + Apache-2.0 rclpy std_msgs diff --git a/src/heartbeat/setup.py b/src/heartbeat/setup.py index f745ee2..756aecb 100644 --- a/src/heartbeat/setup.py +++ b/src/heartbeat/setup.py @@ -13,9 +13,9 @@ install_requires=["setuptools"], zip_safe=True, maintainer="trickfire", - maintainer_email="vanillanguyen635@gmail.com", + maintainer_email="tfrbtcs@uw.edu", description="TODO: Package description", - license="TODO: License declaration", + license="Apache-2.0", tests_require=["pytest"], entry_points={ "console_scripts": [ diff --git a/src/mission_control_updater/package.xml b/src/mission_control_updater/package.xml index fb8ad91..c8a279d 100644 --- a/src/mission_control_updater/package.xml +++ b/src/mission_control_updater/package.xml @@ -4,8 +4,8 @@ mission_control_updater 0.0.0 TODO: Package description - trickfire - TODO: License declaration + trickfire + Apache-2.0 ament_copyright ament_flake8 diff --git a/src/mission_control_updater/setup.py b/src/mission_control_updater/setup.py index f6469a6..11a92c9 100644 --- a/src/mission_control_updater/setup.py +++ b/src/mission_control_updater/setup.py @@ -13,9 +13,9 @@ install_requires=["setuptools"], zip_safe=True, maintainer="trickfire", - maintainer_email="vladimirkupryukhin@gmail.com", + maintainer_email="tfrbtcs@uw.edu", description="TODO: Package description", - license="TODO: License declaration", + license="Apache-2.0", tests_require=["pytest"], entry_points={ "console_scripts": ["mission_control_updater = mission_control_updater.updater:main"], diff --git a/src/viator_launch/package.xml b/src/viator_launch/package.xml index 2a69242..ea762f5 100644 --- a/src/viator_launch/package.xml +++ b/src/viator_launch/package.xml @@ -4,8 +4,8 @@ viator_launch 0.0.0 TODO: Package description - trickfire - TODO: License declaration + trickfire + Apache-2.0 can_moteus can_rmdx8 diff --git a/src/viator_launch/setup.py b/src/viator_launch/setup.py index 070aeb3..af842c2 100644 --- a/src/viator_launch/setup.py +++ b/src/viator_launch/setup.py @@ -18,8 +18,8 @@ # Zip-safety is not yet confirmed. zip_safe=True, maintainer="trickfire", - maintainer_email="phillipov@outlook.com", + maintainer_email="tfrbtcs@uw.edu", description="TODO: Package description", - license="TODO: License declaration", + license="Apache-2.0", tests_require=["pytest"], ) From 275713835b7f87fcd7e35cf9170243842df3e664 Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Wed, 7 Oct 2026 21:30:09 +0000 Subject: [PATCH 16/21] refactor: removed unused test bloat --- src/arm/package.xml | 5 ---- src/arm/setup.py | 1 - src/arm/test/test_copyright.py | 25 ------------------- src/camera/package.xml | 5 ---- src/camera/setup.py | 1 - src/camera/test/test_copyright.py | 25 ------------------- src/can_moteus/package.xml | 4 --- src/can_moteus/setup.py | 1 - src/can_moteus/test/test_copyright.py | 25 ------------------- src/can_rmdx8/package.xml | 5 ---- src/can_rmdx8/setup.py | 1 - src/can_rmdx8/test/test_copyright.py | 25 ------------------- src/drivebase/package.xml | 5 ---- src/drivebase/setup.py | 1 - src/drivebase/test/test_copyright.py | 23 ----------------- src/heartbeat/package.xml | 5 ---- src/heartbeat/setup.py | 1 - src/heartbeat/test/test_copyright.py | 25 ------------------- src/heartbeat/test/test_flake8.py | 23 ----------------- src/heartbeat/test/test_pep257.py | 23 ----------------- src/mission_control_updater/package.xml | 5 ---- src/mission_control_updater/setup.py | 1 - .../test/test_copyright.py | 25 ------------------- src/viator_launch/package.xml | 6 ----- src/viator_launch/setup.py | 1 - src/viator_launch/test/test_copyright.py | 23 ----------------- 26 files changed, 290 deletions(-) delete mode 100644 src/arm/test/test_copyright.py delete mode 100644 src/camera/test/test_copyright.py delete mode 100644 src/can_moteus/test/test_copyright.py delete mode 100644 src/can_rmdx8/test/test_copyright.py delete mode 100644 src/drivebase/test/test_copyright.py delete mode 100644 src/heartbeat/test/test_copyright.py delete mode 100644 src/heartbeat/test/test_flake8.py delete mode 100644 src/heartbeat/test/test_pep257.py delete mode 100644 src/mission_control_updater/test/test_copyright.py delete mode 100644 src/viator_launch/test/test_copyright.py diff --git a/src/arm/package.xml b/src/arm/package.xml index 0374ca2..b1b5318 100644 --- a/src/arm/package.xml +++ b/src/arm/package.xml @@ -9,11 +9,6 @@ custom_interfaces - ament_copyright - ament_flake8 - ament_pep257 - python3-pytest - ament_python diff --git a/src/arm/setup.py b/src/arm/setup.py index c97e84b..9854065 100644 --- a/src/arm/setup.py +++ b/src/arm/setup.py @@ -16,7 +16,6 @@ maintainer_email="tfrbtcs@uw.edu", description="TODO: Package description", license="Apache-2.0", - tests_require=["pytest"], entry_points={ "console_scripts": ["arm = arm.arm:main"], }, diff --git a/src/arm/test/test_copyright.py b/src/arm/test/test_copyright.py deleted file mode 100644 index 60c2d1e..0000000 --- a/src/arm/test/test_copyright.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2015 Open Source Robotics Foundation, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import pytest -from ament_copyright.main import main - - -# Remove the `skip` decorator once the source file(s) have a copyright header -@pytest.mark.skip(reason="No copyright header has been placed in the generated source file.") -@pytest.mark.copyright -@pytest.mark.linter -def test_copyright(): - rc = main(argv=[".", "test"]) - assert rc == 0, "Found errors" diff --git a/src/camera/package.xml b/src/camera/package.xml index 1390c0b..2939815 100644 --- a/src/camera/package.xml +++ b/src/camera/package.xml @@ -11,11 +11,6 @@ cv_bridge sensor_msgs - ament_copyright - ament_flake8 - ament_pep257 - python3-pytest - ament_python diff --git a/src/camera/setup.py b/src/camera/setup.py index 11c3085..4c61367 100644 --- a/src/camera/setup.py +++ b/src/camera/setup.py @@ -16,7 +16,6 @@ maintainer_email="tfrbtcs@uw.edu", description="TODO: Package description", license="Apache-2.0", - tests_require=["pytest"], entry_points={ "console_scripts": ["roscamera = camera.roscamera:main"], }, diff --git a/src/camera/test/test_copyright.py b/src/camera/test/test_copyright.py deleted file mode 100644 index 60c2d1e..0000000 --- a/src/camera/test/test_copyright.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2015 Open Source Robotics Foundation, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import pytest -from ament_copyright.main import main - - -# Remove the `skip` decorator once the source file(s) have a copyright header -@pytest.mark.skip(reason="No copyright header has been placed in the generated source file.") -@pytest.mark.copyright -@pytest.mark.linter -def test_copyright(): - rc = main(argv=[".", "test"]) - assert rc == 0, "Found errors" diff --git a/src/can_moteus/package.xml b/src/can_moteus/package.xml index 3d86979..b3acd7a 100644 --- a/src/can_moteus/package.xml +++ b/src/can_moteus/package.xml @@ -7,10 +7,6 @@ trickfire Apache-2.0 - ament_copyright - ament_flake8 - ament_pep257 - python3-pytest rclpy diff --git a/src/can_moteus/setup.py b/src/can_moteus/setup.py index fc2d757..70a0362 100644 --- a/src/can_moteus/setup.py +++ b/src/can_moteus/setup.py @@ -20,7 +20,6 @@ maintainer_email="tfrbtcs@uw.edu", description="TODO: Package description", license="Apache-2.0", - tests_require=["pytest"], entry_points={ "console_scripts": ["can_moteus = can_moteus.ros_moteus_bridge:main"], }, diff --git a/src/can_moteus/test/test_copyright.py b/src/can_moteus/test/test_copyright.py deleted file mode 100644 index 60c2d1e..0000000 --- a/src/can_moteus/test/test_copyright.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2015 Open Source Robotics Foundation, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import pytest -from ament_copyright.main import main - - -# Remove the `skip` decorator once the source file(s) have a copyright header -@pytest.mark.skip(reason="No copyright header has been placed in the generated source file.") -@pytest.mark.copyright -@pytest.mark.linter -def test_copyright(): - rc = main(argv=[".", "test"]) - assert rc == 0, "Found errors" diff --git a/src/can_rmdx8/package.xml b/src/can_rmdx8/package.xml index f90f8b7..8b5cbcb 100644 --- a/src/can_rmdx8/package.xml +++ b/src/can_rmdx8/package.xml @@ -7,11 +7,6 @@ trickfire Apache-2.0 - ament_copyright - ament_flake8 - ament_pep257 - python3-pytest - ament_python diff --git a/src/can_rmdx8/setup.py b/src/can_rmdx8/setup.py index 4a906c1..5c5f87f 100644 --- a/src/can_rmdx8/setup.py +++ b/src/can_rmdx8/setup.py @@ -16,7 +16,6 @@ maintainer_email="tfrbtcs@uw.edu", description="TODO: Package description", license="Apache-2.0", - tests_require=["pytest"], entry_points={ "console_scripts": ["can_rmdx8 = can_rmdx8.rmdx8_motor_manager:main"], }, diff --git a/src/can_rmdx8/test/test_copyright.py b/src/can_rmdx8/test/test_copyright.py deleted file mode 100644 index 60c2d1e..0000000 --- a/src/can_rmdx8/test/test_copyright.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2015 Open Source Robotics Foundation, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import pytest -from ament_copyright.main import main - - -# Remove the `skip` decorator once the source file(s) have a copyright header -@pytest.mark.skip(reason="No copyright header has been placed in the generated source file.") -@pytest.mark.copyright -@pytest.mark.linter -def test_copyright(): - rc = main(argv=[".", "test"]) - assert rc == 0, "Found errors" diff --git a/src/drivebase/package.xml b/src/drivebase/package.xml index 0fcc9ef..dd4b132 100644 --- a/src/drivebase/package.xml +++ b/src/drivebase/package.xml @@ -7,11 +7,6 @@ trickfire Apache-2.0 - ament_copyright - ament_flake8 - ament_pep257 - python3-pytest - ament_python diff --git a/src/drivebase/setup.py b/src/drivebase/setup.py index 9c9cce0..dc40b52 100644 --- a/src/drivebase/setup.py +++ b/src/drivebase/setup.py @@ -16,7 +16,6 @@ maintainer_email="tfrbtcs@uw.edu", description="Connects the controller to the wheel motors", license="Apache-2.0", - tests_require=["pytest"], entry_points={ "console_scripts": ["drivebase = drivebase.drivebase:main"], }, diff --git a/src/drivebase/test/test_copyright.py b/src/drivebase/test/test_copyright.py deleted file mode 100644 index 9167f3d..0000000 --- a/src/drivebase/test/test_copyright.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2015 Open Source Robotics Foundation, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import pytest -from ament_copyright.main import main - - -@pytest.mark.copyright -@pytest.mark.linter -def test_copyright(): - rc = main(argv=[".", "test"]) - assert rc == 0, "Found errors" diff --git a/src/heartbeat/package.xml b/src/heartbeat/package.xml index dcb9976..e4b2bad 100644 --- a/src/heartbeat/package.xml +++ b/src/heartbeat/package.xml @@ -10,11 +10,6 @@ rclpy std_msgs - ament_copyright - ament_flake8 - ament_pep257 - python3-pytest - ament_python diff --git a/src/heartbeat/setup.py b/src/heartbeat/setup.py index 756aecb..3ade21c 100644 --- a/src/heartbeat/setup.py +++ b/src/heartbeat/setup.py @@ -16,7 +16,6 @@ maintainer_email="tfrbtcs@uw.edu", description="TODO: Package description", license="Apache-2.0", - tests_require=["pytest"], entry_points={ "console_scripts": [ # ros 2 executable = packagename.filename : function we want to run diff --git a/src/heartbeat/test/test_copyright.py b/src/heartbeat/test/test_copyright.py deleted file mode 100644 index 60c2d1e..0000000 --- a/src/heartbeat/test/test_copyright.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2015 Open Source Robotics Foundation, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import pytest -from ament_copyright.main import main - - -# Remove the `skip` decorator once the source file(s) have a copyright header -@pytest.mark.skip(reason="No copyright header has been placed in the generated source file.") -@pytest.mark.copyright -@pytest.mark.linter -def test_copyright(): - rc = main(argv=[".", "test"]) - assert rc == 0, "Found errors" diff --git a/src/heartbeat/test/test_flake8.py b/src/heartbeat/test/test_flake8.py deleted file mode 100644 index 22fffcb..0000000 --- a/src/heartbeat/test/test_flake8.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2017 Open Source Robotics Foundation, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import pytest -from ament_flake8.main import main_with_errors - - -@pytest.mark.flake8 -@pytest.mark.linter -def test_flake8(): - rc, errors = main_with_errors(argv=[]) - assert rc == 0, "Found %d code style errors / warnings:\n" % len(errors) + "\n".join(errors) diff --git a/src/heartbeat/test/test_pep257.py b/src/heartbeat/test/test_pep257.py deleted file mode 100644 index 4eddb46..0000000 --- a/src/heartbeat/test/test_pep257.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2015 Open Source Robotics Foundation, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import pytest -from ament_pep257.main import main - - -@pytest.mark.linter -@pytest.mark.pep257 -def test_pep257(): - rc = main(argv=[".", "test"]) - assert rc == 0, "Found code style errors / warnings" diff --git a/src/mission_control_updater/package.xml b/src/mission_control_updater/package.xml index c8a279d..ecde912 100644 --- a/src/mission_control_updater/package.xml +++ b/src/mission_control_updater/package.xml @@ -7,11 +7,6 @@ trickfire Apache-2.0 - ament_copyright - ament_flake8 - ament_pep257 - python3-pytest - ament_python diff --git a/src/mission_control_updater/setup.py b/src/mission_control_updater/setup.py index 11a92c9..1da2e95 100644 --- a/src/mission_control_updater/setup.py +++ b/src/mission_control_updater/setup.py @@ -16,7 +16,6 @@ maintainer_email="tfrbtcs@uw.edu", description="TODO: Package description", license="Apache-2.0", - tests_require=["pytest"], entry_points={ "console_scripts": ["mission_control_updater = mission_control_updater.updater:main"], }, diff --git a/src/mission_control_updater/test/test_copyright.py b/src/mission_control_updater/test/test_copyright.py deleted file mode 100644 index 60c2d1e..0000000 --- a/src/mission_control_updater/test/test_copyright.py +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2015 Open Source Robotics Foundation, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import pytest -from ament_copyright.main import main - - -# Remove the `skip` decorator once the source file(s) have a copyright header -@pytest.mark.skip(reason="No copyright header has been placed in the generated source file.") -@pytest.mark.copyright -@pytest.mark.linter -def test_copyright(): - rc = main(argv=[".", "test"]) - assert rc == 0, "Found errors" diff --git a/src/viator_launch/package.xml b/src/viator_launch/package.xml index ea762f5..3f6f57d 100644 --- a/src/viator_launch/package.xml +++ b/src/viator_launch/package.xml @@ -14,12 +14,6 @@ arm camera example_node - - - ament_copyright - ament_flake8 - ament_pep257 - python3-pytest ament_python diff --git a/src/viator_launch/setup.py b/src/viator_launch/setup.py index af842c2..31f3e4c 100644 --- a/src/viator_launch/setup.py +++ b/src/viator_launch/setup.py @@ -21,5 +21,4 @@ maintainer_email="tfrbtcs@uw.edu", description="TODO: Package description", license="Apache-2.0", - tests_require=["pytest"], ) diff --git a/src/viator_launch/test/test_copyright.py b/src/viator_launch/test/test_copyright.py deleted file mode 100644 index 9167f3d..0000000 --- a/src/viator_launch/test/test_copyright.py +++ /dev/null @@ -1,23 +0,0 @@ -# Copyright 2015 Open Source Robotics Foundation, Inc. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import pytest -from ament_copyright.main import main - - -@pytest.mark.copyright -@pytest.mark.linter -def test_copyright(): - rc = main(argv=[".", "test"]) - assert rc == 0, "Found errors" From 2bc59ecc3d9bae70a5caec47e017092a779dbc5a Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Wed, 7 Oct 2026 21:34:56 +0000 Subject: [PATCH 17/21] chore: filled out package descriptions marked as TODO --- src/arm/package.xml | 2 +- src/arm/setup.py | 2 +- src/camera/package.xml | 2 +- src/camera/setup.py | 2 +- src/can_moteus/package.xml | 2 +- src/can_moteus/setup.py | 2 +- src/can_rmdx8/package.xml | 2 +- src/can_rmdx8/setup.py | 2 +- src/custom_interfaces/package.xml | 2 +- src/heartbeat/package.xml | 2 +- src/heartbeat/setup.py | 2 +- src/mission_control_updater/package.xml | 2 +- src/mission_control_updater/setup.py | 2 +- src/viator_launch/package.xml | 2 +- src/viator_launch/setup.py | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/arm/package.xml b/src/arm/package.xml index b1b5318..52b6d66 100644 --- a/src/arm/package.xml +++ b/src/arm/package.xml @@ -3,7 +3,7 @@ arm 0.0.0 - TODO: Package description + Controls the rover arm's motors and operating mode trickfire Apache-2.0 diff --git a/src/arm/setup.py b/src/arm/setup.py index 9854065..121f091 100644 --- a/src/arm/setup.py +++ b/src/arm/setup.py @@ -14,7 +14,7 @@ zip_safe=True, maintainer="trickfire", maintainer_email="tfrbtcs@uw.edu", - description="TODO: Package description", + description="Controls the rover arm's motors and operating mode", license="Apache-2.0", entry_points={ "console_scripts": ["arm = arm.arm:main"], diff --git a/src/camera/package.xml b/src/camera/package.xml index 2939815..8aa564e 100644 --- a/src/camera/package.xml +++ b/src/camera/package.xml @@ -3,7 +3,7 @@ camera 0.0.0 - TODO: Package description + Captures and publishes compressed video from the rover's cameras trickfire Apache-2.0 diff --git a/src/camera/setup.py b/src/camera/setup.py index 4c61367..e34cdd2 100644 --- a/src/camera/setup.py +++ b/src/camera/setup.py @@ -14,7 +14,7 @@ zip_safe=True, maintainer="trickfire", maintainer_email="tfrbtcs@uw.edu", - description="TODO: Package description", + description="Captures and publishes compressed video from the rover's cameras", license="Apache-2.0", entry_points={ "console_scripts": ["roscamera = camera.roscamera:main"], diff --git a/src/can_moteus/package.xml b/src/can_moteus/package.xml index b3acd7a..bf56641 100644 --- a/src/can_moteus/package.xml +++ b/src/can_moteus/package.xml @@ -3,7 +3,7 @@ can_moteus 0.0.0 - TODO: Package description + Controls Moteus motor controllers over CAN trickfire Apache-2.0 diff --git a/src/can_moteus/setup.py b/src/can_moteus/setup.py index 70a0362..804991d 100644 --- a/src/can_moteus/setup.py +++ b/src/can_moteus/setup.py @@ -18,7 +18,7 @@ zip_safe=True, maintainer="trickfire", maintainer_email="tfrbtcs@uw.edu", - description="TODO: Package description", + description="Controls Moteus motor controllers over CAN", license="Apache-2.0", entry_points={ "console_scripts": ["can_moteus = can_moteus.ros_moteus_bridge:main"], diff --git a/src/can_rmdx8/package.xml b/src/can_rmdx8/package.xml index 8b5cbcb..c523484 100644 --- a/src/can_rmdx8/package.xml +++ b/src/can_rmdx8/package.xml @@ -3,7 +3,7 @@ can_rmdx8 0.0.0 - TODO: Package description + Controls RMDx8 motors over CAN trickfire Apache-2.0 diff --git a/src/can_rmdx8/setup.py b/src/can_rmdx8/setup.py index 5c5f87f..dffeb7a 100644 --- a/src/can_rmdx8/setup.py +++ b/src/can_rmdx8/setup.py @@ -14,7 +14,7 @@ zip_safe=True, maintainer="trickfire", maintainer_email="tfrbtcs@uw.edu", - description="TODO: Package description", + description="Controls RMDx8 motors over CAN", license="Apache-2.0", entry_points={ "console_scripts": ["can_rmdx8 = can_rmdx8.rmdx8_motor_manager:main"], diff --git a/src/custom_interfaces/package.xml b/src/custom_interfaces/package.xml index 572df10..6a82863 100644 --- a/src/custom_interfaces/package.xml +++ b/src/custom_interfaces/package.xml @@ -3,7 +3,7 @@ custom_interfaces 0.0.0 - TODO: Package description + Custom ROS message and service definitions for Viator trickfire Apache-2.0 diff --git a/src/heartbeat/package.xml b/src/heartbeat/package.xml index e4b2bad..8e95d55 100644 --- a/src/heartbeat/package.xml +++ b/src/heartbeat/package.xml @@ -3,7 +3,7 @@ heartbeat 0.0.0 - Heartbeat Node Package + Monitors rover connectivity and stops the motors if it's lost trickfire Apache-2.0 diff --git a/src/heartbeat/setup.py b/src/heartbeat/setup.py index 3ade21c..fc20562 100644 --- a/src/heartbeat/setup.py +++ b/src/heartbeat/setup.py @@ -14,7 +14,7 @@ zip_safe=True, maintainer="trickfire", maintainer_email="tfrbtcs@uw.edu", - description="TODO: Package description", + description="Monitors rover connectivity and stops the motors if it's lost", license="Apache-2.0", entry_points={ "console_scripts": [ diff --git a/src/mission_control_updater/package.xml b/src/mission_control_updater/package.xml index ecde912..d45a70a 100644 --- a/src/mission_control_updater/package.xml +++ b/src/mission_control_updater/package.xml @@ -3,7 +3,7 @@ mission_control_updater 0.0.0 - TODO: Package description + Sends rover telemetry to Mission Control trickfire Apache-2.0 diff --git a/src/mission_control_updater/setup.py b/src/mission_control_updater/setup.py index 1da2e95..629cec5 100644 --- a/src/mission_control_updater/setup.py +++ b/src/mission_control_updater/setup.py @@ -14,7 +14,7 @@ zip_safe=True, maintainer="trickfire", maintainer_email="tfrbtcs@uw.edu", - description="TODO: Package description", + description="Sends rover telemetry to Mission Control", license="Apache-2.0", entry_points={ "console_scripts": ["mission_control_updater = mission_control_updater.updater:main"], diff --git a/src/viator_launch/package.xml b/src/viator_launch/package.xml index 3f6f57d..c81941f 100644 --- a/src/viator_launch/package.xml +++ b/src/viator_launch/package.xml @@ -3,7 +3,7 @@ viator_launch 0.0.0 - TODO: Package description + Launch files for starting the Viator rover trickfire Apache-2.0 diff --git a/src/viator_launch/setup.py b/src/viator_launch/setup.py index 31f3e4c..ee0f2bf 100644 --- a/src/viator_launch/setup.py +++ b/src/viator_launch/setup.py @@ -19,6 +19,6 @@ zip_safe=True, maintainer="trickfire", maintainer_email="tfrbtcs@uw.edu", - description="TODO: Package description", + description="Launch files for starting the Viator rover", license="Apache-2.0", ) From f2ef42bf95dd6da3be7dede023e23efc6f4bbbbb Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Wed, 7 Oct 2026 21:37:16 +0000 Subject: [PATCH 18/21] fix: remove stale old depend --- src/viator_launch/package.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/src/viator_launch/package.xml b/src/viator_launch/package.xml index c81941f..30107fd 100644 --- a/src/viator_launch/package.xml +++ b/src/viator_launch/package.xml @@ -13,7 +13,6 @@ mission_control_updater arm camera - example_node ament_python From 1ba68ccf644fe3d0c614eb65a7d5e11a8b485045 Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Fri, 9 Oct 2026 00:19:10 +0000 Subject: [PATCH 19/21] temp: switch to can0 for testing --- docs/launching.mdx | 2 +- scripts/setup-can-network.sh | 14 +++++++------- src/can_rmdx8/can_rmdx8/rmdx8_motor_manager.py | 2 +- src/viator_launch/launch/robot.launch.py | 2 +- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/docs/launching.mdx b/docs/launching.mdx index d058d1f..eeb3ecd 100644 --- a/docs/launching.mdx +++ b/docs/launching.mdx @@ -68,7 +68,7 @@ Back in the first terminal, bring the CAN interface up: make can-setup ``` -This loads the `can`/`can_raw`/`mttcan` kernel modules, brings `can1` up at a 1 Mbit bitrate, and sends enable + speed-mode commands to the drivebase motors (CAN IDs `0x155`-`0x15A`). You should see that traffic show up in the `candump` terminal. +This loads the `can`/`can_raw`/`mttcan` kernel modules, brings `can0` up at a 1 Mbit bitrate, and sends enable + speed-mode commands to the drivebase motors (CAN IDs `0x155`-`0x15A`). You should see that traffic show up in the `candump` terminal. ## Build and launch diff --git a/scripts/setup-can-network.sh b/scripts/setup-can-network.sh index aaebc33..d92dd9c 100755 --- a/scripts/setup-can-network.sh +++ b/scripts/setup-can-network.sh @@ -12,10 +12,10 @@ sudo modprobe can_raw sudo modprobe mttcan # Set up the CAN interface -sudo ip link set can1 down -sudo ip link set can1 type can bitrate 1000000 -sudo ip link set can1 up -echo "CAN interface can1 set up successfully." +sudo ip link set can0 down +sudo ip link set can0 type can bitrate 1000000 +sudo ip link set can0 up +echo "CAN interface can0 set up successfully." # Motor CAN IDs (hexadecimal) MOTOR_IDS=("155" "156" "157" "158" "159" "15A") @@ -23,15 +23,15 @@ MOTOR_IDS=("155" "156" "157" "158" "159" "15A") # Enable motors in speed mode for CAN_ID in "${MOTOR_IDS[@]}"; do echo "Sending clear command to CAN ID 0x$CAN_ID: $CLEAR_CMD" - sudo cansend can1 "$CAN_ID#$CLEAR_CMD" + sudo cansend can0 "$CAN_ID#$CLEAR_CMD" sleep 0.1 echo "Sending start command to CAN ID 0x$CAN_ID: $START_CMD" - sudo cansend can1 "$CAN_ID#$START_CMD" + sudo cansend can0 "$CAN_ID#$START_CMD" sleep 0.1 echo "Sending speed mode command to CAN ID 0x$CAN_ID: $SPEED_CMD" - sudo cansend can1 "$CAN_ID#$SPEED_CMD" + sudo cansend can0 "$CAN_ID#$SPEED_CMD" sleep 0.1 done diff --git a/src/can_rmdx8/can_rmdx8/rmdx8_motor_manager.py b/src/can_rmdx8/can_rmdx8/rmdx8_motor_manager.py index 76d087f..acf28fc 100644 --- a/src/can_rmdx8/can_rmdx8/rmdx8_motor_manager.py +++ b/src/can_rmdx8/can_rmdx8/rmdx8_motor_manager.py @@ -29,7 +29,7 @@ def __init__(self) -> None: super().__init__("can_rmdx8_node") self.get_logger().info(colorStr("Launching can_rmdx8 node", ColorCodes.BLUE_OK)) self._id_to_rmdx8_motor: dict[int, RMDx8Motor] = {} - self.driver = rmd.CanDriver("can1") + self.driver = rmd.CanDriver("can0") self._driver_lock = Lock() self._req_buffer: deque[tuple[int, String]] = deque(maxlen=1000) self._buffer_lock = Lock() diff --git a/src/viator_launch/launch/robot.launch.py b/src/viator_launch/launch/robot.launch.py index 3f2db40..ab8d1f3 100644 --- a/src/viator_launch/launch/robot.launch.py +++ b/src/viator_launch/launch/robot.launch.py @@ -9,7 +9,7 @@ can_moteus_node = Node(package="can_moteus", executable="can_moteus", name="can_moteus_node") drivebase_node = Node(package="drivebase", executable="drivebase", name="drivebase_node") -# Runs as root via sudo: opening the raw CAN socket for can1 needs CAP_NET_RAW/NET_ADMIN, +# Runs as root via sudo: opening the raw CAN socket for can0 needs CAP_NET_RAW/NET_ADMIN, # which the non-root trickfire user doesn't have (see .devcontainer/trickfire-can-sudoers). can_rmdx8_node = Node( package="can_rmdx8", From 9622e88ddc3aab4f5c80b8de0991dde3ec6f187d Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Mon, 12 Oct 2026 19:08:53 +0000 Subject: [PATCH 20/21] feat: improve setup-can output --- scripts/setup-can-network.sh | 43 ++++++++++++++++++++++++++++++------ 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/scripts/setup-can-network.sh b/scripts/setup-can-network.sh index d92dd9c..e863add 100755 --- a/scripts/setup-can-network.sh +++ b/scripts/setup-can-network.sh @@ -1,21 +1,35 @@ #!/bin/bash set -e +IFACE="${CAN_IFACE:-can0}" +BITRATE=1000000 + # Commands START_CMD="8800000000000000" CLEAR_CMD="9B00000000000000" SPEED_CMD="A200000000000000" +can_state() { + ip -details link show "$IFACE" | awk '/berr-counter/ {for (i = 1; i <= NF; i++) if ($i == "state") print $(i + 1)}' +} + +tx_packets() { + ip -s link show "$IFACE" | awk '/^ *TX:/ {getline; print $2}' +} + # Ensure driver dependencies are loaded sudo modprobe can sudo modprobe can_raw sudo modprobe mttcan # Set up the CAN interface -sudo ip link set can0 down -sudo ip link set can0 type can bitrate 1000000 -sudo ip link set can0 up -echo "CAN interface can0 set up successfully." +sudo ip link set "$IFACE" down +sudo ip link set "$IFACE" type can bitrate "$BITRATE" +sudo ip link set "$IFACE" up +echo "CAN interface $IFACE set up successfully." + +TX_BEFORE=$(tx_packets) +TX_BEFORE=${TX_BEFORE:-0} # Motor CAN IDs (hexadecimal) MOTOR_IDS=("155" "156" "157" "158" "159" "15A") @@ -23,16 +37,31 @@ MOTOR_IDS=("155" "156" "157" "158" "159" "15A") # Enable motors in speed mode for CAN_ID in "${MOTOR_IDS[@]}"; do echo "Sending clear command to CAN ID 0x$CAN_ID: $CLEAR_CMD" - sudo cansend can0 "$CAN_ID#$CLEAR_CMD" + sudo cansend "$IFACE" "$CAN_ID#$CLEAR_CMD" sleep 0.1 echo "Sending start command to CAN ID 0x$CAN_ID: $START_CMD" - sudo cansend can0 "$CAN_ID#$START_CMD" + sudo cansend "$IFACE" "$CAN_ID#$START_CMD" sleep 0.1 echo "Sending speed mode command to CAN ID 0x$CAN_ID: $SPEED_CMD" - sudo cansend can0 "$CAN_ID#$SPEED_CMD" + sudo cansend "$IFACE" "$CAN_ID#$SPEED_CMD" sleep 0.1 done +TX_AFTER=$(tx_packets) +TX_AFTER=${TX_AFTER:-0} +TX_SENT=$((TX_AFTER - TX_BEFORE)) +STATE=$(can_state) + +if [ "$STATE" = "BUS-OFF" ] || [ "$TX_SENT" -eq 0 ]; then + echo "ERROR: $IFACE transmitted $TX_SENT frames and is in state ${STATE:-UNKNOWN}." >&2 + echo "Nothing reached the bus, so candump will show nothing." >&2 + echo "Check transceiver power and its standby pin, 120 ohm termination, CANH/CANL" >&2 + echo "orientation, and that the motors are powered and set to $BITRATE bit/s." >&2 + echo "Details: ip -details -statistics link show $IFACE" >&2 + exit 1 +fi + echo "Speed setup commands sent to CAN IDs 21-26 (hex 0x15-0x1A)." +echo "$TX_SENT frames confirmed transmitted on $IFACE (state: $STATE)." From 73c57caad2872c6f203955594dbb07dfc3eeadaf Mon Sep 17 00:00:00 2001 From: Matej Stastny Date: Mon, 12 Oct 2026 21:04:27 +0000 Subject: [PATCH 21/21] fix: drivebase was root only :( --- .devcontainer/Dockerfile | 10 +++++----- .devcontainer/trickfire-can-sudoers | 3 +-- src/viator_launch/launch/robot.launch.py | 13 +++++-------- 3 files changed, 11 insertions(+), 15 deletions(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index fef90e2..368057d 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -61,11 +61,11 @@ RUN useradd trickfire --shell /bin/bash --create-home --no-log-init -G video,sud && touch /home/trickfire/.sudo_as_admin_successful \ && chown trickfire:trickfire /home/trickfire/.sudo_as_admin_successful -# trickfire is non-root, but SocketCAN raw sockets (candump/cansend and the RMD-X8 -# node's CanDriver) need CAP_NET_RAW/CAP_NET_ADMIN, which a non-root exec doesn't get -# just from the container's `cap_add`/`privileged` settings. Grant NOPASSWD sudo for -# only the specific CAN tooling and the built can_rmdx8 node so this works without an -# interactive password, without handing trickfire unrestricted root. +# Bringing the CAN link up needs CAP_NET_ADMIN, which non-root trickfire doesn't get just +# from the container's `privileged` setting, so grant NOPASSWD sudo for the CAN tooling +# that setup-can-network.sh drives. The can_rmdx8 node is deliberately NOT listed here: it +# has to run as trickfire like the rest of the ROS graph or cross-user FastDDS shared +# memory drops its traffic, and an AF_CAN raw socket needs no capability to open. COPY .devcontainer/trickfire-can-sudoers /etc/sudoers.d/trickfire-can RUN chmod 0440 /etc/sudoers.d/trickfire-can && visudo -cf /etc/sudoers.d/trickfire-can diff --git a/.devcontainer/trickfire-can-sudoers b/.devcontainer/trickfire-can-sudoers index 433d106..06562fd 100644 --- a/.devcontainer/trickfire-can-sudoers +++ b/.devcontainer/trickfire-can-sudoers @@ -1,2 +1 @@ -Defaults env_keep+="PYTHONPATH AMENT_PREFIX_PATH" -trickfire ALL=(root) NOPASSWD: /usr/sbin/ip, /usr/sbin/modprobe, /usr/bin/candump, /usr/bin/cansend, /usr/bin/cangen, /usr/bin/cansniffer, /home/trickfire/viator/install/can_rmdx8/lib/can_rmdx8/can_rmdx8 +trickfire ALL=(root) NOPASSWD: /usr/sbin/ip, /usr/sbin/modprobe, /usr/bin/candump, /usr/bin/cansend, /usr/bin/cangen, /usr/bin/cansniffer diff --git a/src/viator_launch/launch/robot.launch.py b/src/viator_launch/launch/robot.launch.py index ab8d1f3..017b0ac 100644 --- a/src/viator_launch/launch/robot.launch.py +++ b/src/viator_launch/launch/robot.launch.py @@ -9,14 +9,11 @@ can_moteus_node = Node(package="can_moteus", executable="can_moteus", name="can_moteus_node") drivebase_node = Node(package="drivebase", executable="drivebase", name="drivebase_node") -# Runs as root via sudo: opening the raw CAN socket for can0 needs CAP_NET_RAW/NET_ADMIN, -# which the non-root trickfire user doesn't have (see .devcontainer/trickfire-can-sudoers). -can_rmdx8_node = Node( - package="can_rmdx8", - executable="can_rmdx8", - name="can_rmdx8_node", - prefix="sudo -n --", -) +# must stay non-root like every other node here: FastDDS falls back to shared memory for +# same-host traffic and those /dev/shm segments are 0644, so a root node and a trickfire +# node discover each other but silently exchange no data. AF_CAN raw sockets don't need +# CAP_NET_RAW anyway (unlike AF_INET), only bringing the link up does +can_rmdx8_node = Node(package="can_rmdx8", executable="can_rmdx8", name="can_rmdx8_node") mission_control_updater_node = Node( package="mission_control_updater",