diff --git a/.gitignore b/.gitignore index 16b14f2..b76c8ea 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ -tb3_agent/.env +turtlebo3_agent/.env __pycache__/ -tb3_agent/tools/navigation_tools.py -tb3_agent/tools/api_tools.py +turtlebo3_agent/tools/navigation_tools.py +turtlebo3_agent/tools/api_tools.py devel/ logs/ diff --git a/launch/tb3_agent.launch.py b/launch/tb3_agent.launch.py index 69f5a22..873e506 100755 --- a/launch/tb3_agent.launch.py +++ b/launch/tb3_agent.launch.py @@ -19,7 +19,7 @@ def generate_launch_description(): ) ekf_config_file_path = os.path.join( - get_package_share_directory("tb3_agent"), "config", "ekf_turtlebot3.yaml" + get_package_share_directory("turtlebot3_agent"), "config", "ekf_turtlebot3.yaml" ) ekf_node = Node( diff --git a/package.xml b/package.xml index 1cf432b..70dc4da 100644 --- a/package.xml +++ b/package.xml @@ -1,7 +1,7 @@ - tb3_agent + turtlebot3_agent 0.0.0 A ROS2 package that integrates a TurtleBot3 with LangChain and language models diff --git a/resource/tb3_agent b/resource/turtlebot3_agent similarity index 100% rename from resource/tb3_agent rename to resource/turtlebot3_agent diff --git a/setup.cfg b/setup.cfg index f4a5d08..90945db 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,4 +1,4 @@ [develop] -script_dir=$base/lib/tb3_agent +script_dir=$base/lib/turtlebot3_agent [install] -install_scripts=$base/lib/tb3_agent +install_scripts=$base/lib/turtlebot3_agent diff --git a/setup.py b/setup.py index 342c87b..617b887 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ from setuptools import find_packages, setup -package_name = "tb3_agent" +package_name = "turtlebot3_agent" setup( name=package_name, @@ -28,8 +28,8 @@ tests_require=["pytest"], entry_points={ "console_scripts": [ - "tb3_node_entrypoint = tb3_agent.tb3_node_entrypoint:main", - "main = tb3_agent.main:main", + "tb3_node_entrypoint = turtlebot3_agent.tb3_node_entrypoint:main", + "main = turtlebot3_agent.main:main", ], }, ) diff --git a/tb3_agent.repos b/tb3_agent.repos index 5a8704d..ce70db0 100644 --- a/tb3_agent.repos +++ b/tb3_agent.repos @@ -2,16 +2,12 @@ repositories: turtlebot3_simulations: type: git url: https://github.com/ROBOTIS-GIT/turtlebot3_simulations.git - version: humble-devel + version: humble turtlebot3_msgs: type: git url: https://github.com/ROBOTIS-GIT/turtlebot3_msgs.git - version: humble-devel + version: humble turtlebot3: type: git url: https://github.com/ROBOTIS-GIT/turtlebot3.git - version: humble-devel - robot_localization: - type: git - url: https://github.com/cra-ros-pkg/robot_localization.git version: humble-devel \ No newline at end of file diff --git a/tb3_agent/__init__.py b/turtlebot3_agent/__init__.py similarity index 100% rename from tb3_agent/__init__.py rename to turtlebot3_agent/__init__.py diff --git a/tb3_agent/chat_entrypoint.py b/turtlebot3_agent/chat_entrypoint.py similarity index 92% rename from tb3_agent/chat_entrypoint.py rename to turtlebot3_agent/chat_entrypoint.py index b3a535b..a3a0eda 100644 --- a/tb3_agent/chat_entrypoint.py +++ b/turtlebot3_agent/chat_entrypoint.py @@ -6,8 +6,8 @@ from langchain.agents import AgentExecutor from rclpy.node import Node -from tb3_agent.interface.chat_gui import ChatUI -from tb3_agent.interface.gui_interface import GUIAgentInterface +from turtlebot3_agent.interface.chat_gui import ChatUI +from turtlebot3_agent.interface.gui_interface import GUIAgentInterface def chat_invoke( diff --git a/tb3_agent/interface/__init__.py b/turtlebot3_agent/interface/__init__.py similarity index 100% rename from tb3_agent/interface/__init__.py rename to turtlebot3_agent/interface/__init__.py diff --git a/tb3_agent/interface/base_interface.py b/turtlebot3_agent/interface/base_interface.py similarity index 100% rename from tb3_agent/interface/base_interface.py rename to turtlebot3_agent/interface/base_interface.py diff --git a/tb3_agent/interface/chat_gui.py b/turtlebot3_agent/interface/chat_gui.py similarity index 97% rename from tb3_agent/interface/chat_gui.py rename to turtlebot3_agent/interface/chat_gui.py index 16cd936..15b7110 100644 --- a/tb3_agent/interface/chat_gui.py +++ b/turtlebot3_agent/interface/chat_gui.py @@ -3,7 +3,7 @@ import tkinter as tk from tkinter import scrolledtext -from tb3_agent.interface.gui_interface import GUIAgentInterface +from turtlebot3_agent.interface.gui_interface import GUIAgentInterface class ChatUI: diff --git a/tb3_agent/interface/gui_interface.py b/turtlebot3_agent/interface/gui_interface.py similarity index 86% rename from tb3_agent/interface/gui_interface.py rename to turtlebot3_agent/interface/gui_interface.py index 3801f13..fe1d7ef 100644 --- a/tb3_agent/interface/gui_interface.py +++ b/turtlebot3_agent/interface/gui_interface.py @@ -1,4 +1,4 @@ -from tb3_agent.interface.base_interface import BaseAgentInterface +from turtlebot3_agent.interface.base_interface import BaseAgentInterface class GUIAgentInterface(BaseAgentInterface): diff --git a/tb3_agent/llms.py b/turtlebot3_agent/llms.py similarity index 99% rename from tb3_agent/llms.py rename to turtlebot3_agent/llms.py index d634956..77318db 100644 --- a/tb3_agent/llms.py +++ b/turtlebot3_agent/llms.py @@ -8,7 +8,8 @@ from langchain_mistralai import ChatMistralAI from langchain_ollama import ChatOllama from langchain_openai import ChatOpenAI -from turtlesim_agent.prompts import prompt + +from turtlebot3_agent.prompts import prompt URL = os.getenv("URL") diff --git a/tb3_agent/main.py b/turtlebot3_agent/main.py similarity index 88% rename from tb3_agent/main.py rename to turtlebot3_agent/main.py index 14867db..940cd18 100755 --- a/tb3_agent/main.py +++ b/turtlebot3_agent/main.py @@ -12,10 +12,10 @@ from langchain.agents import AgentExecutor from rclpy.executors import ExternalShutdownException, SingleThreadedExecutor -from tb3_agent.chat_entrypoint import chat_invoke -from tb3_agent.llms import create_agent -from tb3_agent.tb3_node import TB3Agent -from tb3_agent.tools.all_tools import make_all_tools +from turtlebot3_agent.chat_entrypoint import chat_invoke +from turtlebot3_agent.llms import create_agent +from turtlebot3_agent.tb3_node import TB3Agent +from turtlebot3_agent.tools.all_tools import make_all_tools load_dotenv() diff --git a/tb3_agent/prompts.py b/turtlebot3_agent/prompts.py similarity index 100% rename from tb3_agent/prompts.py rename to turtlebot3_agent/prompts.py diff --git a/tb3_agent/tb3_node.py b/turtlebot3_agent/tb3_node.py similarity index 98% rename from tb3_agent/tb3_node.py rename to turtlebot3_agent/tb3_node.py index 170c06f..8827e82 100755 --- a/tb3_agent/tb3_node.py +++ b/turtlebot3_agent/tb3_node.py @@ -17,7 +17,7 @@ from sensor_msgs.msg import Image, LaserScan from transforms3d.euler import quat2euler -from tb3_agent.utils import normalize_angle +from turtlebot3_agent.utils import normalize_angle TWIST_ANGULAR = 0.30 TWIST_VELOCITY = 0.21 @@ -33,7 +33,7 @@ class TB3Agent(Node): def __init__(self): """Initialize the TB3Agent node with publishers and subscribers.""" - super().__init__("tb3_agent") + super().__init__("turtlebot3_agent") self.declare_parameter("interface", "cli") self.declare_parameter("agent_model", "gemini-2.0-flash") diff --git a/tb3_agent/tb3_node_entrypoint.py b/turtlebot3_agent/tb3_node_entrypoint.py similarity index 80% rename from tb3_agent/tb3_node_entrypoint.py rename to turtlebot3_agent/tb3_node_entrypoint.py index 7892329..ca6caac 100644 --- a/tb3_agent/tb3_node_entrypoint.py +++ b/turtlebot3_agent/tb3_node_entrypoint.py @@ -1,7 +1,7 @@ #!/usr/bin/env python3 import rclpy -from tb3_agent.tb3_node import TB3Agent +from turtlebot3_agent.tb3_node import TB3Agent def main(): diff --git a/tb3_agent/tools/__init__.py b/turtlebot3_agent/tools/__init__.py similarity index 100% rename from tb3_agent/tools/__init__.py rename to turtlebot3_agent/tools/__init__.py diff --git a/tb3_agent/tools/all_tools.py b/turtlebot3_agent/tools/all_tools.py similarity index 74% rename from tb3_agent/tools/all_tools.py rename to turtlebot3_agent/tools/all_tools.py index c6a53da..d214aeb 100644 --- a/tb3_agent/tools/all_tools.py +++ b/turtlebot3_agent/tools/all_tools.py @@ -1,5 +1,5 @@ -# from tb3_agent.tools.api_tools import get_information_from_internet -from tb3_agent.tools.math_tools import ( +# from turtlebot3_agent.tools.api_tools import get_information_from_internet +from turtlebot3_agent.tools.math_tools import ( calculate_absolute_angle, calculate_distance_and_relative_angle, calculate_euclidean_distance, @@ -7,18 +7,18 @@ calculate_relative_angle_from_yaw, degrees_to_radians, ) -from tb3_agent.tools.motion_tools import ( +from turtlebot3_agent.tools.motion_tools import ( make_move_linear_tool, make_move_non_linear_tool, make_rotate_tool, ) -# from tb3_agent.tools.navigation_tools import make_navigate_to_goal_tool -from tb3_agent.tools.sensor_tools import ( +# from turtlebot3_agent.tools.navigation_tools import make_navigate_to_goal_tool +from turtlebot3_agent.tools.sensor_tools import ( make_get_lidar_scan_tool, make_start_camera_display_tool, ) -from tb3_agent.tools.status_tools import make_get_turtle_pose_tool +from turtlebot3_agent.tools.status_tools import make_get_turtle_pose_tool def make_all_tools(node) -> list: diff --git a/tb3_agent/tools/math_tools.py b/turtlebot3_agent/tools/math_tools.py similarity index 99% rename from tb3_agent/tools/math_tools.py rename to turtlebot3_agent/tools/math_tools.py index baf836c..4bfc344 100644 --- a/tb3_agent/tools/math_tools.py +++ b/turtlebot3_agent/tools/math_tools.py @@ -3,7 +3,7 @@ from langchain.tools import tool -from tb3_agent.utils import normalize_angle +from turtlebot3_agent.utils import normalize_angle @tool diff --git a/tb3_agent/tools/motion_tools.py b/turtlebot3_agent/tools/motion_tools.py similarity index 100% rename from tb3_agent/tools/motion_tools.py rename to turtlebot3_agent/tools/motion_tools.py diff --git a/tb3_agent/tools/sensor_tools.py b/turtlebot3_agent/tools/sensor_tools.py similarity index 100% rename from tb3_agent/tools/sensor_tools.py rename to turtlebot3_agent/tools/sensor_tools.py diff --git a/tb3_agent/tools/status_tools.py b/turtlebot3_agent/tools/status_tools.py similarity index 100% rename from tb3_agent/tools/status_tools.py rename to turtlebot3_agent/tools/status_tools.py diff --git a/tb3_agent/utils.py b/turtlebot3_agent/utils.py similarity index 100% rename from tb3_agent/utils.py rename to turtlebot3_agent/utils.py