Skip to content

Cardinal-Space-Mining/lance-2025

Repository files navigation

LANCE-2025

This repo houses all client and robot code used for running LANCE "1.5" (2025). If setting up from scratch, you will want to read this entire document. For instructions on building/running, see the relevant sections: BUILDING | RUNNING.

Workspace Setup

Create a new workspace directory

mkdir ws && cd ws

Clone this branch into the src directory.

git clone --recurse-submodules -b robot https://github.com/Cardinal-Space-Mining/lance-2025 src

If you forgot to clone recursively:

git submodule update --init --recursive

Dependencies

  1. Install ROS2 if not already done (we are using Jazzy for 2024-2025).

  2. Use rosdep to install dependencies.

    • Initialize rosdep if not already done:
      sudo rosdep init
    • Update and install:
      rosdep update
      rosdep install --ignore-src --from-paths . -r -y
  3. Install submodule dependencies.

    • Cardinal-Perception: Install PCL and OpenCV
      sudo apt update
      sudo apt-get install libpcl-dev libopencv-dev
    • Motor-control: Install CTRE Phoenix 6
      YEAR=2025
      sudo curl -s --compressed -o /usr/share/keyrings/ctr-pubkey.gpg "https://deb.ctr-electronics.com/ctr-pubkey.gpg"
      sudo curl -s --compressed -o /etc/apt/sources.list.d/ctr${YEAR}.list "https://deb.ctr-electronics.com/ctr${YEAR}.list"
      sudo apt update
      sudo apt install phoenix6

Building

The included build script builds all included packages. Run the following when inside the top-level workspace directory (same for client AND robot):

./src/build.sh
source install/setup.bash

The "frappepanda" [lattepanda] needs minimal packages to run, so to speed up build times, use the following argument:

./src/build.sh --frappe-only
source install/setup.bash

Running

Each target platform/machine has it's own script:

1. Client Laptop

Run:

./src/run_client.sh

If foxglove-bridge and robot-state-publisher are to be run on the robot, use:

./src/run_local.sh --remote-bridge

2. "Mochapanda"

Run:

./src/run_mocha.sh --client-bridge <perception={true/false}> <lidar-logging={true/false}>

To run foxglove-bridge and robot-state-publisher on the robot, remove the --client-bridge argument:

./src/run_mocha.sh <perception={true/false}> <lidar-logging={true/false}>

3. "Frappepanda"

Run:

./src/run_frappe.sh

Note that this runs a simplified script. If logging or other utility nodes need to be run (via script configuration parameters), run (this requires having built all packages):

./src/run_frappe.sh --full

Foxglove Studio

A foxglove studio layout configuration (foxglove_layout.json) is included which provides a main control dashboard as well as tabs for each perception stage and motor status info. This can be loaded by clicking the "LAYOUT" dropdown in the top right corner of foxglove studio, then clicking "Import from file..." and navigating to the json.

VSCode

The build script exports compile commands which can help VSCode's C/C++ extension resolve correct syntax highlighting. To ensure this is working, paste the following code into the c_cpp_properties.json file (under .vscode directory in a workspace):

{
    "configurations": [
        {
            "name": "Linux",
            "includePath": [
                "${workspaceFolder}/**"
            ],
            "defines": [],
            "compilerPath": "/usr/bin/gcc",
            "intelliSenseMode": "linux-gcc-x64",
            "cStandard": "c17",
            "cppStandard": "c++17",
            "compileCommands": [
                "build/compile_commands.json"
            ]
        }
    ],
    "version": 4
}

Last updated: 5/20/25

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •