RoboGPT Client
robogpt_client is a Python package that talks to RoboGPT over gRPC.
It provides three main clients:
- Agent client – chat/streaming, function calls, tool discovery, agent config
- Vision client – camera management, detection result streaming, object pose queries
- Robot control client – load robots, move, read state, I/O, save poses
Installation
From source (development)
git clone git@github.com:orangewood-co/robogpt_client.git
cd robogpt_client
pip install -e .
From PyPI (when published)
pip3 install robogpt_client
Agent Client
Class: robogpt_client.agents.agent_client.AgentClient
Constructor:
AgentClient(server_address: str = "localhost", port: int = 50051)
Methods
Streaming / Chat
-
send_response(message: str, sender: str = "Client") -> None
Unidirectional: send one (or a generator of) response message(s) to the server (ReadResponseRPC). -
read_prompt(message_callback: Optional[Callable[[str], None]] = None) -> None
Unidirectional: listen to prompts from the server (StreamPromptsRPC).
Callsmessage_callback(content: str)for the first received message, then stops. -
stream_chat(sender: str = "Client", message_callback: Optional[Callable[[str], None]] = None) -> None
Bidirectional: start a chat stream (PromptsRPC).- Client sends messages generated from
self.callback_output. - For each server message: prints it and calls
message_callback(content: str)if provided. - Whatever
message_callbackreturns is stored back intoself.callback_output.
- Client sends messages generated from
Function Execution
-
call_function(function_name: str, arguments: Optional[Dict[str, Any]] = None, verbose: bool = True) -> Dict[str, Any]
CallsCallFunctionon the server.
Returns dict:{ "success": bool, "output": str, "error": str, }
Tool Discovery
-
get_tools(verbose: bool = True) -> Optional[Dict[str, Any]]
CallsGetToolsRPC, parsestools_metadata_jsonand returns a dict mapping tool name to metadata. -
save_tools_to_file(filepath: str = "tools_metadata.json") -> bool
Fetches tools withget_tools()and writes them to JSON. -
list_tools() -> Optional[list]
Returns a list of tool names (keys ofget_tools()), orNoneon error. -
get_tool_info(tool_name: str) -> Optional[Dict[str, Any]]
Returns the metadata dict for a single tool name, orNoneif missing/error.
Agent Configuration
-
upload_config(config_data: str, verbose: bool = True) -> bool
Uploads configuration text viaUploadAgentConfigRPC. -
upload_config_from_file(filepath: str) -> bool
Reads the given file and callsupload_config.
Connection Management
-
close() -> None
Stop streaming and close the gRPC channel. -
Context manager support:
def __enter__(self) -> "AgentClient" def __exit__(self, exc_type, exc_val, exc_tb) -> None
Simple example
from robogpt_client.agents.agent_client import AgentClient
with AgentClient() as client:
result = client.call_function("get_joint", {"robot_to_use": 1})
print(result)
Vision Client
Class: robogpt_client.vision.vision_client.VisionClient
Constructor:
VisionClient(server_address: str = "localhost", port: int = 50052)
Methods
Camera Management
-
get_camera_list(verbose: bool = True) -> Optional[List[Dict[str, str]]]
CallsCameraListRPC.
On success returns a list of dicts:{ "camera_name": str, "camera_type": str, "serial_number": str, }
-
initialize_camera(camera_name: str, camera_type: str = "RGB", serial_number: str = "", verbose: bool = True) -> Optional[Dict[str, Any]]
CallsIntializeCameraRPC.
Returns:{ "success": bool, "message": str, "stream_link": str, }
Detection Results Streaming
send_detection_results(detections: Iterable[Dict[str, Any]], camera_id: str = "default_camera", verbose: bool = True) -> bool
Client-streaming RPC:DetectionResults.
Eachdetectiondict is packed into aStructand streamed.
ReturnsTrueon successful RPC completion,Falseotherwise.
Object Pose Fetching
-
fetch_object_pose(object_name: str, frame_name: str = "base_link", camera_id: Optional[str] = None, verbose: bool = True) -> Optional[Dict[str, Any]]
CallsFetchObjectPoseRPC.
On success returns:{ "success": bool, "message": str, "pose": { "position": List[float], "orientation": List[float], } or None, "additional_info": Dict[str, Any] or None, }
Camera Control
-
stop_camera(camera_name: str, verbose: bool = True) -> Optional[Dict[str, Any]]
CallsStopCameraRPC.
Returns:{ "success": bool, "message": str, }
-
stop_all_cameras(verbose: bool = True) -> Optional[Dict[str, Any]]
CallsStopAllCamerasRPC withKillAllCamerasrequest.
Returns:{ "success": bool, "message": str, }
-
get_camera_streams(verbose: bool = True) -> Optional[List[Dict[str, Any]]]
CallsGetCameraStreamsRPC.
On success returns list of dicts:{ "camera_name": str, "stream_link": str, "is_streaming": bool, }
Helper
save_camera_list(filepath: str = "cameras.json") -> bool
Callsget_camera_list(verbose=False)and saves the result to JSON.
Connection Management
close() -> None– close gRPC channel.__enter__,__exit__– context manager support.
Simple example
from robogpt_client.vision.vision_client import VisionClient
with VisionClient() as vc:
cams = vc.get_camera_list()
print(cams)
Robot Control Client
Class: robogpt_client.robot_control.bot_control_client.BotControlClient
Constructor:
BotControlClient(server_address: str = "localhost", port: int = 50052)
Note: The default
porthere is50052in the class, though the comment says50051.
Methods
Robot Lifecycle
load_robot(robot_names: List[str], robot_ip: List[str], use_simulation: bool = False, robot_prefix: Optional[List[str]] = None) -> Tuple[bool, str]
CallsLoadRobotRPC.
Returns(success, message).
Motion
-
move_to_pose(robot_id: int, pose_name: str, speed: float = 0.5, acceleration: float = 0.5, user_frame: int = 0) -> Tuple[bool, str]
CallsMoveToPoseRPC to move to a named pose.
Returns(success, message). -
move_to_joint(robot_id: int, joint_angles: List[float], speed: float = 0.5, acceleration: float = 0.5) -> Tuple[bool, str, float]
CallsMoveToJointRPC for a joint-space move.
Returns(success, message, execution_time).
State
-
get_current_tcp(robot_id: int, user_frame: int = 0, tool_number: int = 0) -> Tuple[bool, str, Optional[List[float]]]
CallsGetCurrentTcpRPC.
On success, last element is TCP pose list; otherwiseNone. -
get_current_joints(robot_id: int) -> Tuple[bool, str, Optional[List[float]]]
CallsGetCurrentJointsRPC.
On success, last element is current joint angles; otherwiseNone.
I/O
-
set_digital_pin(robot_id: int, pin_number: int, value: bool) -> Tuple[bool, str]
CallsSetDigitalPinRPC.
Returns(success, message). -
get_digital_pin(robot_id: int, pin_number: int) -> Tuple[bool, str, bool]
CallsGetDigitalPinRPC.
Returns(success, message, value).
Poses
save_pose(robot_id: int, pose_name: str, pose_type: str = "tcp", user_frame: int = 0, tool_number: int = 0) -> Tuple[bool, str]
CallsSavePoseRPC to store the current pose with a name.
Returns(success, message).
Connection Management
-
close() -> None
Close gRPC channel. -
__enter__,__exit__– context manager support.
Simple example
from robogpt_client.robot_control.bot_control_client import BotControlClient
with BotControlClient() as client:
ok, msg = client.load_robot(
robot_names=["robot1"],
robot_ip=["192.168.1.100"],
use_simulation=True,
)
print("Load:", ok, msg)
ok, msg, joints = client.get_current_joints(robot_id=1)
print("Joints:", ok, joints)
Examples
python3 -m robogpt_client.examples.demo_agents
python3 -m robogpt_client.examples.demo_vision
python3 -m robogpt_client.examples.demo_bot_control
Support
For issues and questions, open a GitHub issue or contact support@orangewood.co
Metadata
Release files for robogpt-client 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| robogpt_client-0.1.4.tar.gz | 21.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| robogpt_client-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 43.5 kB
Release files / robogpt_client-0.1.4.tar.gz
| Download URL | robogpt_client-0.1.4.tar.gz |
|---|---|
| Size | 21.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5437f2ed8c01f456f55714090a4946c6ebae7987f84c3b340015fee53c8f5867
|
|
BLAKE2b-256 checksum How to use checksums |
e2e8dc094c0a921a5b36b3ea64fbf37bf829545722860888c31e7fd7b13b60f6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|
Release files / robogpt_client-0.1.4-py3-none-any.whl
| Download URL | robogpt_client-0.1.4-py3-none-any.whl |
|---|---|
| Size | 22.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bd19a80f919b377fe6409b91750893a7c12ada9ae8a1755479db8507bf080ea2
|
|
BLAKE2b-256 checksum How to use checksums |
0b0d224f6798d5b0f97b2d69ca1649ff16d6649080d8cbf18928b8498aabe18c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.2
|