← All modules

Lab 1 — Web Simulation Walkthrough

Draft — not verified

Lab 1: Web-Browser Simulation Walkthrough

ArbiterROS — Topics, Teleoperation, and Rosbag Recording

Component: Case Study / Labs 1 of 3 (10 % of 30 %) CLO: CLO3 (P5) Released: Week 4 — 4 May 2026 Due: Week 6 — 22 May 2026, 23:59 MYTType: Individual lab report

Objective

Get every student comfortable operating a ROS 2 system from a web browser without installing anything locally. By the end of this lab you should be able to open the simulation, see the same /cmd_vel, /odom, /scan, /tf topics a “real” ROS 2 engineer sees, drive the robot, and record the interaction into a rosbag you can replay later.

Learning Objectives

  • Start the ArbiterROS stack via docker-compose (or the hosted URL)
  • Enumerate ROS 2 topics using the rosbridge-backed web inspector
  • Interpret the message schema for the core mobile-robot topics
  • Teleoperate a differential-drive robot using keyboard and joystick modes
  • Record a rosbag, replay it, and generate a simple trajectory plot

Pre-requisites

  • A laptop with a modern browser
  • Optional: Docker Desktop for local operation
  • Read Module-1/1.5-ROS2 Architecture and Concepts.pdf before the lab slot

Task 1 — Launch the Platform (15 %)

Option A (hosted): open https://arbiter.txio.live and sign in with your UiTM credentials. Confirm the green rosbridge connected indicator.

Option B (local Docker):

git clone <platform-repo-url>
cd ros2-mobile-platform
docker-compose up -d
# wait ~30 s for all services
open http://localhost:8080

Deliverable: screenshot of the landing page showing a connected status.

Task 2 — Topic Inspection (20 %)

From the Topics panel (or the /topics page):

  1. List all active topics. Paste the list into your report.
  2. For each of the four core topics, write one sentence describing its purpose:
- `/cmd_vel` (`geometry_msgs/Twist`)

- `/odom` (`nav_msgs/Odometry`)

- `/scan` (`sensor_msgs/LaserScan`)

- `/tf` (`tf2_msgs/TFMessage`)
  1. Subscribe to /odom in the web inspector and watch the pose update as you teleoperate in Task 3.

Task 3 — Teleoperation (25 %)

Drive the robot through at least three of the 12 obstacles in the default environment using both input modes available on the /manual page (and optionally the /control page for the 3D GLTF view):

  • Keyboard mode (arrow keys / WASD)
  • Joystick mode (on-screen virtual joystick or USB game controller)

Record in your report:

  1. Linear and angular velocity limits you observed.
  2. What happens when you publish a /cmd_vel larger than the limits.
  3. The effect of the useObstacleAvoidance toggle (turn it on, then drive toward an obstacle).

Reference: Module-5/5.4-Control Algorithms.pdf §5.4.2 describes the four obstacle-avoidance modes.

Task 4 — Record and Replay a Rosbag (25 %)

  1. Start a rosbag recording on topics /cmd_vel, /odom, /scan, /tf.
  2. Drive a figure-eight-like path for about 30 seconds.
  3. Stop the recording and download the bag. Before closing the tab, verify the downloaded file size is greater than 0 bytes — the platform streams the bag to disk and an unclosed recording produces a truncated or empty file.
  4. Replay the bag into a fresh session and confirm that the subscribers reconnect.
  5. Using any plotting tool, plot the trajectory from /odom.

Deliverable: the rosbag file (ZIP), the trajectory plot PNG.

Task 5 — Reflection (15 %)

Answer briefly (one paragraph each):

  1. What does the rosbridge WebSocket actually send over the wire? Consult Module-6/6.2-Web Robot Control.pdf §6.2.2.
  2. Why does the course use a web simulator instead of Gazebo for teaching?
  3. Using five consecutive samples from your recorded /odom, numerically verify the differential-drive forward kinematics , , against the paired /cmd_vel inputs. Where does the residual come from, and how does it connect to the EOM you will derive in Assignment 1?

Deliverables

#ItemFormat
1Lab reportPDF, max 4 pages
2Rosbag recording from Task 4ZIP
3Trajectory plot PNGFrom Task 4

File name format: MEC781-Lab1-<StudentID>-<Surname>.{pdf,zip,png}

Evaluation Criteria

CriterionWeightDescription
Launch and topic inspection35 %Screenshots, topic list, correct descriptions
Teleoperation experiment25 %Quality of observations, obstacle-avoidance notes
Rosbag record/replay/plot25 %Working bag, clean trajectory plot
Reflection15 %Depth of reasoning

Resources

  • Platform URL: https://arbiter.txio.live
  • Module-1/1.5-ROS2 Architecture and Concepts.pdf
  • Module-1/1.6-ROS2 Practical Getting Started.pdf
  • Module-2/2.5-Web-Browser Simulation Platform.pdf
  • Module-6/6.2-Web Robot Control.pdf

Practical Guidance

  • If the hosted URL is unreachable, fall back to local Docker — tested on Pi 4B, Mac, and Linux. Windows works but expect slower startup.
  • Use the browser DevTools Network WS tab to see actual rosbridge messages — it makes the reflection section easier.
  • Do not close the browser tab while a rosbag is still recording. Stop the recording first, wait for the download to complete, then check the file size in your Downloads folder. A file under 5 KB is almost certainly truncated — re-record.