Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ COPY --from=builder $WORKSPACE/launch $WORKSPACE/launch
COPY --from=builder $WORKSPACE/config $WORKSPACE/config
COPY --from=builder $WORKSPACE/build $WORKSPACE/build
COPY --from=builder $WORKSPACE/description $WORKSPACE/description
COPY --from=builder $WORKSPACE/utils/control $WORKSPACE/utils/control
COPY --from=builder /opt/ros/$ROS_DISTRO /opt/ros/$ROS_DISTRO

# Copy XML plugins definition
Expand Down
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,7 @@ rsp:

remote-devices:
bash .devcontainer/scripts/remote_devices.sh $(REMOTE_HOST) $(REMOTE_USER)

control:
@echo "Starting OpenMower Terminal Controller..."
@cd utils/control && python3 cli_controller.py
1 change: 1 addition & 0 deletions src/lib/fields2cover
Submodule fields2cover added at 87a91d
1 change: 1 addition & 0 deletions src/lib/opennav_coverage
Submodule opennav_coverage added at 194250
56 changes: 56 additions & 0 deletions utils/control/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# OpenMower Terminal Controller

::: warning
This is a work in progress. Written by LLM.
:::

A terminal-based UI controller for OpenMower. This utility provides a simple terminal interface for controlling the robot and viewing its status.

## Features

- Control the robot using arrow keys
- Monitor battery status with colored indicators
- View position and orientation information
- Check charging status

## Prerequisites

- ROS2 environment setup
- Python 3.6+
- Python packages: `curses`, `rclpy`

## Usage

The controller can be launched using the Makefile rule:

```bash
make control
```

Or run directly:

```bash
cd utils/control
python3 cli_controller.py
```

## Controls

- **↑** (Up Arrow): Increase forward speed
- **↓** (Down Arrow): Increase backward speed
- **←** (Left Arrow): Turn left
- **→** (Right Arrow): Turn right
- **Space**: Stop all movement
- **Q**: Quit the application

## ROS2 Topics

This controller interfaces with the following ROS2 topics:

- **Subscribes to**:
- `/odometry/filtered/map`: For position and orientation information
- `/power`: For battery state information
- `/power/charger_present`: For charging status

- **Publishes to**:
- `/cmd_vel_joy`: TwistStamped messages for robot control
Loading