Skip to content

Conversation

@Danipiza
Copy link
Contributor

@Danipiza Danipiza commented Dec 3, 2025

New commands

- ros2 node
    Commands:
        info  Output information about a node
        list  Output a list of available nodes

- ros2 topic
    Commands:
        bw     Display bandwidth used by topic
        delay  Display delay of topic from timestamp in header
        echo   Output messages from a topic
        find   Output a list of available topics of a given type
        hz     Print the average receiving rate to screen
        info   Print information about a topic
        list   Output a list of available topics
        pub    Publish a message to a topic
        type   Print a topic's type

- ros2 service
    Commands:
        call  Call a service
        echo  Echo a service
        find  Output a list of available services of a given type
        info  Print information about a service
        list  Output a list of available services
        type  Output a service's type

- ros2 action
    Commands:
        info       Print information about an action
        list       Output a list of action names
        send_goal  Send an action goal
        type       Print a action's type
        echo       Echo a action
        find       Find actions from type


- ros2 param
    Commands:
        delete    Delete parameter
        describe  Show descriptive information about declared parameters
        dump      Show all of the parameters of a node in a YAML file format
        get       Get parameter
        list      Output a list of available parameters
        load      Load parameter file for a node
        set       Set parameter

Stream-able commands examples:

execute the following command: "ros2 topic echo /turtle1/pose" for a maximum number of lines of 100000
execute the following command: "ros2 topic hz /turtle1/pose" for a maximum number of lines of 100000
execute the following command: "ros2 topic delay /turtle1/pose" for a maximum number of lines of 100000
execute the following command: "ros2 topic pub /chatter std_msgs/msg/String" for a maximum number of lines of 100000
execute the following command: "ros2 topic bw /turtle1/pose" for a maximum number of lines of 100000
execute the following command: "ros2 service echo /turtlesim/describe_parameters" for a maximum number of lines of 100000

Copy link
Contributor

@cferreiragonz cferreiragonz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

First review just checking the code. We can consider creating some tests to check all tools.

I am concerned about the optional input parameters. I don't know how all LLMs will treat them.

I will re-review after reviewing Textualize PR

if user_input.strip().lower() in ("exit", "quit"):
break

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete

self.logger = VulcanAILogger.log_manager
self.stream_task = None

#self.loop = asyncio.get_running_loop()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete if unused

Comment on lines 24 to 26
from vulcanai.console.logger import VulcanAILogger

import asyncio
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move import asyncio with the other basic import like os and argparse (alphabetical order) and reuse the vulcanai.console.logger existing import --> from vulcanai.console.logger import console, VulcanAILogger

except Exception:
pass

current_path = os.path.dirname(os.path.abspath(__file__))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to be careful with this. __file__ will point to the installation path if installed without using -e argument when installing the package. So we need to either install the default_tools.py file in the same relative path from the installed file or to find another method to add the tools. Maybe we can install them as a module with the package and just load them directly

Comment on lines 1 to 18
import sys

import time

import rclpy

import subprocess

import asyncio
import os
from typing import List, Optional

import threading


# used to remove possible errors in textual terminal
# Subscribed to [/turtle1/pose] -> Subscribed to \[/turtle1/pose]
from textual.markup import escape
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
import sys
import time
import rclpy
import subprocess
import asyncio
import os
from typing import List, Optional
import threading
# used to remove possible errors in textual terminal
# Subscribed to [/turtle1/pose] -> Subscribed to \[/turtle1/pose]
from textual.markup import escape
from typing import List, Optional
import asyncio
import os
import rclpy
import subprocess
import sys
import threading
import time
# To remove possible errors in textual terminal
# Subscribed to [/turtle1/pose] -> Subscribed to \[/turtle1/pose]
from textual.markup import escape

command = kwargs.get("command", None) # optional explicit subcommand
topic_name = kwargs.get("topic_name", None)
msg_type = kwargs.get("msg_type", None)
# streaming commands variables
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# streaming commands variables
# Streaming commands variables

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Applies elsewhere

text=True
)

# add the output of the command to the dictionary
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# add the output of the command to the dictionary
# Add the output of the command to the dictionary

Applies elsewhere


# -- unknown ------------------------------------------------------------
else:

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Comment on lines 494 to 495


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Comment on lines 600 to 602



Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants