Metadata-Version: 2.4
Name: ros-is-ros2
Version: 0.4.1
Summary: ROS 1-style CLI aliases for ROS 2, with working autocompletion.
Author: ros-is-ros2 contributors
License: GPL-3.0-or-later
Project-URL: Homepage, https://github.com/leochien1110/ros-is-ros2
Project-URL: Bug Reports, https://github.com/leochien1110/ros-is-ros2/issues
Project-URL: Source, https://github.com/leochien1110/ros-is-ros2
Keywords: ros,ros2,robotics,cli,wrapper,alias,completion
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Scientific/Engineering
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
Requires-Dist: black>=23.0.0; extra == "dev"
Requires-Dist: isort>=5.12.0; extra == "dev"
Requires-Dist: flake8>=6.0.0; extra == "dev"
Requires-Dist: build>=0.10.0; extra == "dev"
Requires-Dist: twine>=4.0.0; extra == "dev"
Requires-Dist: ruff>=0.1.0; extra == "dev"
Requires-Dist: mypy>=1.5.0; extra == "dev"
Dynamic: license-file

# ros-is-ros2

ROS 1-style CLI aliases for ROS 2, with working autocompletion.

For detailed documentation on usage, development, and troubleshooting, please see the [full documentation](docs/index.md).

## Installation

### Requirements

- ROS2 (Humble; Iron, Jazzy, and Rolling not tested yet)
- Python 3.8+
- Bash shell (Zsh shell is still not supported, welcome to contribute!)

**Note**: For bash users, `bash-completion` will be automatically installed during setup for an optimal tab completion experience.

### From GitHub Releases (Recommended)
Download the latest wheel file from [GitHub Releases](https://github.com/leochien1110/ros-is-ros2/releases):

```bash
# Download ros_is_ros2-X.X.X-py3-none-any.whl from releases, then:
pip install ros_is_ros2-0.4.0-py3-none-any.whl
ros-is-ros2 install    # Automatically installs bash-completion if needed
source ~/.bashrc       # or ~/.zshrc
```

### From PyPI (when published)
```bash
pip install ros-is-ros2
# If the 'ros-is-ros2' command is not found after installation, use:
python3 -m ros_is_ros2 install
# Otherwise:
ros-is-ros2 install    # Automatically installs bash-completion if needed
source ~/.bashrc       # or ~/.zshrc
```

### From Source
```bash
git clone https://github.com/leochien1110/ros-is-ros2.git
cd ros-is-ros2
pip install .
ros-is-ros2 install
source ~/.bashrc       # or ~/.zshrc
```

## Quick Use

Once installed, your favorite ROS 1 commands will be available with full tab-completion.

### Command Aliases

| ROS 1 Style | ROS 2 Equivalent |
|-------------|------------------|
| `rostopic`  | `ros2 topic`     |
| `rosnode`   | `ros2 node`      |
| `rosservice`| `ros2 service`   |
| `rosparam`  | `ros2 param`     |
| `rosbag`    | `ros2 bag`       |
| `rosrun`    | `ros2 run`       |
| `roslaunch` | `ros2 launch`    |
| `rospack`   | `ros2 pkg`       |
| `rossrv`    | `ros2 interface` |
| `rosmsg`    | `ros2 interface` |

### ROS Domain ID Autocompletion

Quickly check or set your ROS Domain ID with tab completion:

```bash
# Check current ROS_DOMAIN_ID
rosdomainid
# Output: 42 (or "unset" if not configured)

# Set ROS_DOMAIN_ID with tab completion
rosdomainid <TAB>
# Shows: 0 1 2 3 ... 101

# Set to a specific domain
rosdomainid 42
# Output: ROS_DOMAIN_ID set to 42
```

### Launch Argument Autocompletion

Enjoy ROS 1-style tab completion for launch arguments:

![Native Autocompletion](media/native_autocompletion.gif)
*Native ROS 2 launch argument completion*

![ROS-is-ROS2 Autocompletion](media/ros-is-ros2_autocompletion.gif)
*ROS 1-style launch argument completion with ros-is-ros2, ~10s faster*

```bash
# Type 'roslaunch <pkg> <launch_file> ' and press <TAB>
roslaunch realsense2_camera rs_launch.py <TAB>
# Shows: camera_name:= camera_namespace:= serial_no:= ...

# Partial argument completion also works
roslaunch realsense2_camera rs_launch.py cam<TAB>
# Shows: camera_name:= camera_namespace:=
```

## Uninstallation

```bash
ros-is-ros2 uninstall  # Removes shell integration and cleans cache
pip uninstall ros-is-ros2
source ~/.bashrc    # or ~/.zshrc
```

## License

This project is licensed under the **GNU General Public License v3.0 or later** (GPL-3.0-or-later). See [LICENSE](LICENSE) for details.
