Skip to content

Setup and Installation

Mohsin Mirza edited this page Mar 31, 2026 · 1 revision

Setup & Installation

Prerequisites

Requirement Version
Ubuntu 24.04
Python 3.12
ROS 2 Jazzy
Camera Intel RealSense or Kinova Vision

1. Clone the Repository

git clone git@github.com:Robots4Sustainability/perception.git
cd perception
git checkout feat/vision-pipeline

2. Python Environment

Create a virtual environment in the root folder:

python3 -m venv venv
source venv/bin/activate

Install dependencies:

pip install -r requirements.txt

3. ROS 2 Workspace Setup

Follow the Robots4Sustainability documentation to set up:

  • eddie_ros
  • kinova_vision
  • ROS 2 workspace

Then install the required ROS 2 image pipeline package:

sudo apt update
sudo apt install ros-jazzy-image-pipeline

4. Build the Workspace

cd r4s
colcon build --symlink-install
source install/setup.bash

5. Zenoh Middleware (for Kinova arm)

The Kinova arm requires the Zenoh RMW implementation. Set this up once:

sudo apt install ros-jazzy-rmw-zenoh-cpp
 
# Kill any existing ROS daemon
pkill -9 -f ros && ros2 daemon stop

Install the Zenoh router, then source ROS:

source /opt/ros/jazzy/setup.bash

⚠️ Important: Export RMW_IMPLEMENTATION=rmw_zenoh_cpp in every terminal when using the Kinova arm.


6. Connecting a Remote PC/Laptop

To bridge topics between the workstation and a local laptop:

# Workstation Terminal
ros2 run rmw_zenoh_cpp rmw_zenohd
 
# Local PC Terminal (replace IP with workstation IP)
export ZENOH_CONFIG_OVERRIDE='connect/endpoints=["tcp/192.168.1.11:7447"]'
ros2 run rmw_zenoh_cpp rmw_zenohd

Node Lifecycle Debug Commands

# Check the state of all lifecycle nodes at once
for node in $(ros2 lifecycle nodes); do echo -n "$node: "; ros2 lifecycle get $node; done
 
# Manually control a single node
ros2 lifecycle set /subdoor_node activate
ros2 lifecycle get /subdoor_node

Valid transitions: configure · activate · deactivate · cleanup

Clone this wiki locally