Running Your Planner in the Lab

Once your planner works in simulation (Your First Motion Planner), you can run it with the muCars. This page explains how your code gets to the lab and what to prepare. The experiment itself is described in Experiments with Real Vehicles.

Photo of a CPM Lab with the track, the muCars, the camera and the central workstation

A CPM Lab: the track with the muCars, the IPS camera above it and the central workstation

Getting Access

Access to a CPM Lab is managed by its staff (see About for the instances). Ask your supervisor for

  • an introduction to the lab and its rules (below),

  • a time slot, because only one experiment can run at a time,

  • access to the lab network: computers have to be registered by the staff before they can join (MAC address filtering, see Network),

  • an account on the central workstation, if you run your planner there.

Where Your Planner Runs

The lab runs on the central workstation (192.168.1.249). Your planner runs in the planner domain and can run on

  • the central workstation: copy or clone your workspace into your account there, build it and start it as external planner (External Motion Planner) or select it in the Control Center. This is the most reliable option.

  • your own computer in the lab network: Ubuntu 24.04 with ROS2 Jazzy, natively or in a VM with bridged network (see Student Setup). Docker on macOS cannot reach the lab network.

Either way, the planner uses Zenoh. On your own computer, connect it to the router of the central workstation:

source /opt/ros/jazzy/setup.bash
source ~/planner_ws/install/setup.bash
export RMW_IMPLEMENTATION=rmw_zenoh_cpp
export ZENOH_CONFIG_OVERRIDE='connect/endpoints=["tcp/192.168.1.249:7447"]'
export ROS_DOMAIN_ID=1
ros2 launch my_planner default.launch.xml vehicle_ids:="[1,2]" period:=400

See Middleware for details. With CycloneDDS, your planner will not see the lab.

What to Bring

  • Your planner as a ROS2 package in a git repository, so you can clone it on the central workstation. The CPM Lab repositories are cloned via SSH only; add an SSH key to your GitLab account before you come.

  • A planner tested in simulation with the same map, vehicle IDs and planner period you want to use in the lab.

  • The CPM Lab version your planner was built with (apt policy ros-jazzy-cpm-lab). It must match the release of the lab, see Versions, Updates and Rollback.

  • A plan of what to record: enable Record experiment and copy the run directory from ~/cpm_lab/experiments of the central workstation afterwards (Recording and Evaluating Experiments).

Lab Rules and Safety

The rules of your lab instance take precedence. In all CPM Labs:

  • Never alone the first time. Run your first experiments with real vehicles together with the lab staff.

  • Keep the track clear. No people, hands, cables or objects on the track while vehicles are deployed. Place and remove vehicles only when the experiment is stopped.

  • Know how to stop. Stop in the Control Center stops all vehicles. Keep it in reach during every experiment. Switching a vehicle off stops it immediately.

  • Start slow. Stay below 1 m/s in your first experiments and increase the speed step by step, see Vehicle Limits and Simulation.

  • Batteries. The muCars use LiPo batteries. Charge them only with the chargers of the lab and never unattended, do not use damaged or swollen batteries, and replace a battery when the vehicle reports a battery warning.

  • Hardware. Only the staff switch vehicles, the camera or the central workstation on and off and change their setup. Report damage or problems to the staff.

  • Leave it as you found it. Stop your planner, switch the vehicles off and put them back for charging after your slot.