A composable ROS 2 motion stack with a browser-based operator interface.
Gazebo Harmonic · ROS 2 Humble · React + TypeScript · rosbridge
MogiBot is a web-operated navigation stack for a differential-drive robot simulated in Gazebo Harmonic. The operator drives the robot from a browser, submitting target poses, watching execution live, and inspecting the scene through an embedded Gazebo viewer. A pair of composable ROS 2 nodes handles goal bridging and motion execution on the backend.
The project is built around ROS 2 composition: the same two components deploy inside a single container or split across two, without any change to node logic.
- Two composable nodes (
MotionExecutorComponentandGoalBridgeComponent), deployable in a shared or split container layout. - Action-based pose execution through a custom
ExecuteTargetPoseaction, with feedback and result streamed back to the UI. - Web operator dashboard (React + TypeScript) with manual and preset pose targets, live status, and goal history.
- Embedded Gazebo visualization served through the
gazebosim-appviewer. - rosbridge integration for browser to ROS 2 communication.
tf2-based frame handling for transforming requested goals and extracting yaw from odometry.- Proportional target-pose controller: simple, interpretable, and fully readable.
The stack is organized in four layers: simulation (Gazebo and topic bridges), motion (the two components, the action server, and tf2-based frame handling), browser integration (rosbridge and the Gazebo web viewer), and the operator UI.
| OS | Ubuntu 22.04 |
| ROS 2 | Humble |
| Simulator | Gazebo Harmonic |
| Bridges | ros_gz, rosbridge_server |
| Container | Docker |
| Frontend | Node.js 20+, npm |
git clone https://github.com/Cb-dotcom/Assignment1_RT2.git
cd Assignment1_RT2
git submodule update --init --recursiveBuild the ROS 2 workspace:
source /opt/ros/humble/setup.bash
colcon build --packages-select \
bme_gazebo_sensors_interfaces \
bme_gazebo_sensors \
bme_gazebo_sensors_bringup
source install/setup.bashInstall the Web UI:
cd web_ui
npm install
cp .env.example .envTypical .env values:
VITE_ROSBRIDGE_URL=ws://127.0.0.1:9090
VITE_GAZEBO_WEB_URL=http://127.0.0.1:3001/visualizationBuild the embedded Gazebo viewer:
cd tools/gazebosim-app
docker build -t gazebosim-app .Launch from three terminals.
ros2 launch bme_gazebo_sensors_bringup full_system.launch.pydocker run --rm -p 3001:3001 \
-e GZ_WEBSOCKET_URL=ws://127.0.0.1:9002 \
-e GZ_WEBSOCKET_AUTOCONNECT=1 \
gazebosim-appcd web_ui && npm run devOpen the UI in a browser. Confirm that rosbridge is connected and the embedded simulation view is rendering, then submit a preset or manual goal.
The motion stack provides two launch files that deploy the same components differently.
Both components run inside a single component_container. Lower process overhead, tighter integration, and the default for day-to-day use.
ros2 launch bme_gazebo_sensors_bringup full_system.launch.pyEach component runs in its own container:
MotionExecutorComponentruns in container AGoalBridgeComponentruns in container B
Cleaner failure isolation, easier per-component debugging, and a demonstration of deployment flexibility. Component source and behavior are identical across the two modes.
ros2 launch bme_gazebo_sensors_bringup full_system.launch.py rviz:=trueHosts the ExecuteTargetPose action server and runs the control loop.
- Validates incoming goals against configured tolerances.
- Computes position and heading errors from odometry, using
tf2for yaw extraction from quaternions. - Rotates in place until aligned, then drives forward proportionally.
- Publishes
cmd_vel, emits feedback during execution, and issues a stop on completion, preemption, or abort.
Connects the browser to the action server.
- Subscribes to pose targets submitted through rosbridge.
- Validates and uses
tf2to transform requested poses frommapinto the execution frameodombefore forwarding. - Acts as an action client to
MotionExecutorComponent. - Publishes
MotionUiStatusfor the UI to consume.
Defined in bme_gazebo_sensors_interfaces/:
| Type | Name |
|---|---|
| Action | ExecuteTargetPose.action |
| Message | MotionUiStatus.msg |
React + TypeScript, bundled with Vite. Features:
- Manual target-pose entry
- Preset goal buttons
- Live execution state
- Goal history
Talks to ROS 2 through rosbridge_server on ws://127.0.0.1:9090.
.
├── bme_gazebo_sensors/ # robot description, worlds, meshes, RViz config
├── bme_gazebo_sensors_bringup/ # launch files and configs
├── bme_gazebo_sensors_interfaces/ # actions and messages
├── web_ui/ # React + TS operator dashboard
└── tools/
└── gazebosim-app/ # Gazebo web viewer (submodule)
Extended documentation will be provided through:
- Sphinx for architecture, controller design, launch strategies, and composition comparison.
- Doxygen for code-level API reference.