-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* 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 * chore: bump langchain versions. * Simplified within_bounds function by removing redundant 'elif' condition. Improved code readability and maintainability. (#13) * Add unit tests and CI. (#14) * feat(tests): add unit tests for most tools and the ROSATools class. * fix: passing a blacklist into any of the tools no longer overrides the blacklist passed into the ROSA constructor. They are concatenated instead. * feat(CI): add ci workflow. * fix: properly filter out blacklisted topics and nodes. * feat(tests): add ros2 tests. * feat(ci): update humble jobs. * feat(ci): finalize initial version of ci. * feat(tests): add stubs for additional test classes. * docs: update README * chore: bump version to 1.0.5 * fix typos (#17) * Add streaming support (#19) * chore: remove verbose logging where it isn't required. * chore: remove unnecessary apt installations. * fix: minor typo * chore: update gitignore * chore: update PR template * Update turtle agent demo to support streaming responses. * feat(streaming): add the ability to stream responses from ROSA. * feat(demo): update demo script, apply formatting. * feat(demo): update demo TUI, fix bounds checking in turtle tools. * feat(demo): clean up Docker demo, add another example of adding tools to the agent. * docs: update README. * docs: update README. * Update README.md * chore: minor formating and linting. * chore: switch setup configuration to use pyproject.toml * feat(demo): properly implement streaming REPL interface. * chore: bump version to 1.0.6 * chore: specify version in CHANGELOG. --------- Co-authored-by: Kejun Liu <[email protected]> Co-authored-by: Kejun Liu <[email protected]>
- Loading branch information
1 parent
daf74bc
commit d22eb90
Showing
21 changed files
with
674 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
## Purpose | ||
- Clear, easy-to-understand sentences outlining the purpose of the PR | ||
|
||
## Proposed Changes | ||
- [ADD] ... | ||
- [CHANGE] ... | ||
- [REMOVE] ... | ||
- [FIX] ... | ||
|
||
## Issues | ||
- Links to relevant issues | ||
- Example: issue-XYZ | ||
|
||
## Testing | ||
- Provide some proof you've tested your changes | ||
- Example: test results available at ... | ||
- Example: tested on operating system ... | ||
- Example: tested on operating system ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,8 @@ | ||
.idea | ||
.vscode | ||
src/jpl_rosa.egg-info | ||
build/ | ||
dist/ | ||
__pycache__/ | ||
__pycache__/ | ||
docs | ||
.DS_Store |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,52 +1,43 @@ | ||
FROM osrf/ros:noetic-desktop as rosa-ros1 | ||
FROM osrf/ros:noetic-desktop AS rosa-ros1 | ||
LABEL authors="Rob Royce" | ||
|
||
ENV DEBIAN_FRONTEND=noninteractive | ||
ENV HEADLESS=false | ||
ARG DEVELOPMENT=false | ||
|
||
# Install linux packages | ||
RUN apt-get update && apt-get install -y \ | ||
ros-$(rosversion -d)-turtlesim \ | ||
locales \ | ||
lsb-release \ | ||
git \ | ||
subversion \ | ||
nano \ | ||
terminator \ | ||
xterm \ | ||
wget \ | ||
curl \ | ||
htop \ | ||
gnome-terminal \ | ||
libssl-dev \ | ||
build-essential \ | ||
dbus-x11 \ | ||
software-properties-common \ | ||
build-essential \ | ||
ssh \ | ||
ros-$(rosversion -d)-turtlesim | ||
xvfb \ | ||
python3.9 \ | ||
python3-pip | ||
|
||
# RUN apt-get clean && rm -rf /var/lib/apt/lists/* | ||
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.5 | ||
|
||
# Configure ROS | ||
RUN rosdep update | ||
RUN echo "source /opt/ros/noetic/setup.bash" >> /root/.bashrc | ||
RUN echo "export ROSLAUNCH_SSH_UNKNOWN=1" >> /root/.bashrc | ||
RUN rosdep update && \ | ||
echo "source /opt/ros/noetic/setup.bash" >> /root/.bashrc && \ | ||
echo "alias start='catkin build && source devel/setup.bash && roslaunch turtle_agent agent.launch'" >> /root/.bashrc && \ | ||
echo "export ROSLAUNCH_SSH_UNKNOWN=1" >> /root/.bashrc | ||
|
||
COPY . /app/ | ||
WORKDIR /app/ | ||
|
||
# Uncomment this line to test with local ROSA package | ||
# RUN python3.9 -m pip install --user -e . | ||
# Modify the RUN command to use ARG | ||
RUN /bin/bash -c 'if [ "$DEVELOPMENT" = "true" ]; then \ | ||
python3.9 -m pip install --user -e .; \ | ||
else \ | ||
python3.9 -m pip install -U jpl-rosa>=1.0.5; \ | ||
fi' | ||
|
||
# Run roscore in the background, then run `rosrun turtlesim turtlesim_node` in a new terminal, finally run main.py in a new terminal | ||
CMD /bin/bash -c 'source /opt/ros/noetic/setup.bash && \ | ||
roscore & \ | ||
sleep 2 && \ | ||
rosrun turtlesim turtlesim_node > /dev/null & \ | ||
sleep 3 && \ | ||
echo "" && \ | ||
echo "Run \`catkin build && source devel/setup.bash && roslaunch turtle_agent agent\` to launch the ROSA-TurtleSim demo." && \ | ||
/bin/bash' | ||
CMD ["/bin/bash", "-c", "source /opt/ros/noetic/setup.bash && \ | ||
roscore > /dev/null 2>&1 & \ | ||
sleep 5 && \ | ||
if [ \"$HEADLESS\" = \"false\" ]; then \ | ||
rosrun turtlesim turtlesim_node & \ | ||
else \ | ||
xvfb-run -a -s \"-screen 0 1920x1080x24\" rosrun turtlesim turtlesim_node & \ | ||
fi && \ | ||
sleep 5 && \ | ||
echo \"Run \\`start\\` to build and launch the ROSA-TurtleSim demo.\" && \ | ||
/bin/bash"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
[build-system] | ||
requires = ["setuptools>=45", "wheel"] | ||
build-backend = "setuptools.build_meta" | ||
|
||
[project] | ||
name = "jpl-rosa" | ||
version = "1.0.6" | ||
description = "ROSA: the Robot Operating System Agent" | ||
readme = "README.md" | ||
authors = [{ name = "Rob Royce", email = "[email protected]" }] | ||
license = { file = "LICENSE" } | ||
classifiers = [ | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Console", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Natural Language :: English", | ||
"Operating System :: Unix", | ||
"Programming Language :: Python :: 3", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
] | ||
keywords = ["Robotics", "Data Science", "Machine Learning", "Data Engineering", "Data Infrastructure", "Data Analysis"] | ||
requires-python = ">=3.9, <4" | ||
dependencies = [ | ||
"PyYAML==6.0.1", | ||
"python-dotenv>=1.0.1", | ||
"langchain==0.2.14", | ||
"langchain-community==0.2.12", | ||
"langchain-core==0.2.34", | ||
"langchain-openai==0.1.22", | ||
"langchain-ollama", | ||
"pydantic", | ||
"pyinputplus", | ||
"azure-identity", | ||
"cffi", | ||
"rich", | ||
"pillow>=10.4.0", | ||
"numpy>=1.21.2", | ||
] | ||
|
||
[project.urls] | ||
"Homepage" = "https://github.com/nasa-jpl/rosa" | ||
"Bug Tracker" = "https://github.com/nasa-jpl/rosa/issues" | ||
|
||
[tool.setuptools.packages.find] | ||
where = ["src"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,57 +12,7 @@ | |
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
import pathlib | ||
from distutils.core import setup | ||
|
||
from setuptools import find_packages | ||
|
||
here = pathlib.Path(__file__).parent.resolve() | ||
long_description = (here / "README.md").read_text(encoding="utf-8") | ||
rosa_packages = find_packages(where="src") | ||
|
||
setup( | ||
name="jpl-rosa", | ||
version="1.0.5", | ||
license="Apache 2.0", | ||
description="ROSA: the Robot Operating System Agent", | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
url="https://github.com/nasa-jpl/rosa", | ||
author="Rob Royce", | ||
author_email="[email protected]", | ||
classifiers=[ | ||
"Development Status :: 4 - Beta", | ||
"Environment :: Console", | ||
"Intended Audience :: Science/Research", | ||
"License :: OSI Approved :: Apache Software License", | ||
"Natural Language :: English", | ||
"Operating System :: Unix", | ||
"Programming Language :: Python :: 3", | ||
"Topic :: Scientific/Engineering", | ||
"Topic :: Scientific/Engineering :: Artificial Intelligence", | ||
], | ||
keywords="Robotics, Data Science, Machine Learning, Data Engineering, Data Infrastructure, Data Analysis", | ||
package_dir={"": "src"}, | ||
packages=rosa_packages, | ||
python_requires=">=3.9, <4", | ||
install_requires=[ | ||
"PyYAML==6.0.1", | ||
"python-dotenv>=1.0.1", | ||
"langchain==0.2.14", | ||
"langchain-community==0.2.12", | ||
"langchain-core==0.2.34", | ||
"langchain-openai==0.1.22", | ||
"pydantic", | ||
"pyinputplus", | ||
"azure-identity", | ||
"cffi", | ||
"rich", | ||
"pillow>=10.4.0", | ||
"numpy>=1.21.2", | ||
], | ||
project_urls={ # Optional | ||
"Bug Reports": "https://github.com/nasa-jpl/rosa/issues", | ||
"Source": "https://github.com/nasa-jpl/rosa", | ||
}, | ||
) | ||
if __name__ == "__main__": | ||
setup() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.