A semi-autonomous waypoint navigation system. Waypoints are placed on a touch-screen map (global frame) and sent to the robot over UDP at 10 Hz. The robot executes them sequentially using a P controller inside a ROS2 node, with a state machine managing navigation, pausing, and return behaviour.
- ROS2 (Humble or later)
custom_messagespackage built in the same workspace- An Android phone with Wifi
To install the app:
- Open the provided
.apkfile - Install the app (don't scan)
To configure ROS2 package:
- Copy the provided
srcdirectory insider2_srcinto your workspace - Build the package:
cd ~/ros2_ws
colcon build --symlink-install
source install/setup.bashThere is no launch file. Start each node manually in separate terminals.
source ~/ros2_ws/install/setup.bash
ros2 run <pkg> <node_name>Run all the nodes inside different terminal. The port is set to
5050by default.
- Add the field dimension first before adding waypoints.
- Bind the phone to the robot before sending.
- Send waypoints — tap the map to place waypoints, then press Send. The robot navigates to each one in order.
- Edit a waypoint — drag a waypoint on the map. Updates are applied immediately, even while the robot is moving.
- Delete / undo — use the app controls before the waypoints are executed.
- Return — press Return on the app. The robot immediately heads back to the last visited waypoint.
- Add waypoints by touch on a global-frame map
- Edit waypoints in real time (mid-navigation)
- Delete / undo waypoints from the app
- Send all waypoints at once
- Return to previous waypoint
- P controller with speed saturation and velocity ramp-up
- Stateful control (IDLE / NAVIGATE / RETURN / PAUSED)
Robot does not move after sending waypoints
- Check that the UDP listener is running and receiving packets.
- Verify
/waypointis being published:ros2 topic echo /waypoint - Check that
/current_odomis being published by your driver node.
Robot moves in the wrong direction
- Confirm the odometry frame matches the app's global frame. A mismatch here will cause the robot to navigate to the wrong position.
- Check that the robot's initial pose at startup is (0, 0) or matches the app's origin.
Yaw is way off
- Known issue. Check that the yaw from
/current_odomis consistent with the direction the robot is physically facing. - Verify the quaternion-to-yaw conversion matches your odometry convention.
Robot overshoots or oscillates
- Reduce
K_Pinrobot_control.py. - Increase
A_MAXgradually if the ramp-up is too slow and causing overshoot.
Robot stops short of the waypoint
- The P controller has inherent steady-state error. Reduce
ERROR_THRESHOLDorARRIVAL_THRESHOLDto tighten accuracy.
Waypoint edit applies to the wrong waypoint
- Known app-side bug. Restart the app and re-send waypoints as a workaround.
Robot gets stuck in PAUSED and never resumes
- Check that
_pause_robotis not being set externally without a correspondingresume()call. - Verify the odometry topic is still publishing — the timer callback depends on fresh pose data.
custom_messages not found at build
- Make sure the
custom_messagespackage is inside~/ros2_ws/srcand runcolcon buildagain before sourcing.
- Yaw error — heading is off
- Residual position error — P controller leaves steady-state error near the target.
- Waypoint edit bug — edits oapply to the wrong version of planning due to mistake on the app.
- No emergency stop — not yet implemented on the app.
- No launch file — nodes must be started manually.