Skip to content

Commit

Permalink
ROS2 tools update (#10)
Browse files Browse the repository at this point in the history
* refactor: better error handling and response parsing for ROS2 tools, add blacklist where applicable.

* feat(ros2): add ros2 topic echo tool.

* chore: bump version to 1.0.4, update CHANGELOG.md
  • Loading branch information
RobRoyce authored Aug 21, 2024
1 parent f6b331b commit add7e7c
Show file tree
Hide file tree
Showing 5 changed files with 233 additions and 217 deletions.
15 changes: 15 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,21 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.0.4] - 2024-08-21

### Added

* Implemented ros2 topic echo tool.

### Changed

* Refactored ROS2 tools for better error handling and response parsing.
* Added blacklist parameters to relevant ROS2 tools.

### Fixed

* Fixed a bug where getting a list of ROS2 log files failed.

## [1.0.3] - 2024-08-17

### Added
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ RUN apt-get update && apt-get install -y \
RUN apt-get update && apt-get install -y python3.9
RUN apt-get update && apt-get install -y python3-pip
RUN python3 -m pip install -U python-dotenv catkin_tools
RUN python3.9 -m pip install -U jpl-rosa>=1.0.1
RUN python3.9 -m pip install -U jpl-rosa>=1.0.4

# Configure ROS
RUN rosdep update
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

setup(
name="jpl-rosa",
version="1.0.3",
version="1.0.4",
license="Apache 2.0",
description="ROSA: the Robot Operating System Agent",
long_description=long_description,
Expand Down
5 changes: 2 additions & 3 deletions src/rosa/tools/ros1.py
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ def rostopic_echo(
timeout: float = 1.0,
) -> dict:
"""
Opens a new terminal window and echoes the contents of a specific ROS topic.
Echoes the contents of a specific ROS topic.
:param topic: The name of the ROS topic to echo.
:param count: The number of messages to echo. Valid range is 1-100.
Expand Down Expand Up @@ -675,7 +675,7 @@ def roslog_list(min_size: int = 2048, blacklist: Optional[List[str]] = None) ->
"""

logs = []
log_dirs = get_roslog_directories.invoke({})
log_dirs = get_roslog_directories()

for _, log_dir in log_dirs.items():
if not log_dir:
Expand Down Expand Up @@ -729,7 +729,6 @@ def roslog_list(min_size: int = 2048, blacklist: Optional[List[str]] = None) ->
)


@tool
def get_roslog_directories() -> dict:
"""Returns any available ROS log directories."""
default_directory = rospkg.get_log_dir()
Expand Down
Loading

0 comments on commit add7e7c

Please sign in to comment.