diff --git a/.github/copilot-code-review-instructions.md b/.github/copilot-code-review-instructions.md deleted file mode 100644 index 1ddb7294..00000000 --- a/.github/copilot-code-review-instructions.md +++ /dev/null @@ -1,106 +0,0 @@ -# Copilot Code Review Instructions - -This is a Docusaurus 3 documentation site for Fictionlab robotics products -(Leo Rover, Raph Rover). Content is written in MDXv3. - -## MDX File Rules - -### Required Frontmatter - -Every `.mdx` file (except `_`-prefixed files and files in `docs/guidelines/`) -must include all of these frontmatter fields: - -- `title` — Full page title for SEO -- `sidebar_label` — Short label for sidebar navigation -- `keywords` — Array of 4–5 keywords -- `description` — Up to 160 characters; use `>-` YAML scalar for multiline - values to avoid Prettier issues with special characters like colons -- `image` — Path to a social/meta image (e.g. `/img/robots/leo/...`) - -Flag any `.mdx` file missing these fields (unless the filename starts with `_` -or the file is inside `docs/guidelines/`). - -### File Naming - -- All documentation files must use `.mdx` extension. -- File names must be **lowercase with dashes** — no underscores, no spaces - (e.g. `intel-realsense.mdx`, not `Intel_RealSense.mdx`). -- Image file names must also be lowercase with dashes, and be descriptive — - never use auto-generated names like `323d2324.webp`. - -### Images - -- Images must use **only** `ImageZoom` or `ThemedImageZoom` components. -- Flag any raw markdown images (`![alt](url)`) or HTML `` tags. -- Images should be in `.webp` format (quality 80, lossy). `.svg` is acceptable - for diagrams and icons. -- Images must be stored under `static/img/` in the appropriate subdirectory - (e.g. `static/img/robots/leo/integrations//`). -- Themed images (light/dark variants) must use `-light` and `-dark` suffixes - (e.g. `diagram-light.webp`, `diagram-dark.webp`) and have matching - dimensions. - -### Components - -- `ImageZoom` and `LinkButton` are globally registered — they do NOT need - imports. Flag unnecessary imports of these two components. -- All other components require explicit imports: - `ThemedImageZoom`, `FlexTable`, `FlexTableItem`, `FusionEmbed`, `HiddenTabs`, - `ProductPreview`, `CenterContent`. -- Product partials are imported from `@site/src/products/` (e.g. - `import Product from "@site/src/products/powerbox.mdx"`). - -## Formatting Styles - -Verify that inline formatting follows these conventions: - -| Type | Style | Example | -| -------------------------- | -------- | ---------------------------------------- | -| Click/press command | **bold** | click **yes** to proceed | -| Choose from options | `code` | Choose `Xorg` session | -| Type/enter text | `code` | type `pi` for the username | -| External software mentions | link | uses [NetworkManager](url) to manage... | -| Tool names (SSH, CLI) | `code` | use the `rosmsg` tool | -| Directories/paths | **bold** | files inside **/home/pi** directory | -| Versions | `code` | install the `full` version | -| File names | `code` | modify the `hostapd.conf` file | -| Field/parameter names | `code` | set the `ssid` field | -| Keyboard shortcuts | **bold** | press **Ctrl+O** then **Enter** | -| ROS topics | `code` | see the `/battery` topic | -| Service names | `code` | stop the `leo` service | -| Variables | `code` | set `START_ROSCORE` to `true` | - -## Empty Sections - -Do not leave sections empty. If a section is unfinished, it must contain a -`{/* TODO */}` comment and a visible `_Work in progress_` note for readers. - -## Redirects - -When a file is renamed or moved, check that a corresponding redirect rule exists -in `static/_redirects` (Cloudflare format: `old-path new-path 301`). - -## Versioning - -- Current docs live in `docs/`. Older versions in `*_versioned_docs/`. -- Leo Rover: current = 1.9, versioned = 1.8. -- Integrations: current, versioned = noetic. -- Edits must target the correct version directory. - -## Spelling - -If a PR introduces technical terms (ROS topics, product names, etc.) that would -be flagged by CSpell, ensure they are added to the `words` array in -`cspell.json`. - -## Integration & Addon Pages - -New integration or addon pages should follow the structure defined in the -templates: - -- `docs/integrations/_integration.template.mdx` -- `docs/guidelines/templates/addon-template.mdx` - -Expected sections for integration pages: hero image, description, "What to -expect?", "Prerequisites", "Hardware integration" (Mounting, Wiring), "Software -integration", "Example usage", "What's next?". diff --git a/AGENTS.md b/.github/copilot-instructions.md similarity index 53% rename from AGENTS.md rename to .github/copilot-instructions.md index d2f7d511..13d3da1d 100644 --- a/AGENTS.md +++ b/.github/copilot-instructions.md @@ -22,89 +22,6 @@ in **MDXv3**. | `static/_redirects` | Cloudflare-style redirect rules | | `scripts/` | Validation scripts (frontmatter-check, redirects-check, generate-docs-tree) | -## Content Authoring Rules - -### File Conventions - -- All documentation files use `.mdx` extension. -- File names: **lowercase, dashes instead of underscores** (e.g. - `intel-realsense.mdx`). -- Files prefixed with `_` (e.g. `_integration.template.mdx`) are excluded from - builds and frontmatter checks. -- Each documentation section uses `_category_.json` for sidebar category - metadata. - -### Frontmatter (Required) - -Every `.mdx` file (except `_`-prefixed and `guidelines/`) **must** include: - -```yaml ---- -title: Full page title for SEO -sidebar_label: Short sidebar label -keywords: - - keyword1 - - keyword2 - - keyword3 - - keyword4 -description: >- - Up to 160 characters. Use >- scalar for multiline to avoid Prettier issues. -image: /img/robots/leo/integrations/example/image.webp ---- -``` - -Optional fields: `id`, `sidebar_position`, `slug`, `unlisted`, -`toc_max_heading_level`. - -Validation: `yarn check:frontmatter` enforces the required keys in CI. - -### Images - -- Use **only** `ImageZoom` or `ThemedImageZoom` components — never raw markdown - images or HTML `` tags. -- Store images in `static/img/` following the existing directory structure - (e.g. `static/img/robots/leo/integrations//`). -- Prefer `.webp` format for raster images, `.svg` for diagrams and icons. - -### Components Available in MDX - -Globally registered (no import needed): `LinkButton`, `ImageZoom`. - -Other components require explicit import: - -```mdx -import ThemedImageZoom from "@site/src/components/ThemedImageZoom"; -import FlexTable from "@site/src/components/FlexTable"; -import FlexTableItem from "@site/src/components/FlexTableItem"; -import FusionEmbed from "@site/src/components/FusionEmbed"; -import HiddenTabs from "@site/src/components/HiddenTabs"; -import ProductPreview from "@site/src/components/ProductPreview"; -import CenterContent from "@site/src/components/CenterContent"; -``` - -Product partials are imported from `src/products/`: - -```mdx -import Product from "@site/src/products/powerbox.mdx"; -``` - -### Templates - -When creating new pages, follow existing templates: - -- **Integration pages:** - `docs/integrations/_integration.template.mdx` -- **Addon pages:** - `docs/guidelines/templates/addon-template.mdx` - -Full style guide: https://docs.fictionlab.pl/guidelines - -### Redirects - -When renaming or moving a page, add a redirect rule to `static/_redirects` -(Cloudflare format: `old-path new-path 301`). The `yarn check:redirects` script -validates redirect coverage on PRs. - ## Build & Development | Command | Purpose | @@ -138,22 +55,11 @@ All PRs to `development` and `production` run: `development` - PRs require review from `@Krzemien97` or `@bjsowa` (see `CODEOWNERS`) -## Versioning - -The site uses Docusaurus versioning for two doc plugins: - -- **Leo Rover**: current (1.9) + versioned 1.8 - (`leo-rover_versioned_docs/version-1.8/`) -- **Integrations**: current + versioned noetic - (`integrations_versioned_docs/version-noetic/`) - -When editing versioned content, apply changes to the correct version directory. -Current version lives in `docs/`, older versions in `*_versioned_docs/`. - -## Spelling +## Images -CSpell is configured in `cspell.json`. If a technical term (ROS topic, product -name, etc.) is flagged as unknown, add it to the `words` array in `cspell.json`. +- Store images under `static/img/` in the appropriate subdirectory (e.g. `static/img/robots/leo/integrations//`). +- Prefer `.webp` format for raster images (quality 80, lossy); `.svg` is acceptable for diagrams and icons. +- Image file names must be **lowercase with dashes** and descriptive — never auto-generated names like `323d2324.webp`. ## Code Style diff --git a/.github/instructions/markdown.instructions.md b/.github/instructions/markdown.instructions.md new file mode 100644 index 00000000..389ead41 --- /dev/null +++ b/.github/instructions/markdown.instructions.md @@ -0,0 +1,134 @@ +--- +applyTo: "**/*.mdx" +--- + +# MDX Authoring & Review Guidelines + +## File Conventions + +- File names: **lowercase, dashes** — no underscores, no spaces (e.g. `intel-realsense.mdx`). +- Integration pages (under `docs/integrations/`) must follow `[manufacturer]-[model].mdx` (e.g. `intel-realsense-d435.mdx`, `sick-tim571.mdx`). +- Files prefixed with `_` (e.g. `_integration.template.mdx`) are excluded from builds and frontmatter checks. +- Image file names must be lowercase-with-dashes and descriptive — never auto-generated names like `323d2324.webp`. +- Each documentation section uses `_category_.json` for sidebar category metadata. + +## Frontmatter + +Every `.mdx` file (except `_`-prefixed and `docs/guidelines/`) **must** include: + +```yaml +--- +title: Full page title for SEO +sidebar_label: Short sidebar label +description: >- + Up to 160 characters. Use >- scalar for multiline to avoid Prettier issues. +image: /img/robots/leo/integrations/example/image.webp +--- +``` + +Optional fields: `id`, `sidebar_position`, `slug`, `unlisted`, `toc_max_heading_level`. + +Validated by `yarn check:frontmatter` in CI. + +## Images + +- Use **only** `ImageZoom` or `ThemedImageZoom` components — never raw markdown images (`![alt](url)`) or HTML `` tags. +- `ImageZoom` is globally registered (no import needed). `ThemedImageZoom` requires an explicit import. +- Themed image pairs must use `-light` / `-dark` suffixes (e.g. `diagram-light.webp`, `diagram-dark.webp`) and have matching dimensions. + +Usage: + +```mdx + +``` + +`width` and `height` are required — `ImageZoom` throws an error if either is missing. + +```mdx +import ThemedImageZoom from "@site/src/components/ThemedImageZoom"; + + +``` + +## Components + +Globally registered (no import needed): `LinkButton`, `ImageZoom`. + +Other components require explicit import: + +```mdx +import ThemedImageZoom from "@site/src/components/ThemedImageZoom"; +import FlexTable from "@site/src/components/FlexTable"; +import FlexTableItem from "@site/src/components/FlexTableItem"; +import FusionEmbed from "@site/src/components/FusionEmbed"; +import HiddenTabs from "@site/src/components/HiddenTabs"; +import ProductPreview from "@site/src/components/ProductPreview"; +import CenterContent from "@site/src/components/CenterContent"; +``` + +Product partials: `import Product from "@site/src/products/powerbox.mdx"`. + +## Inline Formatting + +| Type | Style | Example | +| -------------------------- | -------- | --------------------------------------- | +| Click/press command | **bold** | click **yes** to proceed | +| Choose from options | `code` | Choose `Xorg` session | +| Type/enter text | `code` | type `pi` for the username | +| External software mentions | link | uses [NetworkManager](url) to manage... | +| Tool names (SSH, CLI) | `code` | use the `rosmsg` tool | +| Directories/paths | **bold** | files inside **/home/pi** directory | +| Versions | `code` | install the `full` version | +| File names | `code` | modify the `hostapd.conf` file | +| Field/parameter names | `code` | set the `ssid` field | +| Keyboard shortcuts | **bold** | press **Ctrl+O** then **Enter** | +| ROS topics | `code` | see the `/battery` topic | +| Service names | `code` | stop the `leo` service | +| Variables | `code` | set `START_ROSCORE` to `true` | + +## Empty Sections + +Do not leave sections empty. If a section is unfinished, it must contain a `{/* TODO */}` comment and a visible `_Work in progress_` note for readers. + +## Redirects + +When renaming or moving a page, add a redirect rule to `static/_redirects` (Cloudflare format: `old-path new-path 301`). Validated by `yarn check:redirects` in CI. + +## Versioning + +- Current docs in `docs/`, older versions in `*_versioned_docs/`. +- Leo Rover: current = 1.9, versioned = 1.8 (`leo-rover_versioned_docs/version-1.8/`). +- Integrations: current, versioned = noetic (`integrations_versioned_docs/version-noetic/`). +- Edits must target the correct version directory. + +## Spelling + +New technical terms (ROS topics, product names, etc.) must be added to the `words` array in `cspell.json`. Validated by `yarn check:spelling` in CI. + +## Templates + +When creating new pages, follow the existing templates: + +- Integration pages: `docs/integrations/_integration.template.mdx` +- Addon pages: `docs/guidelines/templates/addon-template.mdx` + +Expected sections for integration pages: hero image, description, "What to expect?", "Prerequisites", "Hardware integration" (Mounting, Wiring), "Software integration", "Example usage", "What's next?". + +Full style guide: https://docs.fictionlab.pl/guidelines + +## Code Review + +Any inconsistency with the rules in this file must be flagged as a code review comment. diff --git a/README.md b/README.md index 1ae77c96..62020b94 100644 --- a/README.md +++ b/README.md @@ -203,10 +203,10 @@ reviewers are: Follow these naming conventions for branches: -- `/feature/description` - for new features, components etc. -- `/content/description` - for markdown content updates -- `/fix/description` - for fixes -- `/chore/description` - for dependency updates +- `feat/description` - for new features, components etc. +- `content/description` - for markdown content updates +- `fix/description` - for fixes +- `chore/description` - for dependency updates ## Reporting Issues diff --git a/cspell.json b/cspell.json index f8d1a7bf..a7a304d1 100644 --- a/cspell.json +++ b/cspell.json @@ -71,6 +71,7 @@ "imager", "imbus", "interbotix", + "journalctl", "Kacper", "kaggle", "kbps", diff --git a/docs/integrations/packs/_category_.json b/docs/integrations/packs/_category_.json new file mode 100644 index 00000000..f454627f --- /dev/null +++ b/docs/integrations/packs/_category_.json @@ -0,0 +1,11 @@ +{ + "label": "Packs", + "position": 5, + "collapsible": true, + "collapsed": true, + "link": { + "type": "generated-index", + "title": "Full sets of hardware integrations", + "slug": "packs" + } +} diff --git a/docs/integrations/packs/vision-pack.mdx b/docs/integrations/packs/vision-pack.mdx new file mode 100644 index 00000000..1b383d13 --- /dev/null +++ b/docs/integrations/packs/vision-pack.mdx @@ -0,0 +1,657 @@ +--- +title: Vision Pack +sidebar_label: Vision Pack +keywords: + - Jetson + - Orin + - leo + - integration + - ZED +description: >- + Explore the steps to integrate the Vision Pack with your Leo Rover system + using the ZED camera and Jetson Orin Nano. +image: /img/robots/leo/integrations/vision-pack/leo-with-vision-pack-render.webp +--- + +import ThemedImageZoom from '@site/src/components/ThemedImageZoom'; +import useBaseUrl from '@docusaurus/useBaseUrl'; +import Product from '@site/src/products/vision-pack.mdx'; + + + +# Vision Pack Integration + +This tutorial will guide you through the process of connecting the Vision Pack +to your Leo Rover. The Vision Pack is a hardware bundle that includes a ZED +camera and a Jetson Orin Nano, designed to enhance the visual capabilities of +your Leo Rover. By following this tutorial, you will learn how to integrate +these components with your rover system, enabling advanced vision processing and +perception capabilities. + +## What to expect? + +After completing this tutorial, you will be able to run a Docker container with +ROS Jazzy and ZED wrapper on your Jetson Orin Nano, and have the camera data +published on ROS topics. + +To see full information about the additional available ROS interfaces and +configuration options, check the official +[ZED ROS wrapper documentation](https://www.stereolabs.com/docs/ros/zed-node). + +## Prerequisites + + + + + + + +### Referenced products + + + +## Setting up the Jetson Orin Nano + +:::info + +It is recommended to set up the Jetson before mounting it on the rover. In that +case you can use the Jetson with a regular monitor, keyboard and mouse, which +makes the setup process easier. + +::: + +In order to set up the Jetson Orin Nano, you will need to flash the official +NVIDIA image on it and update the firmware. Follow the steps below to complete +the setup: + +1. Go through the official + [Jetson Orin Nano setup guide](https://developer.nvidia.com/embedded/learn/get-started-jetson-orin-nano-devkit#intro). +2. During flashing, install JetPack **6.2.1** with L4T firmware at least + **36.4.0**. +3. Ensure the Jetson has internet access (either via Ethernet or Wi-Fi) before + proceeding. +4. Finish the initial setup and create a user account when prompted. +5. Ensure that your Jetson is running in `MAXN SUPER` mode for optimal + performance. + +:::tip + +You can find all the JetPack images in the +[JetPack Archive](https://developer.nvidia.com/embedded/jetpack-archive). + +::: + +After the initial setup is complete, install the latest packages and the NVIDIA +Container Toolkit runtime on the Jetson. Run the following commands directly on +the Jetson (either with an attached display or over SSH): + +```bash +sudo apt update && sudo apt upgrade +sudo apt install -y nvidia-container-toolkit +sudo nvidia-ctk runtime configure --runtime=docker +sudo systemctl restart docker +``` + +Now you can turn off Wi-Fi on Jetson since later on it will be connected to the +rover's network via ethernet. + +At this point you can proceed with the hardware integration and mounting the +Jetson on the rover. + +## Hardware integration + +The Vision Pack includes all necessary mounts, screws, and cables required to +install the **NVIDIA Jetson Orin Nano** and the **ZED2i** camera on your Leo +Rover. The pack has been designed to ensure a straightforward and robust +assembly process. + +### Mounting + +:::info + +Three Allen keys (sizes: **2.5, 3, and 4 mm**) are required for the mechanical +installation. Please note that these tools are **not included** in the kit. + +::: + +To assemble the pack, first insert the Jetson Orin Nano into the base mounts, +then secure the Jetson with the 3D-printed bracket using M3 x 8 bolts as shown +below. + + + +Install the ZED mount with M4 x 16 bolts. + + + +Place the Ethernet adapter in its mount and secure it with the 3D-printed holder +and M3 x 8 bolts. + + + +Mount the ZED2i camera using M3 x 8 bolts. + +:::note + +Make sure the camera is mounted square to the front of the rover. Proper +alignment is crucial for the default URDF values to correctly represent the +camera's position in the robot model. + +::: + + + +The assembled Vision Pack can be mounted on the Leo Rover using M5 x 10 bolts: + + + +--- + +### Wiring + +Proper cable management is essential to ensure reliable operation and prevent +hardware damage. Follow these steps to connect the Vision Pack electronics to +the Leo Rover: + +1. Connect the USB-C cable from the USB-Ethernet adapter to the rover's external + interface. Route the cable neatly, ensuring it is properly folded and safely + clear of the Jetson's cooling fan. +2. Replace the standard MEB-battery power cable with the included modified + version featuring a barrel jack connector. Plug the barrel jack directly into + the Jetson Orin Nano's power port. + + + +3. Link the Ethernet adapter to the Jetson Orin Nano using the provided Ethernet + patch cable. +4. Connect the ZED2i camera to one of the Jetson's USB-A ports. Secure the + connection using the camera's dedicated screw-in locking mechanism to prevent + accidental disconnection. + + + +Once all connections are secured and verified, enclose the setup by installing +the protective cover using M4 x 12 bolts. + +:::warning + +Take extra care during this step. Carefully inspect the perimeter of the cover +to ensure that no cables are pinched, crimped, or squeezed between the +mechanical components. + +::: + + + +Now the rover is ready for software integration. + +## Software integration + +In order to use the ZED camera with ROS, we will be using the official ZED ROS +wrapper in a custom Docker container running on the Jetson. + +Follow the steps below to bring the Vision Pack online and publish ZED data to +ROS. + +### Sharing Leo Rover network with the Jetson + +Since Jetson ethernet port is connected to the rover via a USB-to-Ethernet +adapter, a new ethernet interface is created and it needs to be configured to +bridge the rover's network to the connected device. + +To do that, log in to the Raspberry Pi via ssh (either from Jetson or from your +local machine) and open the Netplan configuration file that manages the ethernet +bridge: + +```bash +sudo nano /etc/netplan/10-eth-bridge.yaml +``` + +Add the `eth1` interface configuration to the `/etc/netplan/10-eth-bridge.yaml` +file. The final file should look like this: + +```yaml title="/etc/netplan/10-eth-bridge.yaml" +# Creates a bridge interface and adds ethernet interface to it. +network: + version: 2 + ethernets: + eth0: + renderer: networkd + optional: true + eth1: + renderer: networkd + optional: true + bridges: + br0: + renderer: networkd + interfaces: [eth0, eth1] + addresses: [10.0.0.1/24] + link-local: [] +``` + +Apply the new configuration: + +```bash +sudo netplan apply && sudo systemctl restart hostapd dnsmasq +``` + +Now your Jetson should receive an IP address in the `10.0.0.x` range and be +accessible from the rover network. + +:::tip + +In order to find the Jetson's IP address, you can use `nmap` from your local +machine connected to the Leo Rover network: + +```bash +sudo apt install -y nmap +nmap -sP 10.0.0.1/24 +``` + +::: + +### Creating ZED camera ROS configuration + +Before launching the ZED wrapper container, you need to create a configuration +file for the camera. This file will contain the parameters for the ZED camera +and will be mounted into the container to configure the ROS node. + +On Jetson, create folders for configs and logs on the host: + +```bash +sudo mkdir -p /opt/zed_ros/{config,logs} +sudo chown -R $USER /opt/zed_ros +``` + +Add a parameter file under `/opt/zed_ros/config`: + +```bash +sudo apt install -y nano +nano /opt/zed_ros/config/zed2i.yaml +``` + +And add the following content to the file: + +```yaml title="/opt/zed_ros/config/zed2i.yaml" +/**: + ros__parameters: + general: + camera_model: 'zed2i' + camera_name: 'zed2i' + grab_resolution: 'HD1080' + grab_frame_rate: 15 + video: + brightness: 4 + contrast: 4 + hue: 0 + depth: + min_depth: 0.01 + max_depth: 15.0 + pos_tracking: + publish_tf: false +``` + +:::note + +These are just example parameters - tune them as needed and refer to the +[ZED ROS wrapper documentation](https://www.stereolabs.com/docs/ros/zed-node) +for the full list of options. + +::: + +### Setting up the ZED wrapper container + +Pull the prebuilt image with ROS Jazzy and ZED wrapper from our registry onto +the Jetson (the process might take a long time depending on your internet +connection and writing speed of the SD card): + +```bash +sudo docker pull ghcr.io/fictionlab/jetson_ros_jazzy_zed:latest +``` + +:::note + +Ensure that your Jetson has internet access to pull the image. Further internet +access might be required on camera startup if the ZED wrapper needs to download +additional assets like calibration files or detection models. + +::: + +Start the ZED wrapper container whenever you need the camera online. This run +command exposes the GPU, host networking, and the ZED calibration assets to the +container: + +```bash +sudo docker run --rm --runtime nvidia -it --privileged --network=host --ipc=host --pid=host \ + -e NVIDIA_DRIVER_CAPABILITIES=all -e DISPLAY=$DISPLAY \ + -v /tmp/.X11-unix/:/tmp/.X11-unix \ + -v /dev:/dev \ + -v /dev/shm:/dev/shm \ + -v /usr/local/zed/resources/:/usr/local/zed/resources/ \ + -v /usr/local/zed/settings/:/usr/local/zed/settings/ \ + -v /opt/zed_ros/config:/data:ro \ + ghcr.io/fictionlab/jetson_ros_jazzy_zed:latest +``` + +Once you see the container shell prompt, source both the ROS installation and +the workspace overlay, then launch the wrapper for the `zed2i` camera using the +host configuration mounted at `/data/zed2i.yaml`: + +```bash +source /opt/ros/jazzy/setup.bash +source /root/ros2_ws/install/setup.bash +ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zed2i ros_params_override_path:=/data/zed2i.yaml +``` + +At this point the rover computer should see the ZED ROS interfaces. + +:::info + +When launching ZED for the first time it might need some time to initialize the +camera and generate the calibration files. Because of that, the topics might not +be available immediately. + +::: + +### Modifying the URDF to include the Vision Pack + +To ensure proper TF frames and integration with the rest of the rover system, +you will need to add the ZED camera to the URDF model of the rover. + +To do that log in to the Raspberry Pi and install the `zed_description` package +that contains the URDF macros for ZED cameras: + +```bash +sudo apt update +sudo apt install ros-${ROS_DISTRO}-zed-description +``` + +Then create new `xacro` macro for the vision pack in `/etc/ros/urdf` directory: + +```bash +nano /etc/ros/urdf/zed2i.urdf.xacro +``` + +And add the following content to the file: + +```xml title="/etc/ros/urdf/zed2i.urdf.xacro" + + + + + + + + + + + + + + + + +``` + +:::note + +If you have mounted the ZED camera in a different position or orientation than +the one specified in the hardware integration section, make sure to update the +`origin` tag in the joint definition accordingly. + +::: + +Now, open the main URDF file: + +```bash +nano /etc/ros/urdf/robot.urdf.xacro +``` + +And include the previously created file before the closing `` tag: + +```xml title="/etc/ros/urdf/robot.urdf.xacro" + +``` + +After saving both files, apply the updated robot description: + +```bash +ros-nodes-restart +``` + +You should now be able to see the ZED camera frames in the robot's TF tree. + +### (Optional) Launching the container on boot + +If you want the ZED camera to be available immediately after the Jetson boots +up, you can follow the steps below to set up a `systemd` service to run the +container and mount a host directory for configs and logs. + +:::note + +Perform these steps on the Jetson outside of the container. + +::: + +Create a new Docker Compose file for the ZED wrapper container in previously +created directory `/opt/zed_ros`: + +```bash +nano /opt/zed_ros/docker-compose.yml +``` + +Save the following content to the file (adjust environment overrides as needed): + +```yaml title="/opt/zed_ros/docker-compose.yml" +services: + zed-wrapper: + image: ghcr.io/fictionlab/jetson_ros_jazzy_zed:latest + container_name: zed-ros-wrapper + restart: unless-stopped + network_mode: host + ipc: host + privileged: true + runtime: nvidia + environment: + - RMW_IMPLEMENTATION=rmw_cyclonedds_cpp + - ROS_DOMAIN_ID=0 + volumes: + - /opt/zed_ros/config:/data:ro + - /opt/zed_ros/logs:/root/.ros/log + - /dev/bus/usb:/dev/bus/usb + - /etc/localtime:/etc/localtime:ro + command: > + ros2 launch zed_wrapper zed_camera.launch.py camera_model:=zed2i + ros_params_override_path:=/data/zed2i.yaml +``` + +Add the `systemd` unit `/etc/systemd/system/zed-ros-wrapper.service`: + +```bash +sudo nano /etc/systemd/system/zed-ros-wrapper.service +``` + +And add the following content to the file: + +```ini title="/etc/systemd/system/zed-ros-wrapper.service" +[Unit] +Description=ZED ROS 2 Wrapper container +After=network-online.target docker.service +Requires=docker.service + +[Service] +Type=exec +WorkingDirectory=/opt/zed_ros +ExecStart=/usr/bin/docker compose up --remove-orphans +ExecStop=/usr/bin/docker compose down +Restart=always +TimeoutStartSec=0 + +[Install] +WantedBy=multi-user.target +``` + +Enable and start the service: + +```bash +sudo systemctl enable --now zed-ros-wrapper +``` + +:::info + +You can use `journalctl -u zed-ros-wrapper -f` to follow the logs and ensure the +container starts correctly. + +To restart the container manually, use `sudo systemctl restart zed-ros-wrapper`. + +::: + +Now the ZED wrapper container will start automatically on boot, and you can +manage your configurations and logs easily from the host filesystem. + +## What's next? + +ZED camera can be used in projects involving +[autonomous navigation](/leo-rover/advanced-guides/autonomous-navigation). You +might be interested in a tutorial about it. + +You can also use the ZED camera for object detection using the +[ZED ROS wrapper's built-in detection capabilities](https://www.stereolabs.com/docs/ros/zed-node#object-detection). diff --git a/docs/leo-rover/guides/firmware-update.mdx b/docs/leo-rover/guides/firmware-update.mdx index 67b3ad9c..60c46a25 100644 --- a/docs/leo-rover/guides/firmware-update.mdx +++ b/docs/leo-rover/guides/firmware-update.mdx @@ -26,8 +26,11 @@ login to your Leo Rover: Make sure you are connected to the Internet: -and have the latest versions of the packages: ```bash sudo apt update && sudo -apt upgrade ``` +and have the latest versions of the packages: + +```bash +sudo apt update && sudo apt upgrade +``` And then, run the update script by typing: diff --git a/docs/raph-rover/documentation/ros-api.mdx b/docs/raph-rover/documentation/ros-api.mdx index 7a5d9973..4ed87983 100644 --- a/docs/raph-rover/documentation/ros-api.mdx +++ b/docs/raph-rover/documentation/ros-api.mdx @@ -24,11 +24,11 @@ image: /img/robots/raph/raph-rover.webp Steers the robot when operating in the Ackermann steering mode. -- `controller/cmd_led_panel` ([raph_interfaces/msg/LedStripState]) +- `controller/cmd_led_strip` ([raph_interfaces/msg/LedStripState]) Sets a new user state for all the LEDs in the LED strip. -- `controller/cmd_led_strip` ([raph_interfaces/msg/LedPanelState]) +- `controller/cmd_led_panel` ([raph_interfaces/msg/LedPanelState]) Sets a new user state for all the LEDs in the specified LED panel. diff --git a/scripts/frontmatter-check.js b/scripts/frontmatter-check.js index 1310981d..b3a9de6b 100644 --- a/scripts/frontmatter-check.js +++ b/scripts/frontmatter-check.js @@ -4,13 +4,7 @@ const glob = require('glob'); const matter = require('gray-matter'); // Define the keys that must be present in the front matter. -const REQUIRED_KEYS = [ - 'title', - 'sidebar_label', - 'keywords', - 'description', - 'image', -]; +const REQUIRED_KEYS = ['title', 'sidebar_label', 'description', 'image']; // Path to your MDX files. const DOCS_PATHS = ['docs/**/*.mdx', '*_versioned_docs/**/*.mdx']; diff --git a/src/products/vision-pack.mdx b/src/products/vision-pack.mdx new file mode 100644 index 00000000..60389600 --- /dev/null +++ b/src/products/vision-pack.mdx @@ -0,0 +1,12 @@ +import ProductPreview from '@site/src/components/ProductPreview'; + + diff --git a/static/img/robots/leo/integrations/vision-pack/leo-with-vision-pack-render.webp b/static/img/robots/leo/integrations/vision-pack/leo-with-vision-pack-render.webp new file mode 100644 index 00000000..c3b37634 Binary files /dev/null and b/static/img/robots/leo/integrations/vision-pack/leo-with-vision-pack-render.webp differ diff --git a/static/img/robots/leo/vision-pack/vision_pack_step1_black.webp b/static/img/robots/leo/vision-pack/vision_pack_step1_black.webp new file mode 100644 index 00000000..ffd0802c Binary files /dev/null and b/static/img/robots/leo/vision-pack/vision_pack_step1_black.webp differ diff --git a/static/img/robots/leo/vision-pack/vision_pack_step1_white.webp b/static/img/robots/leo/vision-pack/vision_pack_step1_white.webp new file mode 100644 index 00000000..ee7a1ec3 Binary files /dev/null and b/static/img/robots/leo/vision-pack/vision_pack_step1_white.webp differ diff --git a/static/img/robots/leo/vision-pack/vision_pack_step2_black.webp b/static/img/robots/leo/vision-pack/vision_pack_step2_black.webp new file mode 100644 index 00000000..b3e50db4 Binary files /dev/null and b/static/img/robots/leo/vision-pack/vision_pack_step2_black.webp differ diff --git a/static/img/robots/leo/vision-pack/vision_pack_step2_white.webp b/static/img/robots/leo/vision-pack/vision_pack_step2_white.webp new file mode 100644 index 00000000..3c9659af Binary files /dev/null and b/static/img/robots/leo/vision-pack/vision_pack_step2_white.webp differ diff --git a/static/img/robots/leo/vision-pack/vision_pack_step3_black.webp b/static/img/robots/leo/vision-pack/vision_pack_step3_black.webp new file mode 100644 index 00000000..c0fa1f6d Binary files /dev/null and b/static/img/robots/leo/vision-pack/vision_pack_step3_black.webp differ diff --git a/static/img/robots/leo/vision-pack/vision_pack_step3_white.webp b/static/img/robots/leo/vision-pack/vision_pack_step3_white.webp new file mode 100644 index 00000000..e1e3e1d5 Binary files /dev/null and b/static/img/robots/leo/vision-pack/vision_pack_step3_white.webp differ diff --git a/static/img/robots/leo/vision-pack/vision_pack_step4_black.webp b/static/img/robots/leo/vision-pack/vision_pack_step4_black.webp new file mode 100644 index 00000000..f6ef1fb7 Binary files /dev/null and b/static/img/robots/leo/vision-pack/vision_pack_step4_black.webp differ diff --git a/static/img/robots/leo/vision-pack/vision_pack_step4_white.webp b/static/img/robots/leo/vision-pack/vision_pack_step4_white.webp new file mode 100644 index 00000000..5ab49d38 Binary files /dev/null and b/static/img/robots/leo/vision-pack/vision_pack_step4_white.webp differ diff --git a/static/img/robots/leo/vision-pack/vision_pack_step5_black.webp b/static/img/robots/leo/vision-pack/vision_pack_step5_black.webp new file mode 100644 index 00000000..a4cb1cff Binary files /dev/null and b/static/img/robots/leo/vision-pack/vision_pack_step5_black.webp differ diff --git a/static/img/robots/leo/vision-pack/vision_pack_step5_white.webp b/static/img/robots/leo/vision-pack/vision_pack_step5_white.webp new file mode 100644 index 00000000..83ade271 Binary files /dev/null and b/static/img/robots/leo/vision-pack/vision_pack_step5_white.webp differ diff --git a/static/img/robots/leo/vision-pack/vision_pack_step6_black.webp b/static/img/robots/leo/vision-pack/vision_pack_step6_black.webp new file mode 100644 index 00000000..e8613af4 Binary files /dev/null and b/static/img/robots/leo/vision-pack/vision_pack_step6_black.webp differ diff --git a/static/img/robots/leo/vision-pack/vision_pack_step6_white.webp b/static/img/robots/leo/vision-pack/vision_pack_step6_white.webp new file mode 100644 index 00000000..022b5732 Binary files /dev/null and b/static/img/robots/leo/vision-pack/vision_pack_step6_white.webp differ diff --git a/static/img/robots/leo/vision-pack/vision_pack_step7_black.webp b/static/img/robots/leo/vision-pack/vision_pack_step7_black.webp new file mode 100644 index 00000000..c9b00558 Binary files /dev/null and b/static/img/robots/leo/vision-pack/vision_pack_step7_black.webp differ diff --git a/static/img/robots/leo/vision-pack/vision_pack_step7_white.webp b/static/img/robots/leo/vision-pack/vision_pack_step7_white.webp new file mode 100644 index 00000000..378a5d13 Binary files /dev/null and b/static/img/robots/leo/vision-pack/vision_pack_step7_white.webp differ diff --git a/static/img/robots/leo/vision-pack/vision_pack_step8_black.webp b/static/img/robots/leo/vision-pack/vision_pack_step8_black.webp new file mode 100644 index 00000000..da00fded Binary files /dev/null and b/static/img/robots/leo/vision-pack/vision_pack_step8_black.webp differ diff --git a/static/img/robots/leo/vision-pack/vision_pack_step8_white.webp b/static/img/robots/leo/vision-pack/vision_pack_step8_white.webp new file mode 100644 index 00000000..c7cf4dc3 Binary files /dev/null and b/static/img/robots/leo/vision-pack/vision_pack_step8_white.webp differ