Event: IIT Dharwad PARSEC | Build-a-Bot Senior PS (Round 1)
Project: The Virtual Scribe
System: ROS2 jazzy (WSL2) + CoppeliaSim Edu (Windows)
This project implements a 2-Degree-of-Freedom (2-DoF) Planar Plotter simulation capable of writing/drawing on a 2D surface. The system bridges two distinct environments: ROS2 jazzy running on WSL (Ubuntu 24.04) and CoppeliaSim running on Windows. Control is achieved via standard keyboard teleoperation, with a custom Python bridge translating ROS messages into ZeroMQ (ZMQ) commands to drive the simulation in real-time.
- Simulator: CoppeliaSim Edu (Version 4.5 or later)
- Network: Firewall must allow incoming connections on port 23000 (default ZMQ port). {if needed turn off the firewall or add a new rule for port 23000 in Advanced network settings}
- ROS2 Distribution: Jazzy Jalisco
- Python: 3.10+
- Dependencies:
sudo apt install ros-jazzy-teleop-twist-keyboard
pip install -r requirements.txt- If you get error while installing from requirements.txt, run the following command instead
pip install -r requirements.txt --break-system-packagesEnsure your workspace is organized as follows:
BAB_SUBMISSION/
├─ src/
│ └─ scribe_bot/
│ ├─ resource/
│ │ └─ scribe_bot/
│ ├─ scribe_bot/
│ │ ├─ __init__.py
│ │ └─ scribe_bridge.py
│ └─ test/
│ ├─ test_copyright.py
│ ├─ test_flake8.py
│ └─ test_pep257.py
├─ package.xml
├─ setup.cfg
├─ setup.py
├─ README.md
├─ requirements.txt
├─ Screen Recording 2026-01-09 235402.mp4
└─ Sketcher-2-dof.ttt
Ensure ROS2 Jazzy is installed. If not then install by following this link: https://docs.ros.org/en/jazzy/Installation/Ubuntu-Install-Debs.html
Since WSL and Windows communicate over a virtual network, you must tell the Python script where Windows is located.
Find Windows IP:
Run this command inside your powershell terminal:
ipconfig
Copy the IP address listed next to IPV4 (e.g., 172.23.112.1).
Update the Bridge Script:
Open in wsl BAB_sbmission/src/scribe_bot/scribe_bot/scribe_bridge.py and update line 10:
WINDOWS_IP = '172.xx.xx.1' Note: This IP may change if you restart your computer/WSL.
Open Scribe_Bot_Scene.ttt in CoppeliaSim.
Ensure the Object Hierarchy matches the script's expectations:
Base -> X_joint -> X_link -> Y_joint -> ...
Attach the Lua Script (provided in submission) to the Base object to handle pen tracing and drawing.
cd ~/BAB_submission
sudo apt install colcon
colcon build
source install/setup.bashFollow this specific order to avoid connection errors.
-
Start Simulation (Windows)
- Open CoppeliaSim and press the Play button.
- Verification: The bottom status bar should display "SCRIBE BOT: System Initialization...".
-
Turn firewall temorarily off for the communication to happen or you can add Inbound Rule for port 23000 to accept connections over the network.
-
Start the Bridge (WSL Terminal 1)
- This node connects ROS to the Simulator.
cd ~/BAB_submission
ros2 run scribe_bot scribe_bridgeVerification: Output should say ✅ Connected to Windows... and ✅ Joint Handles Found.
- Start Controller (WSL Terminal 2)
- This node captures your keyboard input.
source /opt/ros/jazzy/setup.bash
ros2 run teleop_twist_keyboard teleop_twist_keyboardThe inputs have been remapped to function as a 2D Planar Plotter rather than a driving robot. You do not need to hold Shift.
| Key | Direction | Logic Map |
|---|---|---|
| i | Move UP | Maps Linear.X to Y-Axis (+) |
| , | Move DOWN | Maps Linear.X to Y-Axis (-) |
| l | Move RIGHT | Maps Angular.Z to X-Axis (+) |
| j | Move LEFT | Maps Angular.Z to X-Axis (-) |
| k | STOP | Halts all motors |
Use these keys to draw stars, diamonds, or diagonals.
| Key | Direction |
|---|---|
| o | Diagonal Up-Right |
| u | Diagonal Up-Left |
| . | Diagonal Down-Right |
| m | Diagonal Down-Left |
"Connection Refused":
- Did you update the WINDOWS_IP in the Python script?
- Is CoppeliaSim running (Play button pressed)?
- Is Windows Firewall blocking python?
"Joints Not Found":
- Check the Scene Hierarchy in CoppeliaSim. The script looks for /Base/X_joint and /Base/X_joint/X_link/Y_joint. If your hierarchy differs, update the paths in scribe_bridge.py.
Robot moves erratically:
- Ensure you aren't holding the key down if the repeat rate is too high. Tap k to stabilize.
-
ROS2 Package (scribe_bot)
-
CoppeliaSim Scene (.ttt) with Lua scripts
-
Python Bridge Code (scribe_bridge.py)
-
README.md (This file)
-
2-Minute Demo Video Link
-
Submitted by: BT_ke_bacche
-
Track : senior
-
Link To the Demonstration : https://youtu.be/Vq_coAOnuz4