Installation

The CRM system is built on ROS2 Jazzy. You can either use Ubuntu 24.04 and install ROS2 Jazzy (for the best use) or use our docker setup for containerized development on common Linux distributions or WSL.

Note

The docker image currently does not work for Apple Silicon.

Note

The docker image currently does not work on Windows but works with WSL2.

Workspace Setup

The structure of our workspace is as follows where we set up the src directory with our crm_core git repository and the build, install and log directories are generated using the colcon build tool.

crm_ws [project]
├── build
├── install
├── log
└── src
    └── crm_core [git repository]
        ├── .devcontainer
        │   └── devcontainer.json
        ├── docker-compose.yml
        ├── Dockerfile
        └── other packages & folders
  • build/: Holds intermediate build files

  • install/: Contains final installed files, libraries, and executables

  • log/: Stores log files for debugging

  • src/: Contains our ROS2 packages and resources

    • .devcontainer/devcontainer.json : Configuration for VS Code containerized development

    • docker-compose.yml : Defines multi-container Docker applications

    • Dockerfile : Specifies the Docker image build instructions used by devcontainer.json and the docker-compose.yml files

    • other packages & folders : Refer to the Hardware and Software documentation

To setup the workspace:

mkdir -p crm_ws/src
cd crm_ws/src
git clone https://github.com/CRM-Suite/crm_core.git

And now to build the workspace, if you have Ubuntu 24.04 with ROS2 Jazzy installed then continue with the Native Installation otherwise skip to the Docker Installation.

Important

In each terminal make sure source the underlay i.e. source /opt/ros/jazzy/setup.bash. This is so the terminal has the paths to the ros2 and colcon commands. This command can be placed in the .bashrc file so it is sourced automatically on terminal startup.

Native Installation

Assuming that you’ve set up the workspace using the instructions above. To build and use the packages:

  1. Install dependencies using rosdep:

    cd crm_ws
    sudo rosdep init  # Skip this step if you have already initialized rosdep before
    sudo cp src/crm_core/CRM_rosdep.list /etc/ros/rosdep/sources.list.d/19-CRM.list 
    rosdep update
    rosdep install --from-paths src --ignore-src -r -y
    
  2. Build the workspace:

    colcon build
    
  3. Source the setup file:

    source install/setup.bash
    

    Great, now you can head over to startup to see if you can simulate the robots.

Docker Installation

To setup the workspace:

mkdir -p crm_ws/src
cd crm_ws/src
git clone https://github.com/CRM-Suite/crm_core.git

Install docker and docker compose:

Two options are available for Docker-based development:

  1. VS Code with Remote - Containers extension:

    • Install VS Code and the Remote - Containers extension

    • Open the crm_core repository (the parents of crm_core structured like instructed above)

    • Type “Rebuild and Reopen in container” in the Command Pallete by using the keyboard shortcut ctrl+shift+p

    • VS Code will build the Docker image and start the container

    • Open a new terminal to get started

    • Warning

      bash: /crm_ws/install/setup.bash: No such file or directory if you see this message it is most likely because you haven’t built the workspace

    Now, to build the workspace:

    • Change directory to crm_ws

    • Run colcon build

  2. Docker Compose:

    • In the terminal, navigate to the crm_core directory

    • Run the following to build the container:

    docker compose up -d
    
    • To enter the container in every terminal you can use:

    docker compose exec crm_core bash
    

Type rviz2 in the terminal and a window should appear. If it does you are all set and you can head over to startup to see if you can simulate the robots.